Skip to content

Commit 1c2924a

Browse files
authored
Auto merge of #343 - sagudev:uwp-ci, r=jdm
use dtolnay/rust-toolchain for UWP toolchain optimizes Windows workflows and hopefully bypasses `rustup` problems from #342.
2 parents f84c114 + fbfca2f commit 1c2924a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@ jobs:
7373
.\install.ps1 -RunAsAdmin
7474
scoop install [email protected] --global
7575
echo "C:\ProgramData\scoop\shims;C:\Users\runneradmin\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
76-
- uses: dtolnay/[email protected]
76+
- uses: dtolnay/rust-toolchain@stable
77+
if: (!contains(matrix.target, 'uwp'))
78+
- uses: dtolnay/rust-toolchain@master
79+
if: contains(matrix.target, 'uwp')
80+
with:
81+
toolchain: "nightly-2023-02-02"
82+
components: rust-src
7783
- name: Build uwp
7884
if: contains(matrix.target, 'uwp')
7985
shell: cmd
8086
env:
81-
TOOLCHAIN: nightly-2023-02-02
8287
MOZTOOLS_PATH: 'C:\mozilla-build\msys\bin;C:\mozilla-build\bin'
8388
AUTOCONF: "C:/mozilla-build/msys/local/bin/autoconf-2.13"
8489
LINKER: "lld-link.exe"
@@ -88,11 +93,8 @@ jobs:
8893
PYTHON3: "C:\\mozilla-build\\python3\\python3.exe"
8994
LIBCLANG_PATH: "C:\\ProgramData\\scoop\\apps\\llvm\\current\\lib"
9095
run: |
91-
rustup install ${{ env.TOOLCHAIN }}
92-
rustup default ${{ env.TOOLCHAIN }}
93-
rustup component add rust-src --toolchain ${{ env.TOOLCHAIN }}-x86_64-pc-windows-msvc
9496
rustc --version --verbose
95-
cargo +${{ env.TOOLCHAIN }} build --verbose ${{ matrix.features }} -Z build-std=std,panic_abort --target ${{ matrix.target }}
97+
cargo build --verbose ${{ matrix.features }} -Z build-std=std,panic_abort --target ${{ matrix.target }}
9698
- name: Build Windows
9799
if: contains(matrix.target, 'uwp') != true
98100
shell: cmd

0 commit comments

Comments
 (0)