Skip to content

Commit

Permalink
Experiment new macOs runners (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas committed Jan 4, 2024
1 parent 906a622 commit 7cf3dc5
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit 7cf3dc5

Please sign in to comment.