Implement basic version of temperature plugin #284
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
| name: Rust CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CI_RUST_VERSION: "1.89" | |
| jobs: | |
| check_format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: $CI_RUST_VERSION | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| check_dependencies: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: $CI_RUST_VERSION | |
| components: rustfmt | |
| - uses: cargo-bins/cargo-binstall@main | |
| - name: Check dependencies | |
| run: | | |
| cargo binstall --no-confirm cargo-machete | |
| cargo machete | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| needs: [check_format, check_dependencies] | |
| env: | |
| RUSTFLAGS: -Awarnings | |
| CONTINUE_TEST_IF_NO_POWERCAP: "true" | |
| NO_IPV6: "true" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install required packages | |
| run: sudo apt-get update && sudo apt-get install llvm-dev libclang-dev clang --no-install-recommends | |
| - name: Setup Rust Toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: $CI_RUST_VERSION | |
| components: rustfmt | |
| - name: Setup dependency cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Compile Alumet core | |
| run: cargo build -p alumet | |
| - name: Build all libraries | |
| run: cargo build | |
| - name: Build the agent binary | |
| run: cargo build -p alumet-agent --bins --all-features | |
| # compile tests first to avoid a timeout during execution | |
| - name: Compile Tests | |
| run: cargo test --all-features --no-run | |
| # run tests with a timeout to detect a bit earlier if there's a test that hangs indefinitely | |
| - name: Run Tests (including doc tests) | |
| run: cargo test --all-features -- --nocapture | |
| timeout-minutes: 10 | |
| build_on_musl: | |
| runs-on: ubuntu-latest | |
| needs: [check_format, check_dependencies] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install required packages | |
| run: sudo apt-get update && sudo apt-get install llvm-dev libclang-dev clang musl-dev musl-tools --no-install-recommends | |
| - name: Setup Rust Toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: $CI_RUST_VERSION | |
| components: rustfmt | |
| targets: x86_64-unknown-linux-musl | |
| - name: Setup dependency cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Compile Alumet standard agent as a static MUSL binary | |
| run: cargo build -p alumet-agent --target=x86_64-unknown-linux-musl | |
| env: | |
| RUSTFLAGS: "-C target-feature=+crt-static" | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: [check_format, check_dependencies] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Rust Toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: $CI_RUST_VERSION | |
| components: clippy | |
| - name: Setup dependency cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run Clippy linter | |
| run: cargo clippy --no-deps | |
| miri_test: | |
| runs-on: ubuntu-latest | |
| needs: [check_format, check_dependencies] | |
| env: | |
| RUSTFLAGS: -Awarnings | |
| CONTINUE_TEST_IF_NO_POWERCAP: "true" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Rust Toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| components: miri | |
| targets: x86_64-unknown-linux-musl | |
| - name: Setup dependency cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install Miri on nightly rust | |
| run: rustup +nightly component add miri | |
| - name: Run Miri on some tests | |
| run: cd core/alumet && cargo +nightly miri test -- ffi | |
| env: | |
| SKIP_BINDGEN: "true" |