Skip to content

Commit

Permalink
Test different runner OS versions in CI (#185)
Browse files Browse the repository at this point in the history
## Description

This extends the CI matrix to test all supported runner OS versions in
build.
  • Loading branch information
sgoll authored Dec 13, 2024
1 parent 03e7815 commit f134f31
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 26 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/latest-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ env:
jobs:
run:
strategy:
fail-fast: false # don't give up on the whole matrix if one variant fails
# Don't give up on the whole matrix if one variant fails.
fail-fast: false
matrix:
# Keep list of targets in sync with `test.yaml`.
# Keep target archs in sync with `test.yaml`. Use latest versions of
# runner OS here and supported ones in `test.yaml`.
include:
- target: aarch64-apple-darwin
runner_os: macos-latest
Expand Down Expand Up @@ -76,7 +78,7 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
# The cache should not be shared between different workflows, jobs, and targets.
shared-key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.target }}
shared-key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.target }}-${{ matrix.runner_os }}

- name: Update Rust to latest version
run: >-
Expand Down
46 changes: 37 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,50 @@ env:
jobs:
run:
strategy:
fail-fast: false # don't give up on the whole matrix if one variant fails
# Don't give up on the whole matrix if one variant fails.
fail-fast: false
matrix:
# Keep list of targets in sync with `latest-dependencies.yaml`.
# Keep targets archs in sync with `latest-dependencies.yaml`. Use
# specific versions of runner OS here and latest ones in
# `latest-dependencies.yaml`.
include:
- target: aarch64-apple-darwin
runner_os: macos-latest
runner_os: macos-14
- target: aarch64-apple-darwin
runner_os: macos-15

- target: armv7-unknown-linux-gnueabihf
runner_os: ubuntu-20.04
- target: armv7-unknown-linux-gnueabihf
runner_os: ubuntu-22.04
- target: armv7-unknown-linux-gnueabihf
runner_os: ubuntu-latest
runner_os: ubuntu-24.04

- target: x86_64-apple-darwin
runner_os: macos-13
- target: x86_64-apple-darwin
runner_os: macos-latest
runner_os: macos-14
- target: x86_64-apple-darwin
runner_os: macos-15

- target: x86_64-pc-windows-msvc
runner_os: windows-latest
runner_os: windows-2019
- target: x86_64-pc-windows-msvc
runner_os: windows-2022

- target: x86_64-unknown-linux-gnu
runner_os: ubuntu-20.04
- target: x86_64-unknown-linux-gnu
runner_os: ubuntu-22.04
- target: x86_64-unknown-linux-gnu
runner_os: ubuntu-latest
runner_os: ubuntu-24.04

- target: x86_64-unknown-linux-musl
runner_os: ubuntu-20.04
- target: x86_64-unknown-linux-musl
runner_os: ubuntu-22.04
- target: x86_64-unknown-linux-musl
runner_os: ubuntu-latest
runner_os: ubuntu-24.04

runs-on: ${{ matrix.runner_os }}

Expand Down Expand Up @@ -74,7 +102,7 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
# The cache should not be shared between different workflows, jobs, and targets.
shared-key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.target }}
shared-key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.target }}-${{ matrix.runner_os }}

- name: Build with feature combinations
run: >-
Expand Down
17 changes: 4 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ futures-channel = "0.3.30"
futures-core = { version = "0.3.30", default-features = false }
futures-util = { version = "0.3.30", default-features = false }
log = "0.4.20"
open62541-sys = "0.4.8"
open62541-sys = "0.4.9"
paste = "1.0.14"
serde = { version = "1.0.194", optional = true }
serde_json = { version = "1.0.111", optional = true }
Expand Down

0 comments on commit f134f31

Please sign in to comment.