-
Notifications
You must be signed in to change notification settings - Fork 16
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
16 changed files
with
479 additions
and
325 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
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,94 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
SOLANA_CLI_VERSION: 1.14.17 | ||
jobs: | ||
release: | ||
name: Create the jito programs release | ||
runs-on: big-runner-1 | ||
|
||
steps: | ||
# Setup | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/setup/ | ||
- uses: ./.github/actions/setup-solana/ | ||
- uses: actions/cache@v2 | ||
name: Cache Cargo registry + index | ||
id: cache-anchor | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
./mev-programs/target/ | ||
key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }} | ||
- run: cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked --force | ||
- name: Install yarn dependencies | ||
working-directory: ./mev-programs | ||
run: yarn | ||
|
||
# Build IDLs | ||
- name: Build jito_tip_distribution | ||
working-directory: ./mev-programs | ||
run: anchor build --idl idl --program-name jito_tip_distribution | ||
- name: Build jito_tip_payment | ||
working-directory: ./mev-programs | ||
run: anchor build --idl idl --program-name jito_tip_payment | ||
|
||
# Test | ||
- name: Run Anchor test | ||
working-directory: ./mev-programs | ||
run: anchor test | ||
|
||
# Verified build | ||
# --force because the cargo cache has it saved | ||
- name: Install Solana Verify | ||
run: | | ||
cargo install solana-verify --force | ||
solana-verify --version | ||
- name: Verifiable Build | ||
working-directory: ./mev-programs | ||
run: | | ||
solana-verify build --library-name jito_tip_distribution | ||
solana-verify build --library-name jito_tip_payment | ||
# Make sure no uncommitted changes | ||
- name: Check for diff | ||
run: git diff --exit-code | ||
|
||
# Push to anchor repository | ||
- name: Anchor Login | ||
working-directory: ./mev-programs | ||
run: anchor login ${{ secrets.ANCHOR_PUBLISH_TOKEN }} | ||
- name: Publish tip-payment source code | ||
working-directory: ./mev-programs | ||
run: yes 'yes' | anchor publish jito_tip_payment --skip-build --provider.cluster mainnet | ||
- name: Publish tip-distribution source code | ||
working-directory: ./mev-programs | ||
run: yes 'yes' | anchor publish jito_tip_distribution --skip-build --provider.cluster mainnet | ||
|
||
# Upload artifacts | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
path: | | ||
mev-programs/target/deploy/jito_tip_distribution.so | ||
mev-programs/target/deploy/jito_tip_payment.so | ||
mev-programs/target/idl/jito_tip_distribution.json | ||
mev-programs/target/idl/jito_tip_payment.json | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
mev-programs/target/deploy/jito_tip_distribution.so | ||
mev-programs/target/deploy/jito_tip_payment.so | ||
mev-programs/target/idl/jito_tip_distribution.json | ||
mev-programs/target/idl/jito_tip_payment.json |
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.