|
19 | 19 | PUBLIC_SIMICS_ISPM_VERSION: "1.8.3" |
20 | 20 | MINGW_URL: "https://github.com/brechtsanders/winlibs_mingw/releases/download/13.2.0-16.0.6-11.0.0-ucrt-r1/winlibs-x86_64-posix-seh-gcc-13.2.0-llvm-16.0.6-mingw-w64ucrt-11.0.0-r1.7z" |
21 | 21 | MINGW_VERSION: "13.2.0-16.0.6-11.0.0-ucrt-r1" |
22 | | - RUST_NIGHTLY_VERSION: "2025-02-28" |
23 | 22 |
|
24 | 23 | permissions: |
25 | 24 | contents: read |
@@ -472,9 +471,6 @@ jobs: |
472 | 471 | chmod -R 0755 tests/rsrc/ |
473 | 472 |
|
474 | 473 | - uses: dtolnay/rust-toolchain@83bdede770b06329615974cf8c786f845d824dfb # nightly |
475 | | - with: |
476 | | - toolchain: nightly-${{ env.RUST_NIGHTLY_VERSION }} |
477 | | - components: rustfmt,clippy,miri |
478 | 474 |
|
479 | 475 | - name: Cache SIMICS Dependencies |
480 | 476 | id: cache-simics-packages |
@@ -579,7 +575,7 @@ jobs: |
579 | 575 | echo "Downloading Rustup" |
580 | 576 | Invoke-WebRequest -URI https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe |
581 | 577 | echo "Installing Rust" |
582 | | - C:\rustup-init.exe --default-toolchain nightly-${{ env.RUST_NIGHTLY_VERSION }} --default-host x86_64-pc-windows-gnu -y |
| 578 | + C:\rustup-init.exe --default-host x86_64-pc-windows-gnu --default-toolchain none |
583 | 579 |
|
584 | 580 | - name: Cache SIMICS |
585 | 581 | id: cache-simics-packages-windows |
@@ -653,10 +649,33 @@ jobs: |
653 | 649 | path: .github/builder/rsrc |
654 | 650 | key: "cache-builder-dependencies-${{ hashFiles('.github/builder/common.sh') }}" |
655 | 651 |
|
| 652 | + # tomllib is available in Python 3.11 and later |
| 653 | + - name: Set up Python 3.11 |
| 654 | + uses: actions/setup-python@v5 |
| 655 | + with: |
| 656 | + python-version: '3.11' |
| 657 | + |
| 658 | + - name: Extract Rust channel from rust-toolchain.toml |
| 659 | + id: rust-channel |
| 660 | + shell: python3 {0} |
| 661 | + run: | |
| 662 | + import tomllib |
| 663 | + import os |
| 664 | +
|
| 665 | + with open('rust-toolchain.toml', 'rb') as f: |
| 666 | + data = tomllib.load(f) |
| 667 | + channel = data['toolchain']['channel'] |
| 668 | + date = channel.split("nightly-")[1] |
| 669 | +
|
| 670 | + with open(os.environ['GITHUB_OUTPUT'], 'a') as out: |
| 671 | + out.write(f'nightly_date={date}\n') |
| 672 | +
|
656 | 673 | # NOTE: This script only downloads the builder dependencies if they do not already exist, |
657 | 674 | # but it always verifies them. |
658 | 675 | - name: Build Distribution Package |
659 | 676 | run: | |
| 677 | + RUST_NIGHTLY_DATE="${{ steps.rust-channel.outputs.nightly_date }}" |
| 678 | + export RUST_NIGHTLY_DATE |
660 | 679 | ./scripts/build.sh |
661 | 680 |
|
662 | 681 | - name: Upload Distribution Package |
|
0 commit comments