-
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.
- Loading branch information
Showing
72 changed files
with
4,588 additions
and
5,434 deletions.
There are no files selected for viewing
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,61 @@ | ||
name: Build (Go) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- fix/* | ||
paths-ignore: | ||
- 'smart-contracts/**' | ||
- '**.md' | ||
push: | ||
branches: | ||
- main | ||
- fix/* | ||
paths-ignore: | ||
- 'smart-contracts/**' | ||
- '**.md' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-go: | ||
name: quasar-${{ matrix.targetos }}-${{ matrix.arch }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [ amd64, arm64 ] | ||
targetos: [ linux ] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Get git diff | ||
uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
Makefile | ||
.github/workflows/build.yml | ||
- name: Setup Golang | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.7 | ||
env: | ||
GOOS: ${{ matrix.targetos }} | ||
GOARCH: ${{ matrix.arch }} | ||
- name: Display go version | ||
if: env.GIT_DIFF | ||
run: go version | ||
- name: Build quasarnoded | ||
if: env.GIT_DIFF | ||
run: make build-reproducible-${{ matrix.arch }} | ||
- uses: actions/upload-artifact@v3 | ||
if: env.GIT_DIFF | ||
with: | ||
name: quasarnoded-${{ matrix.targetos }}-${{ matrix.arch }} | ||
path: build/quasarnoded-${{ matrix.targetos }}-${{ matrix.arch }} |
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,31 @@ | ||
name: Store cargo build cache | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/**.rs' | ||
- 'smart-contracts/**.toml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
store-build-cache: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Rust check | ||
run: cargo check | ||
working-directory: smart-contracts | ||
- name: Store dependencies | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
~/.cargo | ||
~/go | ||
**/target | ||
key: ${{ runner.os }}-cargo-$GITHUB_SHA | ||
restore-keys: ${{ runner.os }}-cargo |
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,33 @@ | ||
name: CL Vault | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/contracts/cl-vault/Cargo.toml' | ||
- 'smart-contracts/contracts/cl-vault/**.rs' | ||
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml' | ||
- 'smart-contracts/contracts/dex-router-osmosis/**.rs' | ||
- '.github/workflows/**.yml' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/contracts/cl-vault/Cargo.toml' | ||
- 'smart-contracts/contracts/cl-vault/**.rs' | ||
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml' | ||
- 'smart-contracts/contracts/dex-router-osmosis/**.rs' | ||
- '.github/workflows/**.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-test: | ||
uses: ./.github/workflows/rust_basic.yml | ||
with: | ||
target: 'contracts/cl-vault' | ||
test-tube: | ||
uses: ./.github/workflows/rust_test_tube.yml | ||
with: | ||
contract: 'cl-vault' | ||
dex_router_osmosis: true |
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: Dex Router (osmosis) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml' | ||
- 'smart-contracts/contracts/dex-router-osmosis/**.rs' | ||
- '.github/workflows/**.yml' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/contracts/dex-router-osmosis/Cargo.toml' | ||
- 'smart-contracts/contracts/dex-router-osmosis/**.rs' | ||
- '.github/workflows/**.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' |
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 |
---|---|---|
@@ -1,12 +1,18 @@ | ||
name: Lint Quasar code | ||
name: Lint (Go) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'smart-contracts/**' | ||
- '**.md' | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'smart-contracts/**' | ||
- '**.md' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
@@ -39,27 +45,4 @@ jobs: | |
run: go version | ||
- name: Go lint | ||
if: env.GIT_DIFF | ||
run: make lint | ||
lint-rust: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Get git diff | ||
uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/**.rs | ||
Makefile | ||
- name: Install Rust | ||
if: env.GIT_DIFF | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Show versions | ||
if: env.GIT_DIFF | ||
run: rustc -V && cargo -V | ||
- name: Rust lint | ||
if: env.GIT_DIFF | ||
run: cd smart-contracts && RUSTFLAGS="-Dwarnings" cargo clippy --workspace -- -D warnings --A deprecated | ||
- name: Rust format check | ||
if: env.GIT_DIFF | ||
run: cd smart-contracts && cargo fmt --all -- --check | ||
run: make lint |
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,26 @@ | ||
name: LST Adapter (osmosis) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/contracts/lst-adapter-osmosis/Cargo.toml' | ||
- 'smart-contracts/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' | ||
- '.github/workflows/rust_basic.yml' | ||
- '.github/workflows/lst_adapter_osmosis.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-test: | ||
uses: ./.github/workflows/rust_basic.yml | ||
with: | ||
target: 'contracts/lst-adapter-osmosis' |
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,26 @@ | ||
name: LST Dex Adapter (osmosis) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'smart-contracts/contracts/lst-dex-adapter-osmosis/Cargo.toml' | ||
- 'smart-contracts/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' | ||
- '.github/workflows/rust_basic.yml' | ||
- '.github/workflows/lst_dex_adapter_osmosis.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-test: | ||
uses: ./.github/workflows/rust_basic.yml | ||
with: | ||
target: 'contracts/lst-dex-adapter-osmosis' |
Oops, something went wrong.