Skip to content

ci: pin all actions #1532

ci: pin all actions

ci: pin all actions #1532

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
submodules: true
- uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1
with:
components: rustfmt, clippy
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: --all-files
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
lfs: true
submodules: true
- name: "Install rust-toolchain.toml"
run: rustup toolchain install
# We use Swatinem/rust-cache to cache cargo registry, index and target in this job
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
# Install memtrack for the memory integration tests
- name: Install dependencies required for libbpf-sys (vendored feature)
run: sudo apt-get update && sudo apt-get install -y autopoint bison flex
- name: Install memtrack
run: |
cargo install --path crates/memtrack --locked
- name: Install exec-harness
run: |
cargo install --path crates/exec-harness --locked
- run: cargo test --all --exclude memtrack --exclude exec-harness
exec-harness-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
submodules: true
- uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1
- name: Run tests
run: cargo test -p exec-harness
bpf-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
lfs: true
submodules: true
- uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1
- name: Install dependencies required for libbpf-sys (vendored feature)
run: sudo apt-get update && sudo apt-get install -y autopoint bison flex
- name: Install additional allocators
run: sudo apt-get install -y libmimalloc-dev libjemalloc-dev
- name: Run tests
env:
RUST_LOG: debug
run: sudo -E $(which cargo) test -- --test-threads 1 --nocapture
working-directory: crates/memtrack
# Since we ran the tests with sudo, the build artifacts will have root ownership
- name: Clean up
run: sudo chown -R $USER:$USER . ~/.cargo
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
submodules: true
- name: "Install rust-toolchain.toml"
run: rustup toolchain install
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- name: Install cargo codspeed
uses: taiki-e/install-action@f92912fad184299a31e22ad070a5059fd07d4f59 # v2
with:
tool: cargo-codspeed
- name: Build benchmarks
run: cargo codspeed build -p runner-shared
- name: Run benchmarks
uses: CodSpeedHQ/action@4deb3275dd364fb96fb074c953133d29ec96f80f # v4
with:
mode: simulation
run: cargo codspeed run -p runner-shared