From d7c710edd55d14601861eb19785cdb79474ca223 Mon Sep 17 00:00:00 2001 From: Abit Date: Thu, 2 Jul 2020 10:38:59 +0200 Subject: [PATCH] Add macOS to Github Autobuild --- .github/workflows/build-and-test.yml | 49 ++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7dfc44a..304b73d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -5,7 +5,7 @@ env: CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros jobs: test-release: - name: Build and run tests in Release mode + name: Build and run tests in Ubuntu, Release mode runs-on: ubuntu-latest steps: - name: Install dependencies @@ -64,7 +64,7 @@ jobs: task_cancel_test _EOT_ test-debug: - name: Build and run tests in Debug mode + name: Build and run tests in Ubuntu, Debug mode runs-on: ubuntu-latest steps: - name: Install dependencies @@ -122,3 +122,48 @@ jobs: hmac_test task_cancel_test _EOT_ + test-macos: + name: Build and run tests in macOS + runs-on: macos-latest + steps: + - name: Install dependencies + run: | + brew install autoconf automake libtool + brew install ccache + brew search boost + brew install boost@1.60 + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Configure + run: | + mkdir -p _build + pushd _build + cmake -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_C_COMPILER_LAUNCHER=ccache \ + -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -D BOOST_ROOT=/usr/local/opt/boost@1.60 \ + -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \ + .. + - name: Load Cache + uses: actions/cache@v1 + with: + path: ccache + key: ccache-osx-${{ github.ref }}-${{ github.sha }} + restore-keys: | + ccache-osx-${{ github.ref }}- + ccache-osx- + - name: Build + run: | + export CCACHE_DIR="$GITHUB_WORKSPACE/ccache" + mkdir -p "$CCACHE_DIR" + make -j 2 -C _build + df -h + - name: Unit-Tests + run: | + pushd _build/tests + all_test -l message + bloom_test -- README.md + ecc_test README.md + hmac_test + task_cancel_test