Skip to content

Commit

Permalink
Merge pull request #82 from elbywan/m1-runner
Browse files Browse the repository at this point in the history
ci: use the new mac m1 runner
  • Loading branch information
elbywan committed Feb 3, 2024
2 parents 83fd68c + acf205d commit b06b679
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
15 changes: 9 additions & 6 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
run: |
export LLVM_CONFIG="$(brew --prefix)/opt/llvm@17/bin/llvm-config"
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
26 changes: 19 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@ 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
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
run: |
export LLVM_CONFIG="$(brew --prefix)/opt/llvm@17/bin/llvm-config"
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 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 b06b679

Please sign in to comment.