Skip to content

Commit d85502c

Browse files
committed
ci(windows): run cargo all-features
1 parent 0a0c6de commit d85502c

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,14 +1286,17 @@ jobs:
12861286
# nor run on the rust docker images. This permits a smaller workflow without the
12871287
# templating and so on.
12881288
build-all-features: # job-name
1289-
runs-on: ubuntu-latest
1289+
runs-on: ${{ matrix.os }}
12901290
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }}
12911291
strategy:
12921292
fail-fast: false
12931293
matrix:
1294-
# Might add more targets in future.
1295-
target:
1296-
- x86_64-unknown-linux-gnu
1294+
include:
1295+
# Might add more targets in future.
1296+
- os: ubuntu-latest
1297+
target: x86_64-unknown-linux-gnu
1298+
- os: windows-latest
1299+
target: x86_64-pc-windows-msvc
12971300
steps:
12981301
- name: Clone repo
12991302
uses: actions/checkout@v4
@@ -1304,7 +1307,17 @@ jobs:
13041307
with:
13051308
version: "3.x"
13061309
repo-token: ${{ secrets.GITHUB_TOKEN }}
1310+
- name: Install OpenSSL
1311+
if: ${{ contains(matrix.os, 'windows') }}
1312+
run: |
1313+
choco install openssl -y --no-progress
1314+
Get-Command openssl
1315+
openssl version
1316+
echo "OPENSSL_LIB_DIR=C:/Program Files/OpenSSL/lib" >> $env:GITHUB_ENV
1317+
echo "OPENSSL_DIR=C:/Program Files/OpenSSL/" >> $env:GITHUB_ENV
1318+
echo "OPENSSL_INCLUDE_DIR=C:/Program Files/OpenSSL/include" >> $env:GITHUB_ENV
13071319
- name: Set environment variables appropriately for the build
1320+
shell: bash
13081321
run: |
13091322
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
13101323
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
@@ -1314,7 +1327,7 @@ jobs:
13141327
run: cargo install cargo-all-features --git https://github.com/rbtcollins/cargo-all-features.git
13151328
- name: Ensure we have our goal target installed
13161329
run: |
1317-
rustup target install "$TARGET"
1330+
rustup target install ${{ matrix.target }}
13181331
- name: Build every combination
13191332
env:
13201333
RUSTFLAGS: -D warnings

ci/actions-templates/all-features-template.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ jobs: # skip-all
88
# nor run on the rust docker images. This permits a smaller workflow without the
99
# templating and so on.
1010
build-all-features: # job-name
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
1212
if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }}
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
# Might add more targets in future.
17-
target:
18-
- x86_64-unknown-linux-gnu
16+
include:
17+
# Might add more targets in future.
18+
- os: ubuntu-latest
19+
target: x86_64-unknown-linux-gnu
20+
- os: windows-latest
21+
target: x86_64-pc-windows-msvc
1922
steps:
2023
- name: Clone repo
2124
uses: actions/checkout@v4
@@ -26,7 +29,17 @@ jobs: # skip-all
2629
with:
2730
version: "3.x"
2831
repo-token: ${{ secrets.GITHUB_TOKEN }}
32+
- name: Install OpenSSL
33+
if: ${{ contains(matrix.os, 'windows') }}
34+
run: |
35+
choco install openssl -y --no-progress
36+
Get-Command openssl
37+
openssl version
38+
echo "OPENSSL_LIB_DIR=C:/Program Files/OpenSSL/lib" >> $env:GITHUB_ENV
39+
echo "OPENSSL_DIR=C:/Program Files/OpenSSL/" >> $env:GITHUB_ENV
40+
echo "OPENSSL_INCLUDE_DIR=C:/Program Files/OpenSSL/include" >> $env:GITHUB_ENV
2941
- name: Set environment variables appropriately for the build
42+
shell: bash
3043
run: |
3144
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
3245
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
@@ -36,7 +49,7 @@ jobs: # skip-all
3649
run: cargo install cargo-all-features --git https://github.com/rbtcollins/cargo-all-features.git
3750
- name: Ensure we have our goal target installed
3851
run: |
39-
rustup target install "$TARGET"
52+
rustup target install ${{ matrix.target }}
4053
- name: Build every combination
4154
env:
4255
RUSTFLAGS: -D warnings

0 commit comments

Comments
 (0)