Skip to content

Commit

Permalink
ci build with cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo authored and GCdePaula committed Jan 14, 2025
1 parent 7b9473b commit c76d30d
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
name: Build
on: [push]
on:
push:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up cache for Foundry
uses: actions/cache@v3
with:
path: ~/.foundry
key: ${{ runner.os }}-foundry-${{ hashFiles('**/foundry.toml') }}
restore-keys: |
${{ runner.os }}-foundry-
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand All @@ -18,3 +28,34 @@ jobs:
forge build
forge fmt --check
forge test
- name: Set up cache for Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install just
uses: extractions/setup-just@v2

- name: Deps
run: |
export CARTESI_MACHINE_VERSION=0.18.1
sudo apt-get install -y libboost-all-dev lua5.4 libslirp0
wget https://github.com/cartesi/machine-emulator/releases/download/v0.18.1/cartesi-machine-v${CARTESI_MACHINE_VERSION}_amd64.deb
sudo dpkg -i ./cartesi-machine-v${CARTESI_MACHINE_VERSION}_amd64.deb
rm ./cartesi-machine-v${CARTESI_MACHINE_VERSION}_amd64.deb
- name: Rust fmt and check
run: |
just setup
just format-rust-workspace
just check-rust-workspace
- name: Rust test workspace
run: |
just test-rust-workspace

0 comments on commit c76d30d

Please sign in to comment.