Skip to content

Commit

Permalink
Update actions for macos-14-arm64 runners
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierke committed Apr 28, 2024
1 parent 14d1429 commit 6c6fd5a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 25 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Homebrew to install from API
run: echo HOMEBREW_NO_INSTALL_FROM_API= >> "$GITHUB_ENV"

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
Expand All @@ -33,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Add Crystal repos
run: curl -sSL https://crystal-lang.org/install.sh | sudo bash
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ on:

jobs:
macos-provision:
runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
Expand All @@ -34,13 +34,17 @@ jobs:

# Based on https://raw.githubusercontent.com/MikeMcQuaid/strap/master/.github/workflows/tests.yml

- name: Set up Homebrew to install from API
run: echo HOMEBREW_NO_INSTALL_FROM_API= >> "$GITHUB_ENV"

- name: Run brew bot's cleanup
run: brew test-bot --only-cleanup-before

- name: Make macOS like new
run: |
sudo rm -rf /usr/local/bin/brew /usr/local/.??* \
/usr/local/Homebrew /usr/local/Caskroom \
/usr/local/Homebrew /opt/homebrew \
/usr/local/Caskroom \
/Library/Developer/CommandLineTools
- name: Run mstrap
Expand Down Expand Up @@ -77,7 +81,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Add Crystal repos
run: curl -sSL https://crystal-lang.org/install.sh | sudo bash
Expand Down
43 changes: 24 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Add Crystal repos
run: curl -sSL https://crystal-lang.org/install.sh | sudo bash
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
LD_FOR_BUILD: lld

- name: Upload release bundle artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mstrap_linux_amd64
path: dist
Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Add Crystal repos
run: curl -sSL https://crystal-lang.org/install.sh | sudo bash
Expand All @@ -77,16 +77,19 @@ jobs:
make release RELEASE=1 STATIC=1 TARGET_ARCH=aarch64 TARGET_CABI=musl
- name: Upload release bundle artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mstrap_linux_aarch64
path: dist

build_macos_amd64:
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Homebrew to install from API
run: echo HOMEBREW_NO_INSTALL_FROM_API= >> "$GITHUB_ENV"

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
Expand All @@ -113,22 +116,25 @@ jobs:
mstrap
- name: Build signed & notorized release bundle
run: make release RELEASE=1 STATIC=1
run: make release RELEASE=1 STATIC=1 TARGET_ARCH=x86_64

- name: Smoke test the codesigned release
run: bin/mstrap --help

- name: Upload release bundle artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mstrap_macos_amd64
path: dist

build_macos_arm64:
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Homebrew to install from API
run: echo HOMEBREW_NO_INSTALL_FROM_API= >> "$GITHUB_ENV"

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
Expand Down Expand Up @@ -157,12 +163,11 @@ jobs:
- name: Build signed & notorized release bundle
run: make release RELEASE=1 STATIC=1 TARGET_ARCH=arm64

# Re-enable after macos-latest is on Apple Silicon
# - name: Smoke test the codesigned release
# run: bin/mstrap --help
- name: Smoke test the codesigned release
run: bin/mstrap --help

- name: Upload release bundle artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mstrap_macos_arm64
path: dist
Expand All @@ -179,35 +184,35 @@ jobs:

- name: Download mstrap_linux_amd64 artifacts
id: download_linux_amd64
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: mstrap_linux_amd64
path: dist-linux-amd64

- name: Download mstrap_linux_aarch64 artifacts
id: download_linux_aarch64
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: mstrap_linux_aarch64
path: dist-linux-aarch64

- name: Download mstrap_macos_amd64 artifacts
id: download_macos_amd64
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: mstrap_macos_amd64
path: dist-macos-amd64

- name: Download mstrap_macos_arm64 artifacts
id: download_macos_arm64
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: mstrap_macos_arm64
path: dist-macos-arm64

- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
Expand Down

0 comments on commit 6c6fd5a

Please sign in to comment.