Skip to content

Commit 1aac00c

Browse files
authored
Fix targets for release builds and set correct toolchain in CI (#464)
1 parent 71cbb4a commit 1aac00c

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,16 @@ jobs:
6666
- uses: actions/checkout@v2
6767
with:
6868
submodules: true
69-
- uses: actions-rs/toolchain@v1
69+
- if: runner.os == 'macOS'
70+
uses: actions-rs/toolchain@v1
71+
with:
72+
toolchain: 1.63.0
73+
target: aarch64-apple-darwin
74+
default: true
75+
override: true
76+
profile: minimal
77+
- if: runner.os != 'macOS'
78+
uses: actions-rs/toolchain@v1
7079
with:
7180
toolchain: 1.63.0
7281
override: true

.github/workflows/preview-release.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
brew install automake bison
7575
echo "/usr/local/opt/bison/bin:$PATH" >> $GITHUB_PATH
7676
- run: ./script/make_release
77+
env:
78+
TARGET: ${{ matrix.target }}
7779
- uses: actions/upload-artifact@v3
7880
with:
7981
name: rubyfmt-release-artifact-${{ matrix.os }}-${{ matrix.target }}
@@ -109,10 +111,6 @@ jobs:
109111
- uses: actions/download-artifact@v3
110112
with:
111113
name: rubyfmt-release-artifact-ubuntu-20.04-aarch64-unknown-linux-gnu
112-
- run: |
113-
# The arch part of this path is set with uname, but we cross-compile the arm build on
114-
# an x86 machine, so we want to make sure the name is correct for the release
115-
mv rubyfmt-${{ steps.get-latest-tag.outputs.tag }}-Linux-x86_64.tar.gz rubyfmt-${{ steps.get-latest-tag.outputs.tag }}-Linux-aarch64.tar.gz
116114
- uses: actions/download-artifact@v3
117115
with:
118116
name: rubyfmt-release-artifact-ubuntu-20.04-native

script/make_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ case "$target" in
4444
TARGET_AR=aarch64-linux-gnu-ar \
4545
cargo build --release --target aarch64-unknown-linux-gnu
4646

47-
cargo_target_dir_prefix="aarch64-unknown-linux-gnu"
47+
cargo_target_dir_prefix="aarch64-unknown-linux-gnu/"
4848
# This is kind of a hack, since we're assuming we're on a Linux host.
4949
release_tarball_os="Linux"
5050
release_tarball_arch="aarch64"

0 commit comments

Comments
 (0)