Skip to content

CI Job Caching #4750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ jobs:
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- uses: cargo-bins/cargo-binstall@main
- name: Install cross
run: cargo binstall --no-confirm cross
- name: Cross build Lighthouse binary
run: |
cargo install cross
env CROSS_PROFILE=${{ matrix.profile }} CROSS_FEATURES=${{ matrix.features.env }} make build-${{ matrix.binary }}
- name: Make bin dir
run: mkdir ./bin
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
- name: Get latest version of stable Rust
if: env.SELF_HOSTED_RUNNERS == 'false'
run: rustup update stable
- uses: cargo-bins/cargo-binstall@main
- name: Install cross
run: cargo binstall --no-confirm cross

# ==============================
# Windows dependencies
Expand All @@ -93,25 +96,21 @@ jobs:
- name: Build Lighthouse for aarch64-unknown-linux-gnu-portable
if: matrix.arch == 'aarch64-unknown-linux-gnu-portable'
run: |
cargo install cross
env CROSS_PROFILE=${{ matrix.profile }} make build-aarch64-portable

- name: Build Lighthouse for aarch64-unknown-linux-gnu
if: matrix.arch == 'aarch64-unknown-linux-gnu'
run: |
cargo install cross
env CROSS_PROFILE=${{ matrix.profile }} make build-aarch64

- name: Build Lighthouse for x86_64-unknown-linux-gnu-portable
if: matrix.arch == 'x86_64-unknown-linux-gnu-portable'
run: |
cargo install cross
env CROSS_PROFILE=${{ matrix.profile }} make build-x86_64-portable

- name: Build Lighthouse for x86_64-unknown-linux-gnu
if: matrix.arch == 'x86_64-unknown-linux-gnu'
run: |
cargo install cross
env CROSS_PROFILE=${{ matrix.profile }} make build-x86_64

- name: Move cross-compiled binary
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- uses: Swatinem/rust-cache@v2
- name: Run tests in release
run: make test-release
release-tests-windows:
Expand All @@ -93,6 +94,7 @@ jobs:
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- uses: Swatinem/rust-cache@v2
- name: Run tests in release
run: make test-release
beacon-chain-tests:
Expand All @@ -105,6 +107,7 @@ jobs:
- name: Get latest version of stable Rust
if: env.SELF_HOSTED_RUNNERS == false
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run beacon_chain tests for all known forks
run: make test-beacon-chain
op-pool-tests:
Expand All @@ -115,6 +118,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run operation_pool tests for all known forks
run: make test-op-pool
slasher-tests:
Expand All @@ -125,6 +129,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run slasher tests for all supported backends
run: make test-slasher
debug-tests-ubuntu:
Expand All @@ -141,6 +146,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- uses: Swatinem/rust-cache@v2
- name: Run tests in debug
run: make test-debug
state-transition-vectors-ubuntu:
Expand All @@ -151,6 +157,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run state_transition_vectors in release.
run: make run-state-transition-tests
ef-tests-ubuntu:
Expand All @@ -163,6 +170,7 @@ jobs:
- name: Get latest version of stable Rust
if: env.SELF_HOSTED_RUNNERS == false
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run consensus-spec-tests with blst, milagro and fake_crypto
run: make test-ef
dockerfile-ubuntu:
Expand All @@ -189,6 +197,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- uses: Swatinem/rust-cache@v2
- name: Run the beacon chain sim that starts from an eth1 contract
run: cargo run --release --bin simulator eth1-sim
merge-transition-ubuntu:
Expand All @@ -203,6 +212,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- uses: Swatinem/rust-cache@v2
- name: Run the beacon chain sim and go through the merge transition
run: cargo run --release --bin simulator eth1-sim --post-merge
no-eth1-simulator-ubuntu:
Expand All @@ -213,6 +223,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run the beacon chain sim without an eth1 connection
run: cargo run --release --bin simulator no-eth1-sim
syncing-simulator-ubuntu:
Expand All @@ -227,6 +238,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- uses: Swatinem/rust-cache@v2
- name: Run the syncing simulator
run: cargo run --release --bin simulator syncing-sim
doppelganger-protection-test:
Expand All @@ -237,6 +249,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Install geth
run: |
sudo add-apt-repository -y ppa:ethereum/ethereum
Expand Down Expand Up @@ -268,6 +281,7 @@ jobs:
dotnet-version: '6.0.201'
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run exec engine integration tests in release
run: make test-exec-engine
check-benchmarks:
Expand All @@ -278,6 +292,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Typecheck benchmark code without running it
run: make check-benches
clippy:
Expand All @@ -288,6 +303,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Lint code for quality and style with Clippy
run: make lint
- name: Certify Cargo.lock freshness
Expand All @@ -300,6 +316,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust @ MSRV (${{ needs.extract-msrv.outputs.MSRV }})
run: rustup override set ${{ needs.extract-msrv.outputs.MSRV }}
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: cargo check --workspace
arbitrary-check:
Expand All @@ -310,6 +327,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Validate state_processing feature arbitrary-fuzz
run: make arbitrary-fuzz
cargo-audit:
Expand All @@ -320,6 +338,7 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: Swatinem/rust-cache@v2
- name: Run cargo audit to identify known security vulnerabilities reported to the RustSec Advisory Database
run: make audit
cargo-vendor:
Expand All @@ -338,8 +357,10 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust (${{ env.PINNED_NIGHTLY }})
run: rustup toolchain install $PINNED_NIGHTLY
- uses: Swatinem/rust-cache@v2
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo-udeps
run: cargo install cargo-udeps --locked --force
run: cargo binstall --no-confirm cargo-udeps --locked --force
- name: Create Cargo config dir
run: mkdir -p .cargo
- name: Install custom Cargo config
Expand All @@ -358,5 +379,6 @@ jobs:
run: sudo apt install -y git gcc g++ make cmake pkg-config llvm-dev libclang-dev clang
- name: Use Rust beta
run: rustup override set beta
- uses: Swatinem/rust-cache@v2
- name: Run make
run: make