Skip to content

Commit 7d2aaef

Browse files
ci: Install FIPS prerequisites when testing 'pavex' with the 'fips' feature enabled
1 parent ffb897e commit 7d2aaef

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,17 @@ jobs:
795795
rustflags: ""
796796
cache-workspaces: "./libs -> ./target"
797797
- uses: taiki-e/install-action@cargo-hack
798+
- name: Install NASM for aws-lc-rs on Windows
799+
if: runner.os == 'Windows'
800+
uses: ilammy/setup-nasm@v1
801+
- name: Install ninja-build tool for aws-lc-fips-sys on Windows
802+
if: runner.os == 'Windows'
803+
uses: seanmiddleditch/gha-setup-ninja@v6
804+
- name: Install golang for aws-lc-fips-sys on macos
805+
if: runner.os == 'MacOS'
806+
uses: actions/setup-go@v6
807+
with:
808+
go-version: "1.25.0"
798809
- name: Download pavex CLI artifact
799810
uses: actions/download-artifact@v4
800811
with:
@@ -820,8 +831,16 @@ jobs:
820831
pavexc self setup
821832
- name: Run Pavex tests with multiple feature combinations
822833
working-directory: libs
834+
if: runner.os != 'Windows'
823835
run: |
824836
cargo hack -p pavex --feature-powerset --depth 2 test --tests
837+
- name: Run Pavex tests with multiple feature combinations
838+
working-directory: libs
839+
if: runner.os == 'Windows'
840+
run: |
841+
# FIPS only builds in `release` mode on Windows
842+
cargo hack -p pavex --feature-powerset --exclude-features="fips" --depth 2 test --tests
843+
cargo test -p pavex --release --tests --features fips,tls_crypto_provider_aws_lc_rs
825844
- uses: ./.github/actions/finalize-check
826845
if: ${{ always() && github.event_name != 'push' }}
827846
with:
@@ -1114,6 +1133,17 @@ jobs:
11141133
rustflags: ""
11151134
cache-workspaces: "./libs -> ./target"
11161135
- uses: taiki-e/install-action@cargo-hack
1136+
- name: Install NASM for aws-lc-rs on Windows
1137+
if: runner.os == 'Windows'
1138+
uses: ilammy/setup-nasm@v1
1139+
- name: Install ninja-build tool for aws-lc-fips-sys on Windows
1140+
if: runner.os == 'Windows'
1141+
uses: seanmiddleditch/gha-setup-ninja@v6
1142+
- name: Install golang for aws-lc-fips-sys on macos
1143+
if: runner.os == 'MacOS'
1144+
uses: actions/setup-go@v6
1145+
with:
1146+
go-version: "1.25.0"
11171147
- name: Download pavex CLI artifact
11181148
uses: actions/download-artifact@v4
11191149
with:
@@ -1139,8 +1169,16 @@ jobs:
11391169
pavexc self setup
11401170
- name: Run Pavex tests with multiple feature combinations
11411171
working-directory: libs
1172+
if: runner.os != 'Windows'
11421173
run: |
11431174
cargo hack -p pavex --feature-powerset --depth 2 test --tests
1175+
- name: Run Pavex tests with multiple feature combinations
1176+
working-directory: libs
1177+
if: runner.os == 'Windows'
1178+
run: |
1179+
# FIPS only builds in `release` mode on Windows
1180+
cargo hack -p pavex --feature-powerset --exclude-features="fips" --depth 2 test --tests
1181+
cargo test -p pavex --release --tests --features fips,tls_crypto_provider_aws_lc_rs
11441182
- uses: ./.github/actions/finalize-check
11451183
if: ${{ always() && github.event_name != 'push' }}
11461184
with:
@@ -1427,6 +1465,17 @@ jobs:
14271465
rustflags: ""
14281466
cache-workspaces: "./libs -> ./target"
14291467
- uses: taiki-e/install-action@cargo-hack
1468+
- name: Install NASM for aws-lc-rs on Windows
1469+
if: runner.os == 'Windows'
1470+
uses: ilammy/setup-nasm@v1
1471+
- name: Install ninja-build tool for aws-lc-fips-sys on Windows
1472+
if: runner.os == 'Windows'
1473+
uses: seanmiddleditch/gha-setup-ninja@v6
1474+
- name: Install golang for aws-lc-fips-sys on macos
1475+
if: runner.os == 'MacOS'
1476+
uses: actions/setup-go@v6
1477+
with:
1478+
go-version: "1.25.0"
14301479
- name: Download pavex CLI artifact
14311480
uses: actions/download-artifact@v4
14321481
with:
@@ -1446,8 +1495,16 @@ jobs:
14461495
pavexc self setup
14471496
- name: Run Pavex tests with multiple feature combinations
14481497
working-directory: libs
1498+
if: runner.os != 'Windows'
14491499
run: |
14501500
cargo hack -p pavex --feature-powerset --depth 2 test --tests
1501+
- name: Run Pavex tests with multiple feature combinations
1502+
working-directory: libs
1503+
if: runner.os == 'Windows'
1504+
run: |
1505+
# FIPS only builds in `release` mode on Windows
1506+
cargo hack -p pavex --feature-powerset --exclude-features="fips" --depth 2 test --tests
1507+
cargo test -p pavex --release --tests --features fips,tls_crypto_provider_aws_lc_rs
14511508
- uses: ./.github/actions/finalize-check
14521509
if: ${{ always() && github.event_name != 'push' }}
14531510
with:

ci_utils/templates/job_steps/pavex_tests.jinja

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,28 @@
77
rustflags: ""
88
cache-workspaces: "./libs -> ./target"
99
- uses: taiki-e/install-action@cargo-hack
10+
- name: Install NASM for aws-lc-rs on Windows
11+
if: runner.os == 'Windows'
12+
uses: ilammy/setup-nasm@v1
13+
- name: Install ninja-build tool for aws-lc-fips-sys on Windows
14+
if: runner.os == 'Windows'
15+
uses: seanmiddleditch/gha-setup-ninja@v6
16+
- name: Install golang for aws-lc-fips-sys on macos
17+
if: runner.os == 'MacOS'
18+
uses: actions/setup-go@v6
19+
with:
20+
go-version: "1.25.0"
1021
<% include 'setup_pavex' %>
1122
- name: Run Pavex tests with multiple feature combinations
1223
working-directory: libs
24+
if: runner.os != 'Windows'
1325
run: |
1426
cargo hack -p pavex --feature-powerset --depth 2 test --tests
27+
- name: Run Pavex tests with multiple feature combinations
28+
working-directory: libs
29+
if: runner.os == 'Windows'
30+
run: |
31+
# FIPS only builds in `release` mode on Windows
32+
cargo hack -p pavex --feature-powerset --exclude-features="fips" --depth 2 test --tests
33+
cargo test -p pavex --release --tests --features fips,tls_crypto_provider_aws_lc_rs
1534
<%- endblock %>

0 commit comments

Comments
 (0)