File tree Expand file tree Collapse file tree 5 files changed +68
-12
lines changed
Expand file tree Collapse file tree 5 files changed +68
-12
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: "Install Winget"
22description : " Install winget on windows runners since its not installed by default: https://github.com/actions/runner-images/issues/6472"
33inputs :
44 GITHUB_TOKEN :
5- description : ' GitHub token to execute authenticated Github API requests (for higher rate limit)'
5+ description : " GitHub token to execute authenticated Github API requests (for higher rate limit)"
66 required : true
77runs :
88 using : " composite"
4545 Start-Sleep -Seconds 1
4646 }
4747 Write-Output "Winget Version: $(winget --version)"
48+
49+ - name : Install winget Powershell Module
50+ shell : pwsh
51+ run : Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force
Original file line number Diff line number Diff line change 1919 wdk :
2020 - Microsoft.WindowsWDK.10.0.22621 # NI WDK
2121
22+ llvm :
23+ - 17.0.6
24+
2225 rust_toolchain :
2326 - stable
2427 - beta
@@ -41,10 +44,24 @@ jobs:
4144 with :
4245 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4346
47+ - name : Install LLVM ${{ matrix.llvm }}
48+ run : |
49+ if ((Get-WinGetPackage -Id LLVM -Source winget -MatchOption Equals).InstalledVersion -eq '${{ matrix.llvm }}') {
50+ Write-Host "LLVM ${{ matrix.llvm }} is already installed."
51+ } else {
52+ Write-Host "Installing LLVM ${{ matrix.llvm }}..."
53+ Install-WinGetPackage -Id LLVM.LLVM -Version ${{ matrix.llvm }} -Source winget -MatchOption Equals -Mode Silent -Force
54+ }
55+ clang --version
56+
4457 - name : Install WDK (${{ matrix.wdk }})
4558 run : |
46- if (!(winget list --exact --source winget --id ${{ matrix.wdk }})[-1].contains("${{ matrix.wdk }}")) {
47- winget install --disable-interactivity --source winget --exact --id ${{ matrix.wdk }}
59+ if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
60+ Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
61+ Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
62+ } else {
63+ Write-Host "Installing ${{ matrix.wdk }}..."
64+ Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
4865 }
4966
5067 - name : Install Rust Toolchain (${{ matrix.rust_toolchain }})
Original file line number Diff line number Diff line change @@ -17,14 +17,12 @@ jobs:
1717 uses : actions/checkout@v4
1818
1919 - name : Install Rust Toolchain (Nightly)
20- # Need to temporarily pin nightly used for fmt because of upstream bug: https://github.com/rust-lang/rustfmt/issues/6082, https://github.com/rust-lang/rustfmt/issues/6099
21- uses : dtolnay/rust-toolchain@master
20+ uses : dtolnay/rust-toolchain@nightly
2221 with :
23- toolchain : nightly-2024-02-17
2422 components : rustfmt
2523
2624 - name : Run Cargo Format
27- run : cargo +nightly-2024-02-17 fmt --all -- --check
25+ run : cargo +nightly fmt --all -- --check
2826
2927 taplo-fmt :
3028 name : .toml Formatting Check
Original file line number Diff line number Diff line change 77
88name : Docs
99
10+ env :
11+ RUSTDOCFLAGS : -D warnings
12+
1013jobs :
1114 docs :
1215 name : Docs
1619 wdk :
1720 - Microsoft.WindowsWDK.10.0.22621 # NI WDK
1821
22+ llvm :
23+ - 17.0.6
24+
1925 rust_toolchain :
2026 - stable
2127 - beta
@@ -38,10 +44,24 @@ jobs:
3844 with :
3945 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4046
47+ - name : Install LLVM ${{ matrix.llvm }}
48+ run : |
49+ if ((Get-WinGetPackage -Id LLVM -Source winget -MatchOption Equals).InstalledVersion -eq '${{ matrix.llvm }}') {
50+ Write-Host "LLVM ${{ matrix.llvm }} is already installed."
51+ } else {
52+ Write-Host "Installing LLVM ${{ matrix.llvm }}..."
53+ Install-WinGetPackage -Id LLVM.LLVM -Version ${{ matrix.llvm }} -Source winget -MatchOption Equals -Mode Silent -Force
54+ }
55+ clang --version
56+
4157 - name : Install WDK (${{ matrix.wdk }})
4258 run : |
43- if (!(winget list --exact --source winget --id ${{ matrix.wdk }})[-1].contains("${{ matrix.wdk }}")) {
44- winget install --disable-interactivity --source winget --exact --id ${{ matrix.wdk }}
59+ if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
60+ Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
61+ Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
62+ } else {
63+ Write-Host "Installing ${{ matrix.wdk }}..."
64+ Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
4565 }
4666
4767 - name : Install Rust Toolchain (${{ matrix.rust_toolchain }})
Original file line number Diff line number Diff line change 1818 wdk :
1919 - Microsoft.WindowsWDK.10.0.22621 # NI WDK
2020
21+ llvm :
22+ - 17.0.6
23+
2124 rust_toolchain :
2225 - stable
2326 - beta
@@ -40,10 +43,24 @@ jobs:
4043 with :
4144 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4245
46+ - name : Install LLVM ${{ matrix.llvm }}
47+ run : |
48+ if ((Get-WinGetPackage -Id LLVM -Source winget -MatchOption Equals).InstalledVersion -eq '${{ matrix.llvm }}') {
49+ Write-Host "LLVM ${{ matrix.llvm }} is already installed."
50+ } else {
51+ Write-Host "Installing LLVM ${{ matrix.llvm }}..."
52+ Install-WinGetPackage -Id LLVM.LLVM -Version ${{ matrix.llvm }} -Source winget -MatchOption Equals -Mode Silent -Force
53+ }
54+ clang --version
55+
4356 - name : Install WDK (${{ matrix.wdk }})
4457 run : |
45- if (!(winget list --exact --source winget --id ${{ matrix.wdk }})[-1].contains("${{ matrix.wdk }}")) {
46- winget install --disable-interactivity --source winget --exact --id ${{ matrix.wdk }}
58+ if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
59+ Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
60+ Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
61+ } else {
62+ Write-Host "Installing ${{ matrix.wdk }}..."
63+ Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
4764 }
4865
4966 - name : Install Rust Toolchain (${{ matrix.rust_toolchain }})
90107 - name : Install Cargo Udeps
91108 uses : taiki-e/install-action@v2
92109 with :
93- tool : cargo-udeps
110+ tool : cargo-udeps@0.1.48
94111
95112 - name : Run Cargo Udeps
96113 run : cargo +nightly udeps --locked --all-targets
You can’t perform that action at this time.
0 commit comments