-
Notifications
You must be signed in to change notification settings - Fork 9
79 lines (70 loc) · 2.46 KB
/
test-featurematrix.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/
# Test all feature combinations on a range of OS platforms
name: Matrix-test
on:
workflow_call:
workflow_dispatch:
env:
RUST_TOOLCHAIN: ${{ vars.RUST_TOOLCHAIN || 'stable' }}
RUSTFLAGS: -Dwarnings
CARGO_TERM_COLOR: always
jobs:
# [impl->req~up-language-ci-test~1]
test-all-features:
name: all feature combinations
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- name: Install cargo-all-features
run: |
cargo install cargo-all-features
- name: Show toolchain information
working-directory: ${{ github.workspace }}
run: |
rustup toolchain list
cargo --version
- name: cargo-check all possible feature combinations
run: |
cargo check-all-features
- name: cargo-test all possible feature combinations
run: |
cargo test-all-features
# Alternative to the full feature matrix tested in the step above - somewhat faster...
# multi-os-nextest:
# runs-on: ${{ matrix.os }}
# env:
# NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macOS-latest]
# feature-flags: ["", "--no-default-features", "--all-features"]
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ env.RUST_TOOLCHAIN }}
# - uses: Swatinem/rust-cache@v2
# - uses: taiki-e/install-action@nextest
# - name: Run cargo nextest
# run: |
# cargo nextest run --message-format libtest-json-plus ${{ matrix.feature-flags }}