diff options
author | Kenneth Heafield <github@kheafield.com> | 2020-09-17 17:00:40 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2020-09-17 17:00:40 +0300 |
commit | 74839ae4c7604362e765464e8780d959a35d4e7e (patch) | |
tree | 04df7b0798f2410874cbc36e195579002ad4f428 | |
parent | 4fd28bdb16469bf19f269473836c139b35f08376 (diff) |
Mac continuous integration?
-rw-r--r-- | .github/workflows/mac.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml new file mode 100644 index 0000000..d488ea3 --- /dev/null +++ b/.github/workflows/mac.yml @@ -0,0 +1,51 @@ +name: Mac + +on: + push: + branches: master + pull_request: + branches: master + +jobs: + build: + runs-on: macOS-latest + + steps: + - uses: actions/checkout@v2 + - name: Cache Boost + id: cache-boost + uses: actions/cache@v1 + with: + path: boost_1_74_0/installdir + key: ${{ runner.os }}-boost_1_74_0 + - name: Install Boost + if: steps.cache-boost.outputs.cache-hit != 'true' + run: | + PREFIX=$HOME/usr + LIBDIR=$PREFIX/lib + wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_74_0.tar.bz2 + tar xjf boost_1_74_0.tar.bz2 + cd boost_1_74_0 + ./b2 --prefix=$PREFIX --libdir=$LIBDIR --layout=tagged link=static,shared threading=multi,single --with-libraries=program_options,system,thread,unit_test_framework install -j2 + - name: cmake + run: | + PREFIX=$HOME/usr + LIBDIR=$PREFIX/lib + export CPATH=$PREFIX/include${CPATH:+:$CPATH} + export LIBRARY_PATH=$LIBDIR${LIBRARY_PATH:+:$LIBRARY_PATH} + export DYLD_LIBRARY_PATH=$LIBDIR${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} + cmake -E make_directory build + cd build + cmake .. + - name: Compile + working-directory: build + run: | + PREFIX=$HOME/usr + LIBDIR=$PREFIX/lib + export CPATH=$PREFIX/include${CPATH:+:$CPATH} + export LIBRARY_PATH=$LIBDIR${LIBRARY_PATH:+:$LIBRARY_PATH} + export DYLD_LIBRARY_PATH=$LIBDIR${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} + cmake --build . -j2 + - name: Test + working-directory: build + run: ctest -j2 |