diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-11-23 20:51:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-23 20:51:07 +0100 |
| commit | 5974b85665c260a020367b4527613414d2d6c157 (patch) | |
| tree | 8ae1ed4f604122e84139ee5cacd02df29b704ea2 /.github/workflows | |
| parent | 97eea25cb11c8632ea111a0973574c9745a253e4 (diff) | |
| parent | 95fd9665ef38942d4343744ec66339d60e315cac (diff) | |
| download | PROJ-5974b85665c260a020367b4527613414d2d6c157.tar.gz PROJ-5974b85665c260a020367b4527613414d2d6c157.zip | |
Merge pull request #2447 from rouault/gha_osx
CI: move Mac job to GitHub actions with Conda as the base for dependencies
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/mac.yml | 39 | ||||
| -rwxr-xr-x | .github/workflows/mac/before_install.sh | 13 | ||||
| -rwxr-xr-x | .github/workflows/mac/install.sh | 13 |
3 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml new file mode 100644 index 00000000..1ccbd938 --- /dev/null +++ b/.github/workflows/mac.yml @@ -0,0 +1,39 @@ +name: MacOS build + +on: [push, pull_request] + +jobs: + + macos_build: + runs-on: macos-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + + - uses: actions/checkout@v2 + + - uses: conda-incubator/setup-miniconda@v2 + with: + channels: conda-forge + auto-update-conda: true + + - name: Cache + uses: actions/cache@v2 + id: cache + with: + path: ~/.ccache + key: ${{ runner.os }}-cache-mac-${{ github.run_id }} + restore-keys: ${{ runner.os }}-cache-mac- + + - name: Install Requirements + shell: bash -l {0} + run: | + source .github/workflows/mac/before_install.sh + + - name: Build + shell: bash -l {0} + run: | + export TRAVIS_BUILD_DIR=$PWD + source .github/workflows/mac/install.sh + env: + TRAVIS_OS_NAME: osx + BUILD_NAME: osx diff --git a/.github/workflows/mac/before_install.sh b/.github/workflows/mac/before_install.sh new file mode 100755 index 00000000..217039fe --- /dev/null +++ b/.github/workflows/mac/before_install.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + + +conda update -n base -c defaults conda +conda install compilers -y + +conda config --set channel_priority strict +conda install --yes --quiet python=3.8 autoconf automake libtool ccache -y +conda install --yes --quiet proj=7.1.1=h45baca5_3 --only-deps -y + +./travis/before_install_pip.sh diff --git a/.github/workflows/mac/install.sh b/.github/workflows/mac/install.sh new file mode 100755 index 00000000..ed27150f --- /dev/null +++ b/.github/workflows/mac/install.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +export CCACHE_CPP2=yes +export PROJ_DB_CACHE_DIR="$HOME/.ccache" + +ccache -M 200M +ccache -s + +CC="ccache clang" CXX="ccache clang++" CFLAGS="-Werror -O2" CXXFLAGS="-Werror -O2" ./travis/install.sh + +ccache -s |
