From 60792e19305faef62800153a4b33f3aafaa591aa Mon Sep 17 00:00:00 2001 From: Reese Williams Date: Sun, 3 Mar 2024 19:59:44 +0000 Subject: [PATCH] Fix targets for release builds and set correct toolchain in CI --- .github/workflows/ci.yml | 11 ++++++++++- .github/workflows/preview-release.yaml | 6 ++---- script/make_release | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8db8a75f..65586b19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,16 @@ jobs: - uses: actions/checkout@v2 with: submodules: true - - uses: actions-rs/toolchain@v1 + - if: runner.os == 'macOS' + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.63.0 + target: aarch64-apple-darwin + default: true + override: true + profile: minimal + - if: runner.os != 'macOS' + uses: actions-rs/toolchain@v1 with: toolchain: 1.63.0 override: true diff --git a/.github/workflows/preview-release.yaml b/.github/workflows/preview-release.yaml index 3eaa5b19..b3dd1c45 100644 --- a/.github/workflows/preview-release.yaml +++ b/.github/workflows/preview-release.yaml @@ -74,6 +74,8 @@ jobs: brew install automake bison echo "/usr/local/opt/bison/bin:$PATH" >> $GITHUB_PATH - run: ./script/make_release + env: + TARGET: ${{ matrix.target }} - uses: actions/upload-artifact@v3 with: name: rubyfmt-release-artifact-${{ matrix.os }}-${{ matrix.target }} @@ -109,10 +111,6 @@ jobs: - uses: actions/download-artifact@v3 with: name: rubyfmt-release-artifact-ubuntu-20.04-aarch64-unknown-linux-gnu - - run: | - # The arch part of this path is set with uname, but we cross-compile the arm build on - # an x86 machine, so we want to make sure the name is correct for the release - mv rubyfmt-${{ steps.get-latest-tag.outputs.tag }}-Linux-x86_64.tar.gz rubyfmt-${{ steps.get-latest-tag.outputs.tag }}-Linux-aarch64.tar.gz - uses: actions/download-artifact@v3 with: name: rubyfmt-release-artifact-ubuntu-20.04-native diff --git a/script/make_release b/script/make_release index 9234bfb7..2ac41ef8 100755 --- a/script/make_release +++ b/script/make_release @@ -44,7 +44,7 @@ case "$target" in TARGET_AR=aarch64-linux-gnu-ar \ cargo build --release --target aarch64-unknown-linux-gnu - cargo_target_dir_prefix="aarch64-unknown-linux-gnu" + cargo_target_dir_prefix="aarch64-unknown-linux-gnu/" # This is kind of a hack, since we're assuming we're on a Linux host. release_tarball_os="Linux" release_tarball_arch="aarch64"