Experiment new macOs ARM64 runners #1124
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: [push, pull_request] | |
jobs: | |
checks: | |
name: Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: "graalvm-community" | |
version: "latest" | |
java-version: "21" | |
components: "native-image" | |
cache: "sbt" | |
- run: sbt scalafmtCheckAll scalafmtSbtCheck | |
build: | |
name: Build | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest-xlarge"] | |
fail-fast: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: "graalvm-community" | |
version: "latest" | |
java-version: "21" | |
components: "native-image" | |
cache: "sbt" | |
- if: ${{ matrix.os == 'macos-latest-xlarge' }} | |
run: curl -fL https://github.com/VirtusLab/coursier-m1/releases/latest/download/cs-aarch64-apple-darwin.gz | \ | |
gzip -d > cs && \ | |
chmod +x cs && \ | |
(xattr -d com.apple.quarantine cs || true) && \ | |
./cs setup -y && \ | |
echo "~/Library/Application Support/Coursier/bin" >> $GITHUB_PATH | |
- run: sbt test graalvm-native-image:packageBin | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tfr-${{ runner.os }} | |
path: modules/cli/target/graalvm-native-image/tfr | |
release: | |
name: Release | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest-xlarge"] | |
fail-fast: true | |
runs-on: ${{ matrix.os }} | |
needs: [build, checks] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- id: get_version | |
run: | | |
echo ${GITHUB_REF/refs\/tags\//} | |
echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: tfr-${{ runner.os }} | |
- run: zip -j tfr-${{ runner.os }}-${{ steps.get_version.outputs.version }}.zip tfr | |
- id: upload-release-asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: tfr-${{ runner.os }}-${{ steps.get_version.outputs.version }}.zip |