Fix modular channels section assignment. #306
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
# Copyright (c) the JPEG XL Project Authors. All rights reserved. | |
# | |
# Use of this source code is governed by a BSD-style | |
# license that can be found in the LICENSE file. | |
# Workflow to run pull-requests specific checks. | |
name: PR | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
# Run source tests: author list, copyright notice and merge conflicts. | |
authors: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Checkout the source | |
uses: actions/checkout@v4 | |
- name: Check AUTHORS file | |
run: | |
./ci/pull_request_checks.sh | |
checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
check: [format, clippy, test] | |
features: [all, default] | |
exclude: | |
# Remove the "format+all" combination, since it is the same as "format+default" | |
- check: format | |
features: all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install latest rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Rust cache | |
uses: Swatinem/[email protected] | |
# format | |
- name: Cargo fmt (check) | |
if: ${{ matrix.check == 'format' }} | |
run: cargo fmt --all -- --check | |
# clippy | |
- name: Clippy with all features | |
if: ${{ matrix.check == 'clippy' && matrix.features == 'all' }} | |
run: cargo clippy --release --all-targets --all-features --tests --all -- -D warnings | |
- name: Clippy with default features | |
if: ${{ matrix.check == 'clippy' && matrix.features == 'default' }} | |
run: cargo clippy --release --all-targets --tests --all -- -D warnings | |
# test | |
- name: Tests with all features | |
if: ${{ matrix.check == 'test' && matrix.features == 'all' }} | |
run: cargo test --release --all --no-fail-fast --all-features | |
- name: Tests with default features | |
if: ${{ matrix.check == 'test' && matrix.features == 'default' }} | |
run: cargo test --release --all --no-fail-fast |