Skip to content

Commit

Permalink
Split rust CI into more jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-ds committed Nov 2, 2024
1 parent 1f6268a commit 59cb85b
Showing 1 changed file with 59 additions and 12 deletions.
71 changes: 59 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ permissions:
jobs:
test:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 75
timeout-minutes: 60

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -76,10 +76,9 @@ jobs:
run: |
cd examples
cargo build --locked --release --target wasm32-unknown-unknown
- name: Run the storage-service instance and the storage-service tests
- name: Run the storage-service instance
run: |
cargo run --release -p linera-storage-service -- memory --endpoint $LINERA_STORAGE_SERVICE &
cargo test --features storage-service,unstable-oracles -- storage_service --nocapture
- name: Run Ethereum tests
run: |
cargo test -p linera-ethereum --features ethereum
Expand Down Expand Up @@ -128,6 +127,38 @@ jobs:
echo 'Run `linera help-markdown > CLI.md` to update it.'
exit 1
fi
storage-service-tests:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: foundry-rs/[email protected]
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set environment variables
run: |
echo "LINERA_STORAGE_SERVICE=127.0.0.1:1235" >> "$GITHUB_ENV"
echo "LINERA_WALLET=/tmp/local-linera-net/wallet_0.json" >> "$GITHUB_ENV"
echo "LINERA_STORAGE=rocksdb:/tmp/local-linera-net/client_0.db" >> "$GITHUB_ENV"
echo "LINERA_FAUCET_URL=http://localhost:8079" >> "$GITHUB_ENV"
- name: Build example applications
run: |
cd examples
cargo build --locked --release --target wasm32-unknown-unknown
- name: Run the storage-service instance and the storage-service tests
run: |
cargo run --release -p linera-storage-service -- memory --endpoint $LINERA_STORAGE_SERVICE &
cargo test --features storage-service,unstable-oracles -- storage_service --nocapture
web:
runs-on: ubuntu-latest-16-cores
Expand Down Expand Up @@ -162,7 +193,7 @@ jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 35

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -193,9 +224,6 @@ jobs:
- name: Install cargo-machete
run: |
cargo install cargo-machete --locked
- name: Install cargo-all-features
run: |
cargo install --git https://github.com/ma2bd/cargo-all-features --branch workspace_metadata --locked
- name: Install cargo-rdme
run: |
cargo install cargo-rdme --locked
Expand Down Expand Up @@ -255,15 +283,34 @@ jobs:
continue-on-error: true
run: |
cargo doc --locked --all-features
- name: Run cargo check-all-features
continue-on-error: true
run: |
cargo check-all-features
cargo check-all-features --all-targets
- name: Restore `rust-toolchain.toml` file
if: '!cancelled()'
run: |
ln -sf toolchains/stable/rust-toolchain.toml
- name: Check linera-service GraphQL schema
run: |
diff <(cargo run --locked --bin linera-schema-export) linera-service-graphql-client/gql/service_schema.graphql
check-all-features:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install cargo-all-features
run: |
cargo install --git https://github.com/ma2bd/cargo-all-features --branch workspace_metadata --locked
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run cargo check-all-features
run: |
cargo check-all-features
cargo check-all-features --all-targets

0 comments on commit 59cb85b

Please sign in to comment.