Skip to content

Commit

Permalink
ci: remove cruft (#2300)
Browse files Browse the repository at this point in the history
* ci: remove cruft

- Only checkout submodules when neeede (building contracts)
- Only install forge when needed (build contracts, docs, run tests)
  • Loading branch information
sveitser authored Nov 19, 2024
1 parent ed4bec1 commit 4c8a935
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 117 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/benchmark-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install just command runner
run: |
sudo snap install --edge --classic just
just --version
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -76,17 +67,8 @@ jobs:
build-arm:
runs-on: buildjet-16vcpu-ubuntu-2204-arm
steps:
- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -144,8 +126,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Download executables AMD
uses: actions/download-artifact@v4
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,13 @@ jobs:
steps:
- uses: rui314/setup-mold@v1

- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install just command runner
run: |
sudo snap install --edge --classic just
just --version
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -97,17 +88,8 @@ jobs:
steps:
- uses: rui314/setup-mold@v1

- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -177,8 +159,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Download executables AMD
uses: actions/download-artifact@v4
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Download executables AMD
uses: actions/download-artifact@v4
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- uses: dtolnay/rust-toolchain@nightly

- name: Enable Rust Caching
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/slowtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,14 @@ jobs:
slow-tests:
runs-on: ubuntu-latest
steps:
- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
# These tests need the `anvil` binary provided by foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- uses: taiki-e/install-action@nextest

- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure Environment
run: PATH="$PWD/target/release:$PATH"
Expand Down
29 changes: 1 addition & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ jobs:
- uses: rui314/setup-mold@v1

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install nextest
uses: taiki-e/install-action@nextest

Expand All @@ -56,8 +55,6 @@ jobs:
- uses: rui314/setup-mold@v1

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -101,18 +98,10 @@ jobs:
needs: build-test-artifacts
runs-on: ubuntu-latest
steps:
- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install nextest
uses: taiki-e/install-action@nextest
Expand Down Expand Up @@ -146,18 +135,7 @@ jobs:
- name: Configure PATH
run: PATH="$PWD/target/debug:$PATH"

- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- uses: actions/checkout@v4
with:
submodules: recursive

- uses: taiki-e/install-action@nextest

Expand Down Expand Up @@ -196,15 +174,10 @@ jobs:
needs: build-test-bins
runs-on: ubuntu-latest
steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install Nix
uses: cachix/install-nix-action@V27

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Download archive
uses: actions/download-artifact@v4
Expand Down
34 changes: 0 additions & 34 deletions contracts/.github/workflows/test.yml

This file was deleted.

0 comments on commit 4c8a935

Please sign in to comment.