feat(nix): aleph_insecure_unattested=1 mode with a plain-HTTP attest agent #378
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 supervisor daemon" | |
| on: | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - "rust/**" | |
| - "proto/**" | |
| - "tests/conformance/**" | |
| - "src/aleph/vm/supervisor_interface/**" | |
| - "src/aleph/vm/conf.py" | |
| - "src/aleph/vm/resources.py" | |
| - "src/aleph/vm/network/**" | |
| - "src/aleph/vm/supervisor/networking_db.py" | |
| - "src/aleph/vm/supervisor/qemu_build.py" | |
| - "src/aleph/vm/supervisor/controllers/qemu/cloudinit.py" | |
| - "scripts/generate_rust_fixtures.py" | |
| - "pyproject.toml" | |
| - ".github/workflows/test-rust.yml" | |
| pull_request: | |
| # od/** covers stacked PRs (increment N+1 based on increment N's | |
| # branch), which must carry CI before the stack lands on dev. | |
| branches: [main, dev, od/**] | |
| paths: | |
| - "rust/**" | |
| - "proto/**" | |
| - "tests/conformance/**" | |
| - "src/aleph/vm/supervisor_interface/**" | |
| - "src/aleph/vm/conf.py" | |
| - "src/aleph/vm/resources.py" | |
| - "src/aleph/vm/network/**" | |
| - "src/aleph/vm/supervisor/networking_db.py" | |
| - "src/aleph/vm/supervisor/qemu_build.py" | |
| - "src/aleph/vm/supervisor/controllers/qemu/cloudinit.py" | |
| - "scripts/generate_rust_fixtures.py" | |
| - "pyproject.toml" | |
| - ".github/workflows/test-rust.yml" | |
| jobs: | |
| rust: | |
| name: "cargo fmt, clippy, test and Python conformance" | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Workaround github issue https://github.com/actions/runner-images/issues/7192 | |
| run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc | |
| - name: Install protoc, lspci and the lifecycle tool dependencies | |
| # acl/cloud-image-utils/qemu/ndppd: the cargo lifecycle tests run | |
| # cloud-localds and resolve qemu-system-x86_64, and the daemon's | |
| # settings.check() port requires the toolchain the Python check() | |
| # requires. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler pciutils acl cloud-image-utils qemu-utils qemu-system-x86 ndppd | |
| - name: Install the pinned Rust toolchain | |
| # rustup reads rust/rust-toolchain.toml when invoked from inside rust/. | |
| working-directory: rust | |
| run: rustup show | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| rust | |
| rust/crates/aleph-attest-agent | |
| - name: cargo fmt | |
| working-directory: rust | |
| run: cargo fmt --check | |
| - name: cargo clippy | |
| working-directory: rust | |
| run: cargo clippy --locked --all-targets -- -D warnings | |
| - name: cargo test | |
| working-directory: rust | |
| run: cargo test --locked | |
| # aleph-attest-agent is its own workspace (own Cargo.lock: it is the | |
| # measured guest binary, see rust/Cargo.toml). Same three gates. | |
| - name: cargo fmt (aleph-attest-agent workspace) | |
| working-directory: rust/crates/aleph-attest-agent | |
| run: cargo fmt --check | |
| - name: cargo clippy (aleph-attest-agent workspace) | |
| working-directory: rust/crates/aleph-attest-agent | |
| run: cargo clippy --locked --all-targets -- -D warnings | |
| - name: cargo test (aleph-attest-agent workspace) | |
| working-directory: rust/crates/aleph-attest-agent | |
| run: cargo test --locked | |
| # The conformance suite drives the compiled daemon with the production | |
| # Python client, so it needs the same Python setup as the pytest job. | |
| - name: Install required system packages for the Python conformance suite | |
| run: | | |
| sudo apt-get install -y python3 python3-pip python3-aiohttp python3-msgpack python3-aiodns python3-alembic python3-sqlalchemy python3-setproctitle redis python3-psutil python3-netifaces sudo acl curl systemd-container squashfs-tools debootstrap python3-packaging python3-cpuinfo python3-nftables python3-jsonschema nftables libsystemd-dev cmake libdbus-1-dev libglib2.0-dev lshw python3-jwcrypto ndppd cloud-image-utils qemu-utils qemu-system-x86 | |
| - name: Install hatch | |
| run: | | |
| # virtualenv 21 brings a breaking change that's not supported by hatch 1.16 | |
| python3 -m pip install --upgrade --ignore-installed hatch hatch-vcs coverage "virtualenv<21" | |
| - name: Run the conformance suite against the Rust daemon | |
| env: | |
| ALEPH_VM_CONFORMANCE: "1" | |
| run: |- | |
| hatch run testing:python -m pytest -v -p no:cacheprovider tests/conformance |