Skip to content

CI: Solana build fixes #15

CI: Solana build fixes

CI: Solana build fixes #15

Workflow file for this run

name: CI Pipeline
on: [push, pull_request]
env:
FOUNDRY_PROFILE: ci
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
working-directory: solana-contract
uses: Swatinem/rust-cache@v2

Check failure on line 27 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 27, Col: 9): Unexpected value 'uses' .github/workflows/ci.yml (Line: 25, Col: 9): Required property is missing: run
- name: install essentials
run: |
sudo apt-get update
sudo apt-get install -y pkg-config build-essential libudev-dev
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
working-directory: evm-contract
run: forge test -vvv
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
working-directory: solana-contract
uses: Swatinem/rust-cache@v2
- name: Run fmt
working-directory: solana-contract
run: cargo fmt -- --check
- name: Run clippy
working-directory: solana-contract
run: cargo clippy -- --deny=warnings
- name: Cache build artifact
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
solana-contract/target
key: cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('rust-toolchain.toml') }}
- 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