From 6c6fd5ab8424e180266878b99b591e76db3ff000 Mon Sep 17 00:00:00 2001 From: Max Fierke Date: Sun, 28 Apr 2024 17:23:13 -0500 Subject: [PATCH] Update actions for macos-14-arm64 runners --- .github/workflows/ci.yml | 7 ++++-- .github/workflows/provision.yml | 12 ++++++--- .github/workflows/release.yml | 43 ++++++++++++++++++--------------- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f024cca..da94988 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/.github/workflows/provision.yml b/.github/workflows/provision.yml index 9ffa042..94d6f06 100644 --- a/.github/workflows/provision.yml +++ b/.github/workflows/provision.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dd9dd9..a541608 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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