Skip to content

Commit

Permalink
Resolving conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamchordia committed Jul 22, 2024
2 parents f919333 + f443574 commit 7a7cdb5
Show file tree
Hide file tree
Showing 72 changed files with 4,588 additions and 5,434 deletions.
130 changes: 0 additions & 130 deletions .github/workflows/build.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/build_go.yml
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 }}
31 changes: 31 additions & 0 deletions .github/workflows/cargo_build_cache.yml
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
33 changes: 33 additions & 0 deletions .github/workflows/cl_vault.yml
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
28 changes: 28 additions & 0 deletions .github/workflows/dex_router_osmosis.yml
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'
33 changes: 8 additions & 25 deletions .github/workflows/lint.yml → .github/workflows/lint_go.yml
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:
Expand Down Expand Up @@ -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
26 changes: 26 additions & 0 deletions .github/workflows/lst_adapter_osmosis.yml
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'
26 changes: 26 additions & 0 deletions .github/workflows/lst_dex_adapter_osmosis.yml
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'
Loading

0 comments on commit 7a7cdb5

Please sign in to comment.