Skip to content

Commit 0e5d8eb

Browse files
committed
Initial GitHub Actions CI
This only builds the driver on Ubuntu. macOS and Windows, as well as starting the LUW Docker container are TODO.
1 parent 6510dd4 commit 0e5d8eb

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Test
2+
on: [push, pull_request]
3+
jobs:
4+
# XXX: macOS, Windows
5+
ubuntu:
6+
strategy:
7+
matrix:
8+
version: ['7.3', '7.4', '8.0', '8.1']
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Cache DB2 library
14+
id: cache-clidriver
15+
uses: actions/cache@v2
16+
with:
17+
path: clidriver
18+
key: ${{ runner.os }}-clidriver
19+
- name: Install DB2 library
20+
if: steps.cache-clidriver.outputs.cache-hit != 'true'
21+
run: |
22+
wget https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz
23+
tar xvzf linuxx64_odbc_cli.tar.gz
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{matrix.version}}
28+
extensions: pdo
29+
- name: Build PDO_IBM
30+
run: |
31+
phpize
32+
./configure --with-pdo-ibm=$PWD/clidriver
33+
make
34+
# XXX: No tests until DB2 Docker container is set up (see Travis)
35+
#- name: Test dbase
36+
# run: make test TESTS=tests

0 commit comments

Comments
 (0)