CI: REmove unnecessary extra cache step (handled by rust-cache already) #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: [push, pull_request] | |
env: | |
FOUNDRY_PROFILE: ci | |
FOUNDRY_FORK_BLOCK_NUMBER: 61373304 | |
jobs: | |
common: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install and cache solana | |
uses: ./.github/actions/cache-solana | |
- name: Install and cache node modules | |
uses: ./.github/actions/cache-node | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Cache rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: solana-contract | |
- name: Install essentials | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: pkg-config build-essential libudev-dev | |
version: 1.0 | |
evm: | |
runs-on: ubuntu-latest | |
needs: common | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run Forge build | |
working-directory: evm-contract | |
run: | | |
forge --version | |
forge build --sizes | |
- name: Run Forge tests | |
env: | |
RPC: ${{ secrets.POLYGON_RPC }} | |
working-directory: evm-contract | |
run: forge test -vvv --fork-url $RPC --fork-block-number $FOUNDRY_FORK_BLOCK_NUMBER | |
solana: | |
needs: common | |
runs-on: ubuntu-latest | |
outputs: | |
target_deploy_artifact: ${{ steps.build-artifact-upload-step.outputs.artifact-id }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Cache rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: solana-contract | |
- name: Install and cache solana | |
uses: ./.github/actions/cache-solana | |
- name: Run fmt | |
working-directory: solana-contract | |
run: cargo fmt -- --check | |
- name: Run clippy | |
working-directory: solana-contract | |
run: cargo clippy -- --deny=warnings | |
- name: Build | |
working-directory: solana-contract | |
run: cargo build-sbf | |
- name: Upload build artifacts | |
id: build-artifact-upload-step | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target_deploy | |
path: solana-contract/target/deploy | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Run tests | |
working-directory: solana-contract | |
run: cargo test-sbf | |
ui: | |
needs: common | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install and cache node modules | |
uses: ./.github/actions/cache-node | |
- name: Check that all deps are restored | |
run: | | |
ls -l | |
ls -l ui | |
- name: Run build | |
working-directory: ui | |
run: yarn build | |
- name: Run lint | |
working-directory: ui | |
run: yarn lint |