From b0c301ec412be6cc768215c648e290098e2123c3 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 31 Mar 2023 10:02:05 -0500 Subject: [PATCH 1/3] Enable aarch64-macos releases --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fa34e1f3328..74ab8be0fda2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,12 +86,12 @@ jobs: target: x86_64-pc-windows-msvc cross: false # 23.03: build issues - # - build: aarch64-macos - # os: macos-latest - # rust: stable - # target: aarch64-apple-darwin - # cross: false - # skip_tests: true # x86_64 host can't run aarch64 code + - build: aarch64-macos + os: macos-latest + rust: stable + target: aarch64-apple-darwin + cross: false + skip_tests: true # x86_64 host can't run aarch64 code # - build: x86_64-win-gnu # os: windows-2019 # rust: stable-x86_64-gnu From c7e296b2c913f74b1f7077d8b1d899a5507812f9 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 31 Mar 2023 10:05:52 -0500 Subject: [PATCH 2/3] Remove the rust-toolchain.toml file before building the release The 'dtolnay/rust-toolchain' action ignores the rust-toolchain.toml file, but the installed 'cargo' respects it. This can create a version mismatch if the MSRV is different from the stable rust version. Any additional targets installed by rustup like aarch64-darwin might not be installed for the correct version. To fix this, we remove the rust-toolchain.toml file before calling 'cargo'. --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74ab8be0fda2..b26daca85917 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,6 +114,12 @@ jobs: mkdir -p runtime/grammars/sources tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources + # The rust-toolchain action ignores rust-toolchain.toml files. + # Removing this before building with cargo ensures that the rust-toolchain + # is considered the same between installation and usage. + - name: Remove the rust-toolchain.toml file + run: rm rust-toolchain.toml + - name: Install ${{ matrix.rust }} toolchain uses: dtolnay/rust-toolchain@master with: From cba7ecd6ae6d0bbad608183986d61fee8e96576b Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 31 Mar 2023 14:02:53 -0500 Subject: [PATCH 3/3] Recursive create the pkgname directory when creating a release tarball This step without the '-p' works fine for regular releases but it can fail if the CI is running when this file changes or on a branch matching 'patch/ci-release-*'. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b26daca85917..b509ff9e0b2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -255,7 +255,7 @@ jobs: exe=".exe" fi pkgname=helix-$GITHUB_REF_NAME-$platform - mkdir $pkgname + mkdir -p $pkgname cp $source/LICENSE $source/README.md $pkgname mkdir $pkgname/contrib cp -r $source/contrib/completion $pkgname/contrib