Skip to content

Commit

Permalink
CI patch
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Jun 23, 2024
1 parent 1f0b1a6 commit 569bbfa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.rustup/toolchains/${{ env.NIGHTLY_TOOLCHAIN }}
key: ${{ runner.os }}-rust-toolchain-${{ env.NIGHTLY_TOOLCHAIN }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
Expand All @@ -34,36 +30,44 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.rustup/toolchains/${{ env.NIGHTLY_TOOLCHAIN }}
key: ${{ runner.os }}-rust-toolchain-${{ env.NIGHTLY_TOOLCHAIN }}
path: |
~/.cargo/registry
~/.cargo/git
key: cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-clippy-
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: clippy
- name: Run clippy
run: cargo +${{ env.NIGHTLY_TOOLCHAIN }} clippy --all -- --deny=warnings
run: cargo +${{ env.NIGHTLY_TOOLCHAIN }} clippy --all --tests -- --deny=warnings

cargo_build_test:
name: Cargo Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-solana-toolchain
with:
path: ~/.local/share/solana/install/active_release/bin/solana
key: ${{ runner.os }}-solana-${{ env.SOLANA_VERSION }}
path: |
~/.local/share/solana/install/releases/${{ env.SOLANA_VERSION }}
~/.cache/solana
key: solana-toolchain-${{ env.SOLANA_VERSION }}
restore-keys: |
solana-toolchain-
- uses: actions/cache@v4
with:
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
~/.cargo/registry
~/.cargo/git
key: cargo-build-sbf-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
cargo-build-sbf-
- uses: metaplex-foundation/actions/install-solana@v1
if: steps.cache-solana-toolchain.outputs.cache-hit != 'true'
with:
version: ${{ env.SOLANA_VERSION }}
- name: Build test program
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down

0 comments on commit 569bbfa

Please sign in to comment.