Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
split trappist and stout builds (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaninja authored Jun 28, 2023
1 parent 35a8421 commit 3ac372b
Show file tree
Hide file tree
Showing 14 changed files with 392 additions and 314 deletions.
23 changes: 23 additions & 0 deletions .github/templates/free-space/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: free-space
description: |
This action frees up disk space on the runner.
runs:
using: "composite"

steps:
- name: Remove Android library
shell: bash
run: sudo rm -rf /usr/local/lib/android

- name: Remove .NET runtime
shell: bash
run: sudo rm -rf /usr/share/dotnet

- name: Remove CodeQL
shell: bash
run: sudo rm -rf /opt/hostedtoolcache/CodeQL

- name: Removes cached Docker images
shell: bash
run: sudo docker image prune --all --force
5 changes: 0 additions & 5 deletions .github/templates/setup-worker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ description: |
This action sets up a worker for use in other actions. It installs the
necessary dependencies for building the project.
inputs:
rust-components:
description: Comma-separated list of components to be additionally installed for a new rust toolchain
required: false

runs:
using: "composite"

Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:

- name: Setup worker
uses: "./.github/templates/setup-worker"
with:
rust-components: rustfmt

- name: Check formatting
run: cargo fmt --all -- --check
Expand All @@ -42,29 +40,23 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-release
key: ${{ runner.os }}-cargo-release-0_9_37-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-release-0_9_37

- name: Check Build Trappist Runtime
- name: Check Build Trappist node
run: |
SKIP_WASM_BUILD=1 cargo check --release
SKIP_WASM_BUILD=1 cargo check --release --locked
test:
needs: lint
runs-on: ubuntu-latest
steps:
# Tests with benchmarks require a lot of disk space
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
android: true
dotnet: true
haskell: false
large-packages: false
swap-storage: false

- uses: actions/checkout@v3

# Tests with benchmarks require a lot of disk space
- name: Free Disk Space
uses: "./.github/templates/free-space"

- name: Setup worker
uses: "./.github/templates/setup-worker"

Expand All @@ -77,9 +69,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-debug
key: ${{ runner.os }}-cargo-debug-0_9_37-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-debug-0_9_37

- name: Run tests
- name: Run Trappist tests
run: |
cargo test --features runtime-benchmarks --jobs 1
cargo test --workspace --exclude stout-runtime --no-default-features --features trappist/trappist-runtime,std,runtime-benchmarks --locked --jobs 1
Loading

0 comments on commit 3ac372b

Please sign in to comment.