reduce matrix #3106
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
push: | |
jobs: | |
coverage: | |
# Don't run duplicate `push` jobs for the repo owner's PRs. | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ${{ matrix.host_os }} | |
env: | |
CC_ENABLE_DEBUG_OUTPUT: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
features: | |
# Enable all the library features so we can measure all the coverage. | |
# Don't enable `slow_tests` and other (test suite) features that are | |
# unuseful, or even counterproductive, for coverage testing. | |
# `slow_tests` is slow and it is running code that is already intended | |
# to be covered without it being enabled. | |
- --features=std | |
# TODO: targets | |
target: | |
- aarch64-apple-darwin # Has assembly | |
- aarch64-unknown-linux-gnu # Has assembly | |
- i686-unknown-linux-gnu # Has assembly | |
mode: | |
- # debug | |
# Coverage collection is Nightly-only | |
rust_channel: | |
- nightly | |
# TODO: targets | |
include: | |
- target: aarch64-apple-darwin | |
host_os: macos-14 | |
# TODO: Use the -musl target after | |
# https://github.com/rust-lang/rust/issues/79556 and | |
# https://github.com/rust-lang/rust/issues/79555 are fixed. | |
- target: aarch64-unknown-linux-gnu | |
host_os: ubuntu-22.04 | |
# TODO: Use the -musl target after | |
# https://github.com/rust-lang/rust/issues/79556 and | |
# https://github.com/rust-lang/rust/issues/79555 are fixed. | |
- target: i686-unknown-linux-gnu | |
host_os: ubuntu-22.04 | |
steps: | |
- if: ${{ contains(matrix.host_os, 'ubuntu') }} | |
run: sudo apt-get update -y | |
- uses: briansmith/actions-checkout@v4 | |
with: | |
persist-credentials: false | |
- run: rustup toolchain add --profile=minimal ${{ matrix.rust_channel }} | |
- run: rustup target add --toolchain=${{ matrix.rust_channel }} ${{ matrix.target }} | |
- if: ${{ !contains(matrix.host_os, 'windows') }} | |
run: RING_COVERAGE=1 mk/install-build-tools.sh --target=${{ matrix.target }} ${{ matrix.features }} | |
- if: ${{ !contains(matrix.host_os, 'windows') }} | |
run: | | |
RING_COVERAGE=1 mk/cargo.sh +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }} | |
- uses: briansmith/codecov-codecov-action@v3 | |
with: | |
directory: ./target/${{ matrix.target }}/debug/coverage/reports | |
fail_ci_if_error: true | |
verbose: true |