pump ver and add claim fee #317
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
name: CICD on main | |
on: | |
pull_request: | |
push: | |
paths-ignore: | |
- "docs/**" | |
- "README.md" | |
- "LICENSE" | |
- ".editorconfig" | |
branches: | |
- main | |
- master | |
env: | |
SOLANA_CLI_VERSION: 1.14.6 | |
jobs: | |
changed_files_rust: | |
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: | | |
rust-client | |
programs | |
rust-test-publish: | |
needs: changed_files_rust | |
if: needs.changed_files_rust.outputs.program == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/setup-dep | |
- uses: ./.github/actions/setup-solana | |
# Install rust + toolchain | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
# Cargo build cache | |
- name: Cargo Cache | |
uses: actions/cache@v1 | |
with: | |
path: | | |
~/.cargo/ | |
target | |
key: ${{ runner.os }}-cargo-${{ steps.extract_branch.outputs.branch }} | |
restore-keys: | | |
${{ runner.os }}-cargo-${{ steps.extract_branch.outputs.branch }} | |
${{ runner.os }}-cargo | |
- name: Cargo fmt check | |
run: cargo fmt -- --check | |
shell: bash | |
- name: Cargo test | |
run: cargo test -- --nocapture | |
shell: bash | |
- name: Publish Rust to Crates.io | |
if: github.event_name == 'push' | |
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} -p mercurial-amm |