From 53ebcad74cdc955f785ba5f4e7c2e5f07e363841 Mon Sep 17 00:00:00 2001 From: Samuel Vanderwaal Date: Wed, 13 Nov 2024 20:46:35 -0900 Subject: [PATCH 1/3] cache and restore dumped accounts --- template/base/.github/workflows/main.yml.njk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/template/base/.github/workflows/main.yml.njk b/template/base/.github/workflows/main.yml.njk index 97e28f1..4ae7d82 100644 --- a/template/base/.github/workflows/main.yml.njk +++ b/template/base/.github/workflows/main.yml.njk @@ -98,6 +98,12 @@ jobs: path: ./**/*.so key: {% raw %}${{ runner.os }}-builds-${{ github.sha }}{% endraw %} + - name: Save Dumped Accounts For Client Jobs + uses: actions/cache/save@v4 + with: + path: ./target/deploy/*.json + key: {% raw %}${{ runner.os }}-accounts-${{ github.sha }}{% endraw %} + test_programs: name: Test Programs runs-on: ubuntu-latest @@ -188,6 +194,12 @@ jobs: path: ./**/*.so key: {% raw %}${{ runner.os }}-builds-${{ github.sha }}{% endraw %} + - name: Restore Dumped Accounts For Client Jobs + uses: actions/cache/restore@v4 + with: + path: ./target/deploy/*.json + key: {% raw %}${{ runner.os }}-accounts-${{ github.sha }}{% endraw %} + - name: Test Client JS run: pnpm clients:js:test {% endif %} From 618c3e8fd206608d882802fe4191202ac5656fdf Mon Sep 17 00:00:00 2001 From: Samuel Vanderwaal Date: Thu, 14 Nov 2024 09:03:12 -0900 Subject: [PATCH 2/3] combine account caching into program build --- template/base/.github/workflows/main.yml.njk | 24 +++++++------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/template/base/.github/workflows/main.yml.njk b/template/base/.github/workflows/main.yml.njk index 4ae7d82..17ee5d2 100644 --- a/template/base/.github/workflows/main.yml.njk +++ b/template/base/.github/workflows/main.yml.njk @@ -92,18 +92,14 @@ jobs: path: ./target/deploy/*.so if-no-files-found: error - - name: Save Program Builds For Client Jobs + - name: Save Client Artifacts uses: actions/cache/save@v4 with: - path: ./**/*.so + path: | + ./**/*.so + ./target/deploy/*.json key: {% raw %}${{ runner.os }}-builds-${{ github.sha }}{% endraw %} - - name: Save Dumped Accounts For Client Jobs - uses: actions/cache/save@v4 - with: - path: ./target/deploy/*.json - key: {% raw %}${{ runner.os }}-accounts-${{ github.sha }}{% endraw %} - test_programs: name: Test Programs runs-on: ubuntu-latest @@ -188,18 +184,14 @@ jobs: with: solana: true - - name: Restore Program Builds + - name: Restore Client Artifacts uses: actions/cache/restore@v4 with: - path: ./**/*.so + path: | + ./**/*.so + ./target/deploy/*.json key: {% raw %}${{ runner.os }}-builds-${{ github.sha }}{% endraw %} - - name: Restore Dumped Accounts For Client Jobs - uses: actions/cache/restore@v4 - with: - path: ./target/deploy/*.json - key: {% raw %}${{ runner.os }}-accounts-${{ github.sha }}{% endraw %} - - name: Test Client JS run: pnpm clients:js:test {% endif %} From 9c9056bc5bf83626f4d91df71c99315d19742300 Mon Sep 17 00:00:00 2001 From: Samuel Vanderwaal Date: Thu, 14 Nov 2024 09:03:24 -0900 Subject: [PATCH 3/3] add changeset --- .changeset/dull-horses-taste.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dull-horses-taste.md diff --git a/.changeset/dull-horses-taste.md b/.changeset/dull-horses-taste.md new file mode 100644 index 0000000..6f37078 --- /dev/null +++ b/.changeset/dull-horses-taste.md @@ -0,0 +1,5 @@ +--- +"create-solana-program": patch +--- + +Cache and restore external accounts