-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync changes, add github action (#7)
* sync changes, add github action * fix cli * fix ci for sdk * fix ci for sdk * fix ci for sdk
- Loading branch information
1 parent
2f490c2
commit 8257f2d
Showing
51 changed files
with
7,396 additions
and
5,109 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,10 @@ | ||
name: "Setup anchor-cli" | ||
description: "Setup node js and anchor cli" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- run: npm install -g @coral-xyz/anchor-cli@${{ env.ANCHOR_CLI_VERSION }} yarn | ||
shell: bash |
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,7 @@ | ||
name: "Setup" | ||
description: "Setup program dependencies" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev | ||
shell: bash |
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,21 @@ | ||
name: "Setup Solana" | ||
description: "Setup Solana" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/cache@v2 | ||
name: Cache Solana Tool Suite | ||
id: cache-solana | ||
with: | ||
path: | | ||
~/.cache/solana/ | ||
~/.local/share/solana/ | ||
key: solana-${{ runner.os }}-v0000-${{ env.SOLANA_CLI_VERSION }} | ||
- run: sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_CLI_VERSION }}/install)" | ||
shell: bash | ||
- run: echo "$HOME/.local/share/solana/install/active_release/bin/" >> $GITHUB_PATH | ||
shell: bash | ||
- run: solana-keygen new --no-bip39-passphrase | ||
shell: bash | ||
- run: solana config set --url localhost | ||
shell: bash |
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,46 @@ | ||
name: Lb Clmm Cli | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SOLANA_CLI_VERSION: 1.16.1 | ||
NODE_VERSION: 18.14.2 | ||
ANCHOR_CLI_VERSION: 0.28.0 | ||
|
||
jobs: | ||
cli_changed_files: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cli: ${{steps.changed-files-specific.outputs.any_changed}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get specific changed files | ||
id: changed-files-specific | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
cli | ||
cli_build: | ||
runs-on: ubuntu-latest | ||
needs: cli_changed_files | ||
if: needs.cli_changed_files.outputs.cli == 'true' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/setup-solana | ||
- uses: ./.github/actions/setup-dep | ||
- uses: ./.github/actions/setup-anchor | ||
# Install rust + toolchain | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
# Cache rust, cargo | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: cargo build -p cli | ||
shell: bash |
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,46 @@ | ||
name: Lb Clmm Cli | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SOLANA_CLI_VERSION: 1.16.1 | ||
NODE_VERSION: 18.14.2 | ||
ANCHOR_CLI_VERSION: 0.28.0 | ||
|
||
jobs: | ||
market_making_changed_files: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
market_making: ${{steps.changed-files-specific.outputs.any_changed}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get specific changed files | ||
id: changed-files-specific | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
market_making | ||
market_making_build: | ||
runs-on: ubuntu-latest | ||
needs: market_making_changed_files | ||
if: needs.market_making_changed_files.outputs.market_making == 'true' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/setup-solana | ||
- uses: ./.github/actions/setup-dep | ||
- uses: ./.github/actions/setup-anchor | ||
# Install rust + toolchain | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
# Cache rust, cargo | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: cargo build -p market_making | ||
shell: bash |
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,46 @@ | ||
name: Lb Clmm Program | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SOLANA_CLI_VERSION: 1.16.1 | ||
NODE_VERSION: 18.14.2 | ||
ANCHOR_CLI_VERSION: 0.28.0 | ||
|
||
jobs: | ||
program_changed_files: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
program: ${{steps.changed-files-specific.outputs.any_changed}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get specific changed files | ||
id: changed-files-specific | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
programs/lb_clmm | ||
lb_clmm_anchor_build: | ||
runs-on: ubuntu-latest | ||
needs: program_changed_files | ||
if: needs.program_changed_files.outputs.program == 'true' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/setup-solana | ||
- uses: ./.github/actions/setup-dep | ||
- uses: ./.github/actions/setup-anchor | ||
# Install rust + toolchain | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
# Cache rust, cargo | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: anchor build | ||
shell: bash |
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,54 @@ | ||
name: Lb Clmm SDK | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SOLANA_CLI_VERSION: 1.16.1 | ||
NODE_VERSION: 18.14.2 | ||
ANCHOR_CLI_VERSION: 0.28.0 | ||
|
||
jobs: | ||
sdk_changed_files: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
sdk: ${{steps.changed-files-specific.outputs.any_changed}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get specific changed files | ||
id: changed-files-specific | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
ts-client | ||
sdk_test: | ||
runs-on: ubuntu-latest | ||
needs: sdk_changed_files | ||
if: needs.sdk_changed_files.outputs.sdk == 'true' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/setup-solana | ||
- uses: ./.github/actions/setup-dep | ||
- uses: ./.github/actions/setup-anchor | ||
# Install rust + toolchain | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
# Cache node_modules | ||
- uses: actions/cache@v2 | ||
id: cache-node-modules | ||
with: | ||
path: ./ts-client/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }} | ||
- run: anchor build -- --features localnet | ||
shell: bash | ||
- run: anchor localnet -- --features localnet & sleep 2 | ||
shell: bash | ||
- run: cd ts-client && npm install && npm run test | ||
shell: bash |
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 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 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 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 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 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 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 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 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
Oops, something went wrong.