Files
mdbtools/.github/workflows/build.yml
Evan Miller 2becb08714 Windows GitHub Action (#231)
* Migrate the Windows Msys2 build from Appveyor to GitHub Actions
* Fix build with newer versions of Msys2 (fix `vasprintf` conflict)
* Enable SQL tests on the Cygwin build on Appveyor
* Fix an error message about Bison not being available when in fact Flex was not available
* Don't fail fast with Mac and Linux GitHub Actions
2020-12-23 09:34:21 -05:00

110 lines
3.7 KiB
YAML

name: build
on: [ push, pull_request ]
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [ clang, gcc, gcc-8, gcc-9, gcc-10 ]
glib: [ enable-glib, disable-glib ]
steps:
- name: Install packages
run: sudo apt install gettext
- uses: actions/checkout@v2
- name: Fetch test data
run: git clone https://github.com/mdbtools/mdbtestdata.git test
- name: Autoconf
run: autoreconf -i -f
- name: Configure
run: ./configure --disable-silent-rules --${{ matrix.glib }} --with-unixodbc=/usr
env:
CC: ${{ matrix.compiler }}
- name: Make
run: make
- name: CLI tests
run: bash -x ./test_script.sh
- name: SQL tests
run: bash -x ./test_sql.sh
- name: ODBC tests
run: env MDBPATH=test/data ./src/odbc/unittest
- name: pkg-config libmdb test
run: env PKG_CONFIG_PATH=. pkg-config libmdb --exists
- name: pkg-config libmdbsql test
run: env PKG_CONFIG_PATH=. pkg-config libmdbsql --exists
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
compiler: [ clang, gcc ]
glib: [ enable-glib, disable-glib ]
steps:
- name: Install packages
run: brew install bison gawk automake
- uses: actions/checkout@v2
- name: Fetch test data
run: git clone https://github.com/mdbtools/mdbtestdata.git test
- name: Autoconf
run: autoreconf -i -f
- name: Configure
run: ./configure --disable-silent-rules --${{ matrix.glib }} --with-unixodbc=/usr/local/opt
env:
CC: ${{ matrix.compiler }}
YACC: /usr/local/opt/bison/bin/bison
- name: Make
run: make
- name: CLI tests
run: bash -x ./test_script.sh
- name: SQL tests
run: bash -x ./test_sql.sh
- name: ODBC tests
run: env MDBPATH=test/data ./src/odbc/unittest
- name: pkg-config libmdb test
run: env PKG_CONFIG_PATH=. pkg-config libmdb --exists
- name: pkg-config libmdbsql test
run: env PKG_CONFIG_PATH=. pkg-config libmdbsql --exists
macos-iodbc:
runs-on: macos-latest
strategy:
matrix:
compiler: [ clang, gcc ]
glib: [ enable-glib, disable-glib ]
steps:
- name: Remove packages
run: brew unlink unixodbc
- name: Install packages
run: brew install libiodbc bison gawk automake
- uses: actions/checkout@v2
- name: Fetch test data
run: git clone https://github.com/mdbtools/mdbtestdata.git test
- name: Autoconf
run: autoreconf -i -f
- name: Configure
run: ./configure --disable-silent-rules --${{ matrix.glib }} --with-iodbc=/usr/local/opt
env:
CC: ${{ matrix.compiler }}
YACC: /usr/local/opt/bison/bin/bison
- name: Make
run: make
- name: ODBC tests
run: env MDBPATH=test/data ./src/odbc/unittest
windows:
runs-on: windows-latest
env:
MSYSTEM: MINGW64
steps:
- uses: actions/checkout@v2
- name: Check out test data
run: git clone https://github.com/mdbtools/mdbtestdata.git test
- name: Autoconf
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && autoreconf -i -f'
- name: Configure
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && ./configure'
- name: Make
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && make'
- name: Test
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && ./test_script.sh'
- name: SQL Test
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && ./test_sql.sh'