mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 08:12:58 +08:00
Migrate from Travis CI to GitHub Actions (#229)
* Add GitHub Actions workflow * Consolidate CI test commands into test_script.sh * Remove Travis build
This commit is contained in:
parent
8dd10d332e
commit
cb0ee059b2
85
.github/workflows/build.yml
vendored
Normal file
85
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
name: build
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
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: ./test_script.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:
|
||||
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: ./test_script.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
|
190
.travis.yml
190
.travis.yml
@ -1,190 +0,0 @@
|
||||
language: c
|
||||
dist: bionic
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- compiler: clang
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libiodbc2-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr --disable-glib"
|
||||
- compiler: clang
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libiodbc2-dev
|
||||
- libglib2.0-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr --enable-glib"
|
||||
- compiler: clang
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- unixodbc-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr --disable-glib"
|
||||
- compiler: clang
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- unixodbc-dev
|
||||
- libglib2.0-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr --enable-glib"
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libiodbc2-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr --disable-glib"
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- unixodbc-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr --disable-glib"
|
||||
- compiler: gcc-10
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
packages:
|
||||
- gcc-10
|
||||
- libiodbc2-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr --disable-glib"
|
||||
- compiler: gcc-10
|
||||
os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
packages:
|
||||
- gcc-10
|
||||
- unixodbc-dev
|
||||
- gawk
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr --disable-glib"
|
||||
- compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- libiodbc
|
||||
- bison
|
||||
- gawk
|
||||
- pkg-config
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr/local/opt --disable-glib"
|
||||
- YACC="/usr/local/opt/bison/bin/bison"
|
||||
- compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- libiodbc
|
||||
- glib
|
||||
- bison
|
||||
- gawk
|
||||
- pkg-config
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr/local/opt --enable-glib"
|
||||
- YACC="/usr/local/opt/bison/bin/bison"
|
||||
- compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- unixodbc
|
||||
- bison
|
||||
- gawk
|
||||
- pkg-config
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr/local/opt --disable-glib"
|
||||
- YACC="/usr/local/opt/bison/bin/bison"
|
||||
- compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- unixodbc
|
||||
- glib
|
||||
- bison
|
||||
- gawk
|
||||
- pkg-config
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr/local/opt --enable-glib"
|
||||
- YACC="/usr/local/opt/bison/bin/bison"
|
||||
- compiler: gcc
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- libiodbc
|
||||
- bison
|
||||
- gawk
|
||||
- pkg-config
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-iodbc=/usr/local/opt --disable-glib"
|
||||
- YACC="/usr/local/opt/bison/bin/bison"
|
||||
- compiler: gcc
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- unixodbc
|
||||
- bison
|
||||
- gawk
|
||||
- pkg-config
|
||||
env:
|
||||
- CONFIGURE_FLAGS="--with-unixodbc=/usr/local/opt --disable-glib"
|
||||
- YACC="/usr/local/opt/bison/bin/bison"
|
||||
|
||||
before_script:
|
||||
- git clone https://github.com/mdbtools/mdbtestdata.git test
|
||||
- autoreconf -i -f
|
||||
|
||||
script:
|
||||
- ./configure --disable-silent-rules $CONFIGURE_FLAGS
|
||||
- make
|
||||
- ./src/util/mdb-json test/data/ASampleDatabase.accdb "Asset Items"
|
||||
- ./src/util/mdb-json test/data/nwind.mdb "Customers"
|
||||
- ./src/util/mdb-count test/data/ASampleDatabase.accdb "Asset Items"
|
||||
- ./src/util/mdb-count test/data/nwind.mdb "Customers"
|
||||
- ./src/util/mdb-prop test/data/ASampleDatabase.accdb "Asset Items"
|
||||
- ./src/util/mdb-prop test/data/nwind.mdb "Customers"
|
||||
- ./src/util/mdb-schema test/data/ASampleDatabase.accdb
|
||||
- ./src/util/mdb-schema test/data/nwind.mdb
|
||||
- ./src/util/mdb-tables test/data/ASampleDatabase.accdb
|
||||
- ./src/util/mdb-tables test/data/nwind.mdb
|
||||
- ./src/util/mdb-ver test/data/ASampleDatabase.accdb
|
||||
- ./src/util/mdb-ver test/data/nwind.mdb
|
||||
- ./src/util/mdb-sql -i test/sql/nwind.sql test/data/nwind.mdb
|
||||
- ./src/util/mdb-queries test/data/ASampleDatabase.accdb qryCostsSummedByOwner
|
||||
- env MDBPATH=test/data ./src/odbc/unittest
|
||||
- env PKG_CONFIG_PATH=. pkg-config libmdb --exists
|
||||
- env PKG_CONFIG_PATH=. pkg-config libmdbsql --exists
|
@ -1,4 +1,4 @@
|
||||
[](https://travis-ci.org/mdbtools/mdbtools)
|
||||
[](https://githubs.com/mdbtools/mdbtools/actions)
|
||||
[](https://ci.appveyor.com/project/evanmiller/mdbtools/branch/dev)
|
||||
|
||||
Welcome to the exciting world of MDB Tools! MDB Tools is a set of programs to
|
||||
|
14
appveyor.yml
14
appveyor.yml
@ -42,19 +42,9 @@ test_script:
|
||||
if ($env:TOOLCHAIN -eq "msys2")
|
||||
{
|
||||
$env:MSYSTEM="MINGW64"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./src/util/mdb-ver ./test/data/ASampleDatabase.accdb"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./src/util/mdb-ver ./test/data/nwind.mdb"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./src/util/mdb-tables ./test/data/ASampleDatabase.accdb"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./src/util/mdb-tables ./test/data/nwind.mdb"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./src/util/mdb-count ./test/data/ASampleDatabase.accdb 'Asset Items'"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./src/util/mdb-count ./test/data/nwind.mdb Customers"
|
||||
C:\msys64\usr\bin\bash -l -c "cd /c/projects/mdbtools && ./test_script.sh"
|
||||
}
|
||||
else
|
||||
{
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./src/util/mdb-ver ./test/data/ASampleDatabase.accdb"
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./src/util/mdb-ver ./test/data/nwind.mdb"
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./src/util/mdb-tables ./test/data/ASampleDatabase.accdb"
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./src/util/mdb-tables ./test/data/nwind.mdb"
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./src/util/mdb-count ./test/data/ASampleDatabase.accdb 'Asset Items'"
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./src/util/mdb-count ./test/data/nwind.mdb Customers"
|
||||
C:\cygwin64\bin\sh -lc "cd /cygdrive/c/projects/mdbtools && ./test_script.sh"
|
||||
}
|
||||
|
18
test_script.sh
Executable file
18
test_script.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# Simple test script; run after performing
|
||||
# git clone https://github.com/mdbtools/mdbtestdata.git test
|
||||
./src/util/mdb-json test/data/ASampleDatabase.accdb "Asset Items"
|
||||
./src/util/mdb-json test/data/nwind.mdb "Customers"
|
||||
./src/util/mdb-count test/data/ASampleDatabase.accdb "Asset Items"
|
||||
./src/util/mdb-count test/data/nwind.mdb "Customers"
|
||||
./src/util/mdb-prop test/data/ASampleDatabase.accdb "Asset Items"
|
||||
./src/util/mdb-prop test/data/nwind.mdb "Customers"
|
||||
./src/util/mdb-schema test/data/ASampleDatabase.accdb
|
||||
./src/util/mdb-schema test/data/nwind.mdb
|
||||
./src/util/mdb-tables test/data/ASampleDatabase.accdb
|
||||
./src/util/mdb-tables test/data/nwind.mdb
|
||||
./src/util/mdb-ver test/data/ASampleDatabase.accdb
|
||||
./src/util/mdb-ver test/data/nwind.mdb
|
||||
./src/util/mdb-sql -i test/sql/nwind.sql test/data/nwind.mdb
|
||||
./src/util/mdb-queries test/data/ASampleDatabase.accdb qryCostsSummedByOwner
|
Loading…
Reference in New Issue
Block a user