44# It will also built-in an install script, which can scan it as a rustup toolchain, so
55# that we can manage them easily.
66#
7- # If we can, we will add multiple platform support (e.g. Windows, macOS, Linux)
8- # so that you can do cross-compile by using this toolchain.
9- #
10- # Workflow file by "zhangxuan2011 <zx20110412@outlook.com>"
7+ # Also, we added multiple platform support, so that
8+ # you can do cross-compile on different platforms by using this toolchain.
9+ #
10+ # Supported Platforms:
11+ # - Windows (x86_64, i686)
12+ # - macOS (x86_64, aarch64)
13+ # - Linux (x86_64)
14+ #
15+ # This workflow file was written by "zhangxuan2011 <zx20110412@outlook.com>"
1116
1217---
1318
2227 version :
2328 description : " The version to release, which must start with `v`"
2429 required : true
25- default : " v1.93.0-rust9x "
30+ default : " v1.93.0-0 "
2631
2732permissions :
2833 contents : write
3237
3338jobs :
3439 build :
35- runs-on : ${{ matrix.os }}
40+ runs-on : windows-latest
3641 strategy :
3742 fail-fast : false
3843 matrix :
3944 include :
4045 # Windows, x86_64
41- - os : windows-latest
42- arch : x64
46+ - arch : x64
4347 target : x86_64-pc-windows-msvc
4448 target_short : x86_64-windows
4549
4650 # Windows, i686
47- - os : windows-latest
48- arch : x86
51+ - arch : x86
4952 target : i686-pc-windows-msvc
5053 target_short : i686-windows
5154
55+ # Linux, x86_64
56+ - arch : x64
57+ target : x86_64-unknown-linux-gnu
58+ target_short : x86_64-linux
59+
60+ # macOS, x86_64 (Intel)
61+ - arch : x64
62+ target : x86_64-apple-darwin
63+ target_short : x86_64-macos
64+
65+ # macOS, aarch64 (Apple Silicon)
66+ - arch : arm64
67+ target : aarch64-apple-darwin
68+ target_short : aarch64-macos
69+
5270 defaults :
5371 run :
5472 shell : cmd
@@ -73,15 +91,15 @@ jobs:
7391 set GITHUB_ACTIONS=
7492
7593 :: Build & install in dist/rust9x
76- python x.py install --config bootstrap.rust9x.toml --stage 2
94+ python x.py install --config bootstrap.rust9x.toml --set build.host=${{ matrix.target }} -- stage 2
7795 if %errorlevel% neq 0 exit /b 1
7896
7997 - name : Pack toolchain
8098 run : |
8199 set VERSION=${{ github.ref_name }}
82100 set ARCHIVE_NAME=rust9x-toolchain-%VERSION%-${{ matrix.target_short }}.tar.gz
83101
84- :: Pack everything inside build
102+ :: Pack everything inside dist/rust9x
85103 tar -czvf "%ARCHIVE_NAME%" -C dist/rust9x .
86104
87105 - name : Upload to release
0 commit comments