Skip to content

Commit

Permalink
Resolving merge conflicts with main.
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamchordia committed Aug 27, 2024
2 parents 6410b57 + 3a45b49 commit 0d37cc5
Show file tree
Hide file tree
Showing 632 changed files with 7,878 additions and 67,702 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/all_checks_osmosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Test Tube (osmosis)

on:
workflow_call:
inputs:
unittest:
required: false
default: false
type: boolean
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: Cleanup runner
run: sudo rm -rf /usr/local/share/boost && sudo rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && sudo rm -rf /opt/hostedtoolcache/CodeQL && sudo docker system prune --all --force
- name: Restore dependencies
id: restore-cache
uses: actions/cache/restore@v4
with:
path: |
~/.cache/cachepot
~/.cargo
~/go
~/target
key: ${{ runner.os }}-cache-osmosis-${{ github.sha }}
restore-keys: ${{ runner.os }}-cache-osmosis
- name: Update PATH
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 && !(steps.restore-cache.outputs.cache-hit == 'false')
uses: actions/cache/save@v4
with:
path: |
~/.cache/cachepot
~/.cargo
~/go
~/target
key: ${{ runner.os }}-cache-osmosis-${{ github.sha }}

39 changes: 27 additions & 12 deletions .github/workflows/cargo_build_cache.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Store cargo build cache

on:
push:
branches:
- main
paths:
- 'smart-contracts/**.rs'
- 'smart-contracts/**.toml'
workflow_dispatch:
workflow_call:
inputs:
workspace:
required: true
type: string

env:
CARGO_TARGET_DIR: ~/target

jobs:
store-build-cache:
Expand All @@ -17,15 +18,29 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Restore dependencies
uses: actions/cache/restore@v4
with:
path: |
~/.cache/cachepot
~/.cargo
~/go
~/target
key: ${{ runner.os }}-cargo-${{ inputs.workspace }}-${{github.sha}}
restore-keys: ${{ runner.os }}-cargo-${{ inputs.workspace }}
- name: Install cachepot
run: test -e ~/.cargo/bin/cachepot && echo "cachepot found -- skipping install" || cargo install --git https://github.com/paritytech/cachepot
- name: Rust check
run: cargo check
working-directory: smart-contracts
run: cargo check --all-targets --features test-tube
working-directory: smart-contracts/${{ inputs.workspace }}
env:
RUSTC_WRAPPER: cachepot
- name: Store dependencies
uses: actions/cache/save@v4
with:
path: |
~/.cache/cachepot
~/.cargo
~/go
**/target
key: ${{ runner.os }}-cargo-$GITHUB_SHA
restore-keys: ${{ runner.os }}-cargo
~/target
key: ${{ runner.os }}-cargo-${{ inputs.workspace }}-${{github.sha}}
16 changes: 16 additions & 0 deletions .github/workflows/cargo_build_cache_quasar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Store cargo build cache (quasar)

on:
push:
branches:
- main
paths:
- 'smart-contracts/quasar/**.rs'
- 'smart-contracts/quasar/**.toml'
workflow_dispatch:

jobs:
quasar-build-cache:
uses: ./.github/workflows/cargo_build_cache.yml
with:
workspace: quasar
33 changes: 0 additions & 33 deletions .github/workflows/cl_vault.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/cl_vault_osmosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CL Vault (osmosis)

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/osmosis/contracts/cl-vault/Cargo.toml'
- 'smart-contracts/osmosis/contracts/cl-vault/**.rs'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/cl_vault_osmosis.yml'
- '.github/workflows/rust_basic.yml'
push:
branches:
- main
paths:
- 'smart-contracts/osmosis/contracts/cl-vault/Cargo.toml'
- 'smart-contracts/osmosis/contracts/cl-vault/**.rs'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/cl_vault_osmosis.yml'
- '.github/workflows/rust_basic.yml'
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
target: contracts/cl-vault
workspace: osmosis
21 changes: 10 additions & 11 deletions .github/workflows/dex_router_osmosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ on:
branches:
- main
paths:
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/**.yml'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/dex_router_osmosis.yml'
push:
branches:
- main
paths:
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/**.yml'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/dex-router-osmosis/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/dex_router_osmosis.yml'
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
target: 'contracts/dex-router-osmosis'
test-tube:
uses: ./.github/workflows/rust_test_tube.yml
with:
contract: 'dex-router-osmosis'
target: contracts/dex-router-osmosis
workspace: osmosis
11 changes: 6 additions & 5 deletions .github/workflows/lst_adapter_osmosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
branches:
- main
paths:
- 'smart-contracts/contracts/lst-adapter-osmosis/Cargo.toml'
- 'smart-contracts/contracts/lst-adapter-osmosis/**.rs'
- 'smart-contracts/osmosis/contracts/lst-adapter-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/lst-adapter-osmosis/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/lst_adapter_osmosis.yml'
push:
branches:
- main
paths:
- 'smart-contracts/contracts/lst-adapter-osmosis/Cargo.toml'
- 'smart-contracts/contracts/lst-adapter-osmosis/**.rs'
- 'smart-contracts/osmosis/contracts/lst-adapter-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/lst-adapter-osmosis/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/lst_adapter_osmosis.yml'
workflow_dispatch:
Expand All @@ -23,4 +23,5 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
target: 'contracts/lst-adapter-osmosis'
target: contracts/lst-adapter-osmosis
workspace: osmosis
11 changes: 6 additions & 5 deletions .github/workflows/lst_dex_adapter_osmosis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
branches:
- main
paths:
- 'smart-contracts/contracts/lst-dex-adapter-osmosis/Cargo.toml'
- 'smart-contracts/contracts/lst-dex-adapter-osmosis/**.rs'
- 'smart-contracts/osmosis/contracts/lst-dex-adapter-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/lst-dex-adapter-osmosis/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/lst_dex_adapter_osmosis.yml'
push:
branches:
- main
paths:
- 'smart-contracts/contracts/lst-dex-adapter-osmosis/Cargo.toml'
- 'smart-contracts/contracts/lst-dex-adapter-osmosis/**.rs'
- 'smart-contracts/osmosis/contracts/lst-dex-adapter-osmosis/Cargo.toml'
- 'smart-contracts/osmosis/contracts/lst-dex-adapter-osmosis/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/lst_dex_adapter_osmosis.yml'
workflow_dispatch:
Expand All @@ -23,4 +23,5 @@ jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
target: 'contracts/lst-dex-adapter-osmosis'
target: contracts/lst-dex-adapter-osmosis
workspace: osmosis
32 changes: 0 additions & 32 deletions .github/workflows/merkle_incentives.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/merkle_incentives_osmosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Merkle Incentives (osmosis)

on:
pull_request:
branches:
- main
paths:
- 'smart-contracts/osmosis/contracts/merkle-incentives/Cargo.toml'
- 'smart-contracts/osmosis/contracts/merkle-incentives/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/merkle_incentives_osmosis.yml'
push:
branches:
- main
paths:
- 'smart-contracts/osmosis/contracts/merkle-incentives/Cargo.toml'
- 'smart-contracts/osmosis/contracts/merkle-incentives/**.rs'
- '.github/workflows/rust_basic.yml'
- '.github/workflows/merkle_incentives_osmosis.yml'
workflow_dispatch:

jobs:
unit-test:
uses: ./.github/workflows/rust_basic.yml
with:
target: contracts/merkle-incentives
workspace: osmosis
Loading

0 comments on commit 0d37cc5

Please sign in to comment.