-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 48040ad
Showing
38 changed files
with
6,857 additions
and
0 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,24 @@ | ||
name: rust-toolchain | ||
inputs: | ||
toolchain: | ||
description: "Which rust toolchain to use" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: get-toolchain | ||
shell: bash | ||
run: | | ||
USER_OVERRIDE=${{ inputs.toolchain }} | ||
DEFAULT_TOOLCHAIN=$(grep channel rust-toolchain.toml | awk '{print $3}' | sed 's/"//g') | ||
TOOLCHAIN=${USER_OVERRIDE:-$DEFAULT_TOOLCHAIN} | ||
echo "toolchain=$TOOLCHAIN" >> $GITHUB_OUTPUT | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ steps.get-toolchain.outputs.toolchain }} | ||
override: true | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: "svm-test" |
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,15 @@ | ||
name: solana-toolchain | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: get-version | ||
shell: bash | ||
run: | | ||
SOLANA_VERSION=$(cat solana-toolchain) | ||
echo "solana-version=$SOLANA_VERSION" >> $GITHUB_OUTPUT | ||
- uses: metaplex-foundation/actions/install-solana@v1 | ||
with: | ||
cache: true | ||
version: ${{ steps.get-version.outputs.solana-version }} | ||
|
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,78 @@ | ||
name: ci-rust-push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
skip-duplicates: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
with: | ||
concurrent_skipping: "same_content_newer" | ||
|
||
check: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/workflows/actions/rust-toolchain | ||
- run: cargo check --all-features | ||
|
||
test: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/workflows/actions/rust-toolchain | ||
- uses: ./.github/workflows/actions/solana-toolchain | ||
- run: ./scripts/build_sbf.sh | ||
- run: cargo test --all-features | ||
|
||
fmt: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/workflows/actions/rust-toolchain | ||
with: | ||
toolchain: nightly | ||
- run: rustup component add rustfmt | ||
- run: cargo fmt --all --check | ||
|
||
clippy: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/workflows/actions/rust-toolchain | ||
- run: rustup component add clippy | ||
- run: cargo clippy --all-features -- --deny warnings | ||
|
||
doc: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: ./.github/workflows/actions/rust-toolchain | ||
- run: cargo doc --all-features --no-deps |
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 @@ | ||
/target |
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,3 @@ | ||
[submodule "test-data"] | ||
path = test-data | ||
url = https://github.com/OliverNChalk/svm-test-data.git |
Oops, something went wrong.