Enable trusted_execution_cluster tests on OpenShift #403
Workflow file for this run
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
| # SPDX-FileCopyrightText: Yalan Zhang <[email protected]> | |
| # SPDX-FileCopyrightText: Timothée Ravier <[email protected]> | |
| # SPDX-FileCopyrightText: Jakob Naucke <[email protected]> | |
| # | |
| # SPDX-License-Identifier: CC0-1.0 | |
| # Inspired by https://github.com/coreos/repo-templates | |
| name: "Rust" | |
| on: | |
| pull_request: | |
| branches: | |
| - "main" | |
| permissions: | |
| contents: "read" | |
| # Don't waste job slots on superseded code | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| tests-stable: | |
| name: "Tests, stable toolchain" | |
| runs-on: "ubuntu-24.04" | |
| container: "ghcr.io/trusted-execution-clusters/buildroot:latest" | |
| steps: | |
| - name: "Check out repository" | |
| uses: actions/checkout@v6 | |
| - name: "Install Rust toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: "Install Go toolchain" | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: "Cache build artifacts" | |
| uses: Swatinem/rust-cache@v2 | |
| - name: "Build CRDs" | |
| run: make crds-rs | |
| - name: "cargo build" | |
| run: cargo build --all-targets | |
| - name: "cargo test" | |
| run: cargo test --bins | |
| tests-release-stable: | |
| name: "Tests (release), stable toolchain" | |
| runs-on: "ubuntu-24.04" | |
| container: "ghcr.io/trusted-execution-clusters/buildroot:latest" | |
| steps: | |
| - name: "Check out repository" | |
| uses: actions/checkout@v6 | |
| - name: "Install Rust toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: "Install Go toolchain" | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: "Cache build artifacts" | |
| uses: Swatinem/rust-cache@v2 | |
| - name: "Build CRDs" | |
| run: make crds-rs | |
| - name: "cargo build (release)" | |
| run: cargo build --lib --release | |
| - name: "cargo test (release)" | |
| run: cargo test --bins --release | |
| tests-release-msrv: | |
| name: "Tests (release), minimum supported toolchain" | |
| runs-on: "ubuntu-24.04" | |
| container: "ghcr.io/trusted-execution-clusters/buildroot:latest" | |
| steps: | |
| - name: "Check out repository" | |
| uses: actions/checkout@v6 | |
| - name: "Detect crate MSRV" | |
| run: | | |
| msrv=$(cargo metadata --format-version 1 --no-deps | \ | |
| jq -r '.packages[0].rust_version') | |
| echo "Crate MSRV: $msrv" | |
| echo "MSRV=$msrv" >> $GITHUB_ENV | |
| - name: "Install Rust toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ env.MSRV }} | |
| components: rustfmt | |
| - name: "Install Go toolchain" | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: "Cache build artifacts" | |
| uses: Swatinem/rust-cache@v2 | |
| - name: "Build CRDs" | |
| run: make crds-rs | |
| - name: "cargo build (release)" | |
| run: cargo build --lib --release | |
| - name: "cargo test (release)" | |
| run: cargo test --bins --release | |
| tests-other-channels: | |
| name: "Tests, unstable toolchain" | |
| runs-on: "ubuntu-24.04" | |
| container: "ghcr.io/trusted-execution-clusters/buildroot:latest" | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| channel: [beta, nightly] | |
| steps: | |
| - name: "Check out repository" | |
| uses: actions/checkout@v6 | |
| - name: "Install toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.channel }} | |
| components: rustfmt | |
| - name: "Install Go toolchain" | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: "Cache build artifacts" | |
| uses: Swatinem/rust-cache@v2 | |
| - name: "Build CRDs" | |
| run: make crds-rs | |
| - name: "cargo build" | |
| run: cargo build --lib | |
| - name: "cargo test" | |
| run: cargo test --bins |