summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml15
-rwxr-xr-xtravis.sh25
2 files changed, 24 insertions, 16 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 90ec657..452e08e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,7 +3,7 @@ name: CI
on: [push]
jobs:
- build:
+ build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -31,4 +31,15 @@ jobs:
shell: bash
env:
CC: ${{ matrix.compiler }}
- run: ./travis.sh ${{ matrix.config }} \ No newline at end of file
+ run: ./travis.sh ${{ matrix.config }}
+
+ build-macox:
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+
+ - name: Configure Build & Test
+ shell: bash
+ run: ./travis.sh macos
diff --git a/travis.sh b/travis.sh
index 318b5e3..6d08aed 100755
--- a/travis.sh
+++ b/travis.sh
@@ -2,8 +2,15 @@
build_cmake() {
mkdir $PWD/_build && cd $PWD/_build
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Werror -Wno-implicit-fallthrough" \
- ${_CMAKE_OPENSSL_FLAG}
+ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Werror -Wno-implicit-fallthrough"
+ cmake --build . --target install
+ ctest -V .
+}
+
+build_macos() {
+ mkdir $PWD/_build && cd $PWD/_build
+ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Werror" \
+ -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1"
cmake --build . --target install
ctest -V .
}
@@ -18,8 +25,7 @@ build_format() {
build_coverage() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
- -DCMAKE_C_FLAGS="-Werror -fprofile-arcs -ftest-coverage" \
- ${_CMAKE_OPENSSL_FLAG}
+ -DCMAKE_C_FLAGS="-Werror -fprofile-arcs -ftest-coverage"
cmake --build . --target install
ctest -V .
@@ -54,20 +60,11 @@ build_scan-build() {
}
if [ "$#" -ne 1 ]; then
- echo "Usage: $0 {cmake|asan|tsan|scan-build}"
+ echo "Usage: $0 {cmake|macos|format|coverage|asan|tsan|scan-build}"
exit 1
fi
set -e # exit on error.
set -x # echo commands.
-case $TRAVIS_OS_NAME in
-osx)
- # This prints out a long list of updated packages, which isn't useful.
- brew update > /dev/null
- brew outdated openssl || brew install openssl
- export _CMAKE_OPENSSL_FLAG="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl"
- ;;
-esac
-
eval "build_$1"