Skip to content

feat(artifacts): parallel downloads #747

feat(artifacts): parallel downloads

feat(artifacts): parallel downloads #747

Workflow file for this run

name: PR
on:
push:
branches: [main]
pull_request:
branches:
- "**"
paths:
- "contracts/**"
- "crates/**"
- "bin/**"
- "Cargo.toml"
- ".github/workflows/**"
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
foundry-checks:
name: Foundry Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Ensure the PR branch is checked out.
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: stable
- name: Run Forge build
run: FOUNDRY_PROFILE=deploy forge build --sizes --root contracts
- name: Run Forge tests
run: FOUNDRY_PROFILE=deploy forge test -vvv --root contracts
- name: Run Forge fmt
run: forge fmt --check --root contracts
- name: Check Forge gas snapshot
working-directory: contracts
run: |
FOUNDRY_PROFILE=deploy forge snapshot --no-match-test "Fuzz"
if [[ -n "$(git status --porcelain)" ]]; then
echo "::error ::Gas snapshot is out of date. Run 'FOUNDRY_PROFILE=deploy forge snapshot --no-match-test \"Fuzz\"' and commit the result.";
echo "Git status:"
git status
echo ""
echo "Gas snapshot diff:"
git diff
exit 1
fi
cargo-test:
name: Cargo Test
runs-on:
[
runs-on,
runner=64cpu-linux-x64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Setup CI
uses: ./.github/actions/setup
- name: Build RISC-V ELFs
run: |
./x.sh
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
toolchain: 1.88.0
args: --release
env:
RUST_BACKTRACE: 1
RUSTUP_TOOLCHAIN: 1.88.0
cargo-lint:
name: Cargo Lint
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Setup CI
uses: ./.github/actions/setup
- name: Build RISC-V ELFs
run: |
./x.sh
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
env:
CARGO_INCREMENTAL: 1
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets --release -- -D warnings -A incomplete-features
env:
CARGO_INCREMENTAL: 1