Skip to content

Commit

Permalink
ci: use the new mac m1 runner
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Feb 3, 2024
1 parent 83fd68c commit be8eb17
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ on:

jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
runner: [macos-latest, macos-14]
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Crystal
env:
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: brew update && brew install openssl crystal
run: brew update && brew install crystal || true
- name: Build the binary
env:
LLVM_CONFIG: /usr/local/opt/llvm@17/bin/llvm-config
run: shards build crystalline --release --no-debug -Dpreview_mt --stats --progress --ignore-crystal-version
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: crystalline_x86_64-apple-darwin
name: crystalline_${{ matrix.runner == 'macos-latest' && 'x86_64' || 'arm64' }}-apple-darwin
path: ./bin/crystalline
linux:
runs-on: ubuntu-latest
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ on:

jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
runner: [macos-latest, macos-14]
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Crystal
env:
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: brew update && brew install openssl crystal
run: brew update && brew install crystal || true
- name: Install dependencies
run: shards install --production --ignore-crystal-version
- name: Build the binary
Expand All @@ -25,7 +28,7 @@ jobs:
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: crystalline_x86_64-apple-darwin
name: crystalline_${{ matrix.runner == 'macos-latest' && 'x86_64' || 'arm64' }}-apple-darwin
path: ./bin/crystalline
linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,7 +74,7 @@ jobs:
asset_path: ./artifacts/crystalline_x86_64-unknown-linux-musl/crystalline.gz
asset_name: crystalline_x86_64-unknown-linux-musl.gz
asset_content_type: application/gzip
- name: Attach macOS binary
- name: Attach macOS x86_64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -80,3 +83,12 @@ jobs:
asset_path: ./artifacts/crystalline_x86_64-apple-darwin/crystalline.gz
asset_name: crystalline_x86_64-apple-darwin.gz
asset_content_type: application/gzip
- name: Attach macOS arm64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/crystalline_arm64-apple-darwin/crystalline.gz
asset_name: crystalline_arm64-apple-darwin.gz
asset_content_type: application/gzip

0 comments on commit be8eb17

Please sign in to comment.