-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Add cachepot -- part 1: generate cache (#806)
- Loading branch information
Showing
5 changed files
with
130 additions
and
97 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Test Tube (osmosis) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
proptest: | ||
required: false | ||
default: false | ||
type: boolean | ||
store_deps: | ||
required: false | ||
default: false | ||
type: boolean | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTC_WRAPPER: cachepot | ||
CARGO_TARGET_DIR: ~/target | ||
|
||
jobs: | ||
test-tube: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Restore dependencies | ||
id: restore-cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
~/.cache/cachepot | ||
~/.cargo | ||
~/go | ||
~/target | ||
key: ${{ runner.os }}-cargo-osmosis-${{github.sha}} | ||
restore-keys: ${{ runner.os }}-cargo-osmosis | ||
- name: Update PATH and RUSTC_WRAPPER | ||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
- name: Install cachepot | ||
run: test -e $HOME/.cargo/bin/cachepot && echo "cachepot found -- skipping install" || cargo install --git https://github.com/paritytech/cachepot | ||
env: | ||
RUSTC_WRAPPER: "" | ||
- name: Rust lint | ||
run: cargo clippy --features test-tube --all-targets -- -D warnings | ||
working-directory: smart-contracts/osmosis | ||
- name: Unit tests | ||
run: cargo unit-test | ||
working-directory: smart-contracts/osmosis | ||
- name: Build merkle-incentives | ||
run: cargo test-tube-build | ||
working-directory: smart-contracts/osmosis/contracts/merkle-incentives | ||
- name: Test merkle-incentives | ||
run: cargo test-tube | ||
working-directory: smart-contracts/osmosis/contracts/merkle-incentives | ||
- name: Build dex-router-osmosis | ||
run: cargo test-tube-build | ||
working-directory: smart-contracts/osmosis/contracts/dex-router-osmosis | ||
- name: Test dex-router-osmosis | ||
run: cargo test-tube | ||
working-directory: smart-contracts/osmosis/contracts/dex-router-osmosis | ||
- name: Build cl-vault | ||
run: cargo test-tube-build | ||
working-directory: smart-contracts/osmosis/contracts/cl-vault | ||
- name: Test cl-vault | ||
run: cargo test-tube | ||
working-directory: smart-contracts/osmosis/contracts/cl-vault | ||
- if: inputs.proptest | ||
name: Run prop-test | ||
run: cargo prop-test | ||
env: | ||
PROPTEST_CASES: 10 | ||
working-directory: smart-contracts/osmosis/contracts/cl-vault | ||
- name: Store dependencies | ||
if: inputs.store_deps | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
~/.cache/cachepot | ||
~/.cargo | ||
~/go | ||
~/target | ||
key: ${{ runner.os }}-cargo-osmosis-${{github.sha}} | ||
|
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Test Tube (osmosis) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/osmosis/**/Cargo.toml' | ||
- 'smart-contracts/osmosis/**.rs' | ||
- '.github/workflows/test_tube.yml' | ||
- '.github/workflows/all_checks_osmosis.yml' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/osmosis/**/Cargo.toml' | ||
- 'smart-contracts/osmosis/**.rs' | ||
- '.github/workflows/test_tube.yml' | ||
- '.github/workflows/all_checks_osmosis.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
post-merge: | ||
uses: ./.github/workflows/all_checks_osmosis.yml | ||
if: github.event_name == 'push' | ||
with: | ||
proptest: true | ||
store_deps: true |
This file was deleted.
Oops, something went wrong.