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:
Evan Miller 2020-12-21 15:42:38 -05:00 committed by GitHub
parent 8dd10d332e
commit cb0ee059b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 106 additions and 203 deletions

85
.github/workflows/build.yml vendored Normal file
View 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

View File

@ -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

View File

@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/mdbtools/mdbtools.svg?branch=dev)](https://travis-ci.org/mdbtools/mdbtools)
[![Build Status](https://github.com/mdbtools/mdbtools/workflows/build/badge.svg)](https://githubs.com/mdbtools/mdbtools/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/22wwy5d0rrmk6e3c/branch/dev?svg=true)](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

View File

@ -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
View 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