From c0651adcea80853dd257c18b723c31eee260b2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Mon, 19 Dec 2022 18:49:07 +0100 Subject: [PATCH] CI: add macOS workflow with LLVM 9 --- .github/workflows/macos.yml | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 00000000..f67e28db --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,62 @@ +--- +name: macOS CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + ubuntu: + name: "macOS (llvm: ${{matrix.llvm}}, build: ${{matrix.build}})" + strategy: + fail-fast: false + matrix: + llvm: [9] + build: ['RelWithDebInfo', 'Debug'] + + runs-on: macos-latest + env: + CC: clang + CXX: clang++ + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: true + + - name: Install dependencies + run: brew install ccache llvm@${{matrix.llvm}} z3 + + - name: Set environment + id: env + run: | + echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + echo "CCACHE_DIR=$GITHUB_WORKSPACE/.ccache" >> $GITHUB_ENV + echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV + echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV + echo "CCACHE_MAXSIZE=400M" >> $GITHUB_ENV + + echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH + + echo "::set-output name=timestamp::$(date -u +%Y-%m-%dT%H:%M:%S%z)" + + - name: Set up ccache + uses: actions/cache@v3 + with: + path: .ccache + key: macos-${{matrix.llvm}}-${{matrix.build}}-${{steps.env.outputs.timestamp}} + restore-keys: macos-${{matrix.llvm}}-${{matrix.build}} + + - name: Build Symbiotic + run: | + ./system-build.sh -j"$(sysctl -n hw.logicalcpu)" build-type=${{matrix.build}} \ + llvm-config="$("$(brew --prefix llvm@${{matrix.llvm}})/bin/llvm-config" --cmakedir)" + + - name: Run tests + run: make -C tests + + - name: ccache statistics + run: ccache -s