From 7cf3dc5b2dcabc403dc4fadc2aef774a5073ac70 Mon Sep 17 00:00:00 2001 From: Filipe Regadas Date: Thu, 4 Jan 2024 22:44:29 +0000 Subject: [PATCH] Experiment new macOs runners (#523) --- .github/workflows/main.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 804d551..76df239 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: name: Build strategy: matrix: - os: ["ubuntu-latest", "macos-latest"] + os: ["ubuntu-latest", "macos-latest", "macos-latest-xlarge"] fail-fast: true runs-on: ${{ matrix.os }} steps: @@ -31,18 +31,19 @@ jobs: java-version: "21" components: "native-image" cache: "sbt" + - name: Install Sbt (New MacOs ARM64 Runner doesn't have it) + 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 + - run: cp modules/cli/target/graalvm-native-image/tfr tfr-${{ runner.os }}-${{ runner.arch }} - uses: actions/upload-artifact@v4 with: - name: tfr-${{ runner.os }} - path: modules/cli/target/graalvm-native-image/tfr + name: tfr-${{ runner.os }}-${{ runner.arch }} + path: tfr-${{ runner.os }}-${{ runner.arch }} + retention-days: 1 release: name: Release - strategy: - matrix: - os: ["ubuntu-latest", "macos-latest"] - fail-fast: true - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest needs: [build, checks] if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: @@ -51,10 +52,13 @@ jobs: 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 + - run: zip -j tfr-Linux-X64-${{ steps.get_version.outputs.version }}.zip tfr-Linux-X64 + - run: zip -j tfr-macOs-X64-${{ steps.get_version.outputs.version }}.zip tfr-macOs-X64 + - run: zip -j tfr-macOs-ARM64-${{ steps.get_version.outputs.version }}.zip tfr-macOs-ARM64 + - id: upload-release-assets uses: softprops/action-gh-release@v1 with: - files: tfr-${{ runner.os }}-${{ steps.get_version.outputs.version }}.zip + files: | + tfr-Linux-X64-${{ steps.get_version.outputs.version }}.zip + tfr-macOs-X64-${{ steps.get_version.outputs.version }}.zip + tfr-macOs-ARM64-${{ steps.get_version.outputs.version }}.zip