Skip to content

Commit

Permalink
try without intermediate build
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Oct 1, 2024
1 parent d541644 commit 5049f05
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Cache cargo registry
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo target dir
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: build cargo cache into docker container
run: |
cd ..
docker buildx build ./contracts --platform=linux/amd64 -t solana-build:local
# - name: build cargo cache into docker container
# run: |
# cd ..
# docker buildx build ./contracts --platform=linux/amd64 -t solana-build:local
- name: build from cached artifacts
run: |
cd ..
docker run -v "$(pwd)/":/workdir solana-build:local bash -c "cd /workdir/contracts && anchor build && chmod -R 755 ./target"
docker run -v ~/.cargo/registry:/root/.cargo/registry -v ~/.cargo/git:/root/.cargo/git -v "$(pwd)/":/workdir backpackapp/build:v0.29.0 bash -c "cd /workdir/contracts && anchor build && chmod -R 755 ./target && chmod -R 755 /root/.cargo/registry && chmod -R 755 /root/.cargo/git"
rust_run_anchor_tests:
name: Rust Run Anchor Tests
Expand Down

0 comments on commit 5049f05

Please sign in to comment.