From 3b488d93efae57c936a9579235e99527885789d0 Mon Sep 17 00:00:00 2001 From: Zafer Esen Date: Thu, 19 Sep 2024 16:33:39 +0200 Subject: [PATCH] Download tri-pp in CI and add macOS --- .github/workflows/scala.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 7a12158..f2646f6 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -2,23 +2,49 @@ name: Scala CI on: push: - branches: [ master ] + branches: + - master + - mac-ci pull_request: - branches: [ master ] + branches: + - master + - mac-ci jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-20.04, macos-13] + fail-fast: true # keep running other os on fail? steps: - uses: actions/checkout@v2 + - name: Set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' + + - name: Download tri-pp binary + run: | + if [[ "$RUNNER_OS" == "Linux" ]]; then + wget https://github.com/zafer-esen/tri-pp/releases/download/v0.1.4/tri-pp-ubuntu-20.04 -O tri-pp + elif [[ "$RUNNER_OS" == "macOS" ]]; then + wget https://github.com/zafer-esen/tri-pp/releases/download/v0.1.4/tri-pp-macos-13 -O tri-pp + xattr -d com.apple.quarantine tri-pp || true + fi + chmod +x tri-pp + + - name: Install sbt on macOS + if: runner.os == 'macOS' + run: brew install sbt + - name: Build run: sbt assembly + - name: Test run: cd regression-tests; export TERM=xterm; ./runalldirs