From 97eb495345dbc4c4bf5d3d869948d085601c625b Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Tue, 12 Apr 2022 16:10:40 -0400 Subject: [PATCH 1/3] ci: fix no cashing tests --- .github/workflows/no-cashing-tests.yaml | 20 ++++++++++++-------- .github/workflows/tests.yaml | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/no-cashing-tests.yaml b/.github/workflows/no-cashing-tests.yaml index 273fa21c5d..cf73061f63 100644 --- a/.github/workflows/no-cashing-tests.yaml +++ b/.github/workflows/no-cashing-tests.yaml @@ -4,6 +4,9 @@ on: push: branches: - master + pull_request: + branches: + - master env: SOLANA_CLI_VERSION: 1.9.13 NODE_VERSION: 17.0.1 @@ -43,9 +46,10 @@ jobs: - uses: ./.github/actions/setup/ - run: cargo install --path cli anchor-cli --locked --force + - run: chmod +x ~/.cargo/bin/anchor - uses: actions/upload-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/anchor - uses: ./.github/actions/git-diff/ @@ -59,7 +63,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor - uses: ./.github/actions/setup/ @@ -92,7 +96,7 @@ jobs: - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor - run: cd ${{ matrix.node.path }} && anchor build --skip-lint @@ -114,7 +118,7 @@ jobs: - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - uses: actions/download-artifact@v2 with: @@ -149,7 +153,7 @@ jobs: - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: solana-test-validator -r --quiet & @@ -188,7 +192,7 @@ jobs: shell: bash - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: chmod +x ~/.cargo/bin/anchor @@ -210,7 +214,7 @@ jobs: - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && anchor test && yarn lint:fix @@ -287,7 +291,7 @@ jobs: - uses: actions/download-artifact@v2 with: - name: anchor-binary + name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: ${{ matrix.node.cmd }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 772954ccfe..533d42a8c4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -68,6 +68,7 @@ jobs: ./target/ key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }} - run: cargo install --path cli anchor-cli --locked --force + - run: chmod +x ~/.cargo/bin/anchor - uses: actions/upload-artifact@v2 with: name: anchor-binary From ad697bf3bb81a48a88bc801fbeb2ac421559cb2b Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Tue, 12 Apr 2022 16:26:22 -0400 Subject: [PATCH 2/3] ci: add chmod +x to anchor bin --- .github/workflows/no-cashing-tests.yaml | 7 +++++++ .github/workflows/tests.yaml | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/no-cashing-tests.yaml b/.github/workflows/no-cashing-tests.yaml index cf73061f63..045b49ca56 100644 --- a/.github/workflows/no-cashing-tests.yaml +++ b/.github/workflows/no-cashing-tests.yaml @@ -66,6 +66,7 @@ jobs: name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor + - uses: ./.github/actions/setup/ - uses: ./.github/actions/setup-solana/ - uses: ./.github/actions/setup-ts/ @@ -99,6 +100,7 @@ jobs: name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor + - run: cd ${{ matrix.node.path }} && anchor build --skip-lint - uses: actions/upload-artifact@v2 with: @@ -120,6 +122,8 @@ jobs: with: name: anchor-binary-no-caching path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor + - uses: actions/download-artifact@v2 with: name: events.so @@ -155,6 +159,7 @@ jobs: with: name: anchor-binary-no-caching path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor - run: solana-test-validator -r --quiet & name: start validator @@ -216,6 +221,7 @@ jobs: with: name: anchor-binary-no-caching path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && anchor test && yarn lint:fix - uses: ./.github/actions/git-diff/ @@ -293,6 +299,7 @@ jobs: with: name: anchor-binary-no-caching path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor - run: ${{ matrix.node.cmd }} name: ${{ matrix.node.path }} program test diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 533d42a8c4..81f6f03679 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -88,6 +88,7 @@ jobs: name: anchor-binary path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor + - uses: ./.github/actions/setup/ - uses: ./.github/actions/setup-solana/ - uses: ./.github/actions/setup-ts/ @@ -151,6 +152,7 @@ jobs: name: anchor-binary path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor + - run: cd ${{ matrix.node.path }} && anchor build --skip-lint - uses: actions/upload-artifact@v2 with: @@ -172,6 +174,8 @@ jobs: with: name: anchor-binary path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor + - uses: actions/download-artifact@v2 with: name: events.so @@ -225,6 +229,7 @@ jobs: with: name: anchor-binary path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor - uses: actions/cache@v2 name: Cache tests/bpf-upgradeable-state target @@ -280,6 +285,7 @@ jobs: name: anchor-binary path: ~/.cargo/bin/ - run: chmod +x ~/.cargo/bin/anchor + - uses: actions/cache@v2 name: Cache tests/misc target id: cache-test-target @@ -319,6 +325,7 @@ jobs: with: name: anchor-binary path: ~/.cargo/bin/ + - run: chmod +x ~/.cargo/bin/anchor - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && anchor test && yarn lint:fix - uses: ./.github/actions/git-diff/ @@ -408,7 +415,8 @@ jobs: with: name: anchor-binary path: ~/.cargo/bin/ - + - run: chmod +x ~/.cargo/bin/anchor + - uses: actions/cache@v2 name: Cache ${{ matrix.node.path }} target id: cache-test-target From 2fd961b43b157eaf14486b6d97fa34c336f5a03d Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Tue, 12 Apr 2022 16:54:24 -0400 Subject: [PATCH 3/3] ci: remove onpullrequest trigger for no cashing test --- .github/workflows/no-cashing-tests.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/no-cashing-tests.yaml b/.github/workflows/no-cashing-tests.yaml index 045b49ca56..2e11e56546 100644 --- a/.github/workflows/no-cashing-tests.yaml +++ b/.github/workflows/no-cashing-tests.yaml @@ -4,9 +4,6 @@ on: push: branches: - master - pull_request: - branches: - - master env: SOLANA_CLI_VERSION: 1.9.13 NODE_VERSION: 17.0.1 @@ -100,7 +97,7 @@ jobs: name: anchor-binary-no-caching path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor - + - run: cd ${{ matrix.node.path }} && anchor build --skip-lint - uses: actions/upload-artifact@v2 with: