Skip to content

Commit d33c76f

Browse files
committed
ci: adjust powershell steps to stop on error
Apparently this isn't the default :-S At the same time, just switch the shell outright to `pwsh` instead of invoking it just for one command.
1 parent 031fa8f commit d33c76f

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/workflows/artifacts.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ jobs:
2424
uses: dtolnay/rust-toolchain@stable
2525

2626
- name: Install cargo-c
27+
shell: pwsh
2728
env:
2829
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
2930
CARGO_C_FILE: cargo-c-windows-msvc.zip
3031
run: |
32+
$ErrorActionPreference = 'Stop'
3133
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
32-
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
34+
Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force
3335
3436
- name: Build rustls-ffi
3537
run: |

.github/workflows/daily-tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ jobs:
4747
4848
- name: Install cargo-c (Windows)
4949
if: runner.os == 'Windows'
50+
shell: pwsh
5051
env:
5152
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
5253
CARGO_C_FILE: cargo-c-windows-msvc.zip
5354
run: |
55+
$ErrorActionPreference = 'Stop'
5456
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
55-
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
57+
Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force
5658
5759
- name: Setup cmake build
5860
run: |
@@ -103,12 +105,14 @@ jobs:
103105
104106
- name: Install cargo-c (Windows)
105107
if: runner.os == 'Windows'
108+
shell: pwsh
106109
env:
107110
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
108111
CARGO_C_FILE: cargo-c-windows-msvc.zip
109112
run: |
113+
$ErrorActionPreference = 'Stop'
110114
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
111-
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
115+
Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force
112116
113117
- name: Setup cmake build
114118
run: |
@@ -164,12 +168,14 @@ jobs:
164168
unzip cargo-c-macos.zip -d ~/.cargo/bin
165169
- name: Install cargo-c (Windows)
166170
if: matrix.os == 'windows-latest'
171+
shell: pwsh
167172
env:
168173
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
169174
CARGO_C_FILE: cargo-c-windows-msvc.zip
170175
run: |
176+
$ErrorActionPreference = 'Stop'
171177
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
172-
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
178+
Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force
173179
- name: Setup cmake build
174180
run: |
175181
cmake ${{

.github/workflows/test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,14 @@ jobs:
248248

249249
# Note: must use cargo-c 0.10.7+ for dynamic linking support on Windows.
250250
- name: Install cargo-c
251+
shell: pwsh
251252
env:
252253
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
253254
CARGO_C_FILE: cargo-c-windows-msvc.zip
254255
run: |
256+
$ErrorActionPreference = 'Stop'
255257
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
256-
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
258+
Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force
257259
258260
- name: Configure CMake
259261
run: cmake -DCRYPTO_PROVIDER="${{ matrix.crypto }}" -DCERT_COMPRESSION="${{ matrix.cert_compression }}" -DPREFER_POST_QUANTUM="${{ matrix.prefer-pq }}" -DDYN_LINK="${{ matrix.dyn_link }}" -S librustls -B build

0 commit comments

Comments
 (0)