Skip to content

Commit 05acb50

Browse files
committed
Update actions workflow
Use self-hosted macOS runner Add timeout Fix issue in package script for macOS
1 parent d501daf commit 05acb50

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/build_and_release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@ jobs:
4040
4141
build-and-release:
4242
needs: prepare
43+
timeout-minutes: 60
4344
runs-on: ${{ matrix.os }}
4445

4546
strategy:
4647
matrix:
4748
os:
49+
# self-hosted ARM macOS runner
50+
- self-hosted
4851
- ubuntu-latest
49-
- macos-latest
5052

5153
steps:
5254
- name: Free Disk Space (Ubuntu)

package.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,17 @@ set -euo pipefail
55
source config.sh
66

77
TOOLCHAIN_DIR=rust/build/$TOOLCHAIN_HOST_TRIPLET/stage2
8-
cp -n rust/build/$TOOLCHAIN_HOST_TRIPLET/stage2-tools-bin/* $TOOLCHAIN_DIR/bin
8+
TOOLS_BIN_DIR=rust/build/$TOOLCHAIN_HOST_TRIPLET/stage2-tools-bin
9+
10+
# Function to copy files, ignoring errors if destination exists
11+
copy_ignore_existing() {
12+
cp "$1" "$2" 2>/dev/null || true
13+
}
14+
15+
# Copy files from stage2-tools-bin to stage2/bin, ignoring if they already exist
16+
for file in "$TOOLS_BIN_DIR"/*; do
17+
copy_ignore_existing "$file" "$TOOLCHAIN_DIR/bin/"
18+
done
19+
20+
# Create tarball
921
tar --exclude lib/rustlib/src --exclude lib/rustlib/rustc-src -hczvf $ARTIFACT_NAME.tar.gz -C $TOOLCHAIN_DIR .

0 commit comments

Comments
 (0)