Merge branch 'master' into portable #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
ubuntu: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential libprotobuf-c-dev libsqlite3-dev \ | |
libssl-dev pkg-config protobuf-c-compiler | |
- name: build | |
run: make | |
- name: run | |
# Run with bogus input files | |
run: | | |
set +e | |
./sigbak check -p sigbak.c sigbak.c | |
test $? = 1 | |
macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-11, macos-12, macos-13] | |
ssl: [libressl, openssl@1.1, openssl@3.0, openssl@3.1] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install dependencies | |
# Also install make because Xcode provides GNU make 3.81 which is too old | |
run: | | |
brew update | |
brew install make pkg-config protobuf-c sqlite ${{ matrix.ssl }} | |
- name: build | |
# Set PKG_CONFIG_PATH as per the instructions from "brew install" and | |
# https://docs.brew.sh/How-to-Build-Software-Outside-Homebrew-with-Homebrew-keg-only-Dependencies | |
run: | | |
PKG_CONFIG_PATH=$(brew --prefix ${{ matrix.ssl }})/lib/pkgconfig \ | |
gmake | |
- name: run | |
# Run with bogus input files | |
run: | | |
set +e | |
./sigbak check -p sigbak.c sigbak.c | |
test $? = 1 | |
# https://github.com/vmactions/dragonflybsd-vm | |
dragonfly: | |
runs-on: macos-12 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: run vm | |
uses: vmactions/dragonflybsd-vm@v0 | |
with: | |
usesh: true | |
prepare: pkg install -y openssl pkgconf protobuf-c sqlite3 | |
run: | | |
uname -a | |
make | |
set +e | |
./sigbak check -p sigbak.c sigbak.c | |
test $? = 1 | |
# https://github.com/vmactions/freebsd-vm | |
freebsd: | |
strategy: | |
fail-fast: false | |
matrix: | |
ssl: [libressl, openssl] | |
runs-on: macos-12 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: run vm | |
uses: vmactions/freebsd-vm@v0 | |
with: | |
usesh: true | |
prepare: pkg install -y pkgconf protobuf-c sqlite3 ${{ matrix.ssl }} | |
run: | | |
uname -a | |
make | |
set +e | |
./sigbak check -p sigbak.c sigbak.c | |
test $? = 1 | |
# https://github.com/vmactions/netbsd-vm | |
netbsd: | |
runs-on: macos-12 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: run vm | |
uses: vmactions/netbsd-vm@v0 | |
with: | |
prepare: pkg_add pkg-config protobuf-c sqlite3 | |
run: | | |
uname -a | |
make | |
set +e | |
./sigbak check -p sigbak.c sigbak.c | |
test $? = 1 | |
# https://github.com/vmactions/solaris-vm | |
solaris: | |
runs-on: macos-12 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: run vm | |
uses: vmactions/solaris-vm@v0 | |
with: | |
prepare: | | |
pkgutil -iy gcc5core gmake libprotobuf_c_dev libsqlite3_dev \ | |
libssl_dev pkgconfig | |
run: | | |
uname -a | |
CC=gcc gmake | |
set +e | |
./sigbak check -p sigbak.c sigbak.c | |
test $? = 1 | |
# https://github.com/cygwin/cygwin-install-action | |
cygwin: | |
runs-on: windows-latest | |
steps: | |
- name: configure git | |
run: git config --global core.autocrlf input | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install Cygwin | |
uses: cygwin/cygwin-install-action@master | |
with: | |
packages: > | |
curl gcc-core gcc-g++ libprotobuf-devel libsqlite3-devel libssl-devel | |
make pkg-config | |
- name: install protobuf-c | |
shell: C:\cygwin\bin\bash.exe -elo pipefail -o igncr '{0}' | |
run: | | |
VERSION=1.4.1 | |
curl -LO https://github.com/protobuf-c/protobuf-c/releases/download/v$VERSION/protobuf-c-$VERSION.tar.gz | |
tar fxz protobuf-c-$VERSION.tar.gz | |
cd protobuf-c-$VERSION | |
./configure | |
make install | |
- name: install and run sigbak | |
shell: C:\cygwin\bin\bash.exe -elo pipefail -o igncr '{0}' | |
run: | | |
uname -a | |
cd $GITHUB_WORKSPACE | |
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make install | |
set +e | |
sigbak check -p sigbak.c sigbak.c | |
test $? = 1 |