Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try cache target without debug #2594

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 84 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,18 @@ jobs:
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build:
fmt-clippy:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
needs: cargo-cache
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
- uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
path: ~/.cargo/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -51,8 +47,6 @@ jobs:
uses: jwlawson/[email protected]
- name: Check format
run: cargo fmt --all -- --check
- name: Build
run: make build-all
- name: Install clippy
run: rustup component add clippy
- name: Run mandala-runtime clippy
Expand All @@ -61,25 +55,25 @@ jobs:
run: cargo clippy --features with-karura-runtime -- -D warnings
- name: Run acala-runtime clippy
run: cargo clippy --features with-acala-runtime -- -D warnings
- name: Run build benches
run: make build-benches
benchmarking:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
needs: build
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
- uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
path: ~/.cargo/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache/restore@v3
with:
path: |
target/
!target/release/
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
Expand All @@ -96,19 +90,21 @@ jobs:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
needs: build
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
- uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
path: ~/.cargo/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache/restore@v3
with:
path: |
target/
!target/release/
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
Expand All @@ -133,19 +129,21 @@ jobs:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
needs: build
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
- uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
path: ~/.cargo/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache/restore@v3
with:
path: |
target/
!target/release/
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
Expand All @@ -164,3 +162,56 @@ jobs:
run: |
npm install -g yarn
make test-ts
cargo-cache:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: clean-up-actions
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
with:
path: ~/.cargo/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2023-04-15
components: rustfmt
target: wasm32-unknown-unknown
- name: Fetch dependencies
run: cargo fetch --locked

build:
runs-on: [self-hosted, linux]
env:
CARGO_INCREMENTAL: 0
needs: cargo-cache
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache/restore@v3
with:
path: ~/.cargo/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
with:
path: |
target/
!target/release/
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2023-04-15
components: rustfmt
target: wasm32-unknown-unknown
- name: Setup cmake
uses: jwlawson/[email protected]
- name: Run build
run: make build-all
- name: Run build benches
run: make build-benches
Loading