fedora CI #912
This file contains hidden or 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: Build | |
| on: | |
| schedule: | |
| - cron: "0 0 1 * *" # First day of every month | |
| push: | |
| paths-ignore: | |
| - changelog | |
| branches-ignore: | |
| - main | |
| workflow_dispatch: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| RUSTDOCFLAGS: "--deny warnings" | |
| MINIMUM_SUPPORTED_RUST_VERSION: 1.85.0 | |
| RUST_CHANNEL: stable | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - name: Run cargo check | |
| run: cargo check --all-features --locked --release --all | |
| hack: | |
| name: Cargo hack | |
| needs: check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@13608cbb45b01feb47ef444ab1a42dc41ad56f1a | |
| with: | |
| tool: cargo-hack | |
| - run: cargo hack check --feature-powerset --no-dev-deps | |
| build: | |
| name: Build w/o features | |
| needs: check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| - beta | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # ratchet:actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - name: Run cargo build | |
| run: cargo build | |
| lockfile: | |
| name: Lockfile | |
| needs: check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - name: Check lockfile is updated | |
| run: cargo update --locked | |
| clippy: | |
| needs: check | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - name: Run cargo clippy | |
| run: cargo clippy --all-targets --all-features -- --deny warnings | |
| license: | |
| needs: check | |
| name: License | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: EmbarkStudios/cargo-deny-action@a531616d8ce3b9177443e48a1159bc945a099823 # ratchet:EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| command: check all | |
| format: | |
| needs: check | |
| name: Format | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - name: Run cargo fmt | |
| run: cargo fmt --all -- --check | |
| unused-dependencies: | |
| needs: check | |
| name: Unused dependencies | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - uses: bnjbvr/cargo-machete@ac30a525c0a8d163a92d727b3ff079ee3f6ecb08 # ratchet:bnjbvr/cargo-machete@main | |
| tests: | |
| needs: check | |
| name: Tests | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # ratchet:actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@13608cbb45b01feb47ef444ab1a42dc41ad56f1a | |
| with: | |
| tool: nextest | |
| - run: cargo nextest run --locked --all-features | |
| env: | |
| RUST_BACKTRACE: full | |
| CI: "true" | |
| integration-tests: | |
| needs: check | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| project: | |
| - linux | |
| - openwrt | |
| - coreboot | |
| - uboot | |
| - linux_next | |
| - zephyr | |
| - acrn | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - run: cargo run --all-features --example parse_${{ matrix.project }} > /dev/null | |
| env: | |
| RUST_BACKTRACE: full | |
| doc: | |
| needs: check | |
| name: Documentation | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - name: Build documentation | |
| run: cargo doc --no-deps --document-private-items --verbose | |
| shear: | |
| name: Shear | |
| runs-on: ubuntu-latest | |
| needs: [check] | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust | |
| run: | | |
| rustup update --no-self-update ${RUST_CHANNEL} | |
| rustup component add --toolchain ${RUST_CHANNEL} cargo | |
| rustup default ${RUST_CHANNEL} | |
| env: | |
| RUST_CHANNEL: ${{ env.RUST_CHANNEL }} | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # ratchet:Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@13608cbb45b01feb47ef444ab1a42dc41ad56f1a | |
| with: | |
| tool: cargo-shear | |
| - name: Run cargo Shear | |
| run: cargo shear | |
| lychee: | |
| name: Lychee | |
| runs-on: ubuntu-latest | |
| needs: [check] | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # ratchet:lycheeverse/lychee-action@v2 | |
| name: Link Checker | |
| # https://github.com/lycheeverse/lychee/issues/1405 | |
| with: | |
| args: --accept '100..=103,200..=299,429' . | |
| typos: | |
| name: Typos | |
| runs-on: ubuntu-latest | |
| needs: [check] | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout Actions Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Check spelling of the project | |
| uses: crate-ci/typos@7b04f660f4ee4f048d18fd341887cf28dfbedfe2 # ratchet:crate-ci/typos@master | |
| cargo-deny: | |
| name: Cargo deny | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| needs: [check] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: EmbarkStudios/cargo-deny-action@a531616d8ce3b9177443e48a1159bc945a099823 # ratchet:EmbarkStudios/cargo-deny-action@v2 | |
| build-for-targets: | |
| name: Build for targets | |
| needs: check | |
| runs-on: ${{ matrix.platforms.os }} | |
| continue-on-error: true | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| platforms: | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| features: "--all-features" | |
| - os: macos-26-intel | |
| target: x86_64-apple-darwin | |
| features: "--all-features" | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| features: "--all-features" | |
| - os: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| features: "--all-features" | |
| - os: windows-latest | |
| target: x86_64-pc-windows-gnu | |
| features: "--all-features" | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| features: "--all-features" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: houseabsolute/actions-rust-cross@f481cb5e0110765615313e2177ce12a99bf26bbd # ratchet:houseabsolute/actions-rust-cross@v1 | |
| with: | |
| target: ${{ matrix.platforms.target }} | |
| args: "--locked ${{ matrix.platforms.features }}" | |
| strip: false | |
| fedora: | |
| name: Fedora | |
| runs-on: ubuntu-latest | |
| container: fedora:latest | |
| permissions: | |
| contents: read | |
| needs: [check] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Build Fedora RPM with mock | |
| run: | | |
| dnf -y install git uv rpmlint | |
| rpmlint --strict packaging/fedora/rust-nom-kconfig.spec |