From 56ada49d58c84d9d2c33a7fc9c9be5041b8193b0 Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Tue, 15 Oct 2024 15:32:32 +0200 Subject: [PATCH 1/8] Publish to scarbs.dev --- .github/workflows/publish_plugins.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index 9a515022d..1f04672e3 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -35,10 +35,9 @@ jobs: for package_dir in *; do if [ -d "$package_dir" ] && [ "$package_dir" != "core" ]; then pushd "$package_dir" - scarb publish --no-verify + scarb publish --index https://scarbs.dev --no-verify popd fi done env: SCARB_REGISTRY_AUTH_TOKEN: ${{ secrets.SCARB_REGISTRY_AUTH_TOKEN }} - From 4fe0512765b7b5df852cc306a8109bebd51eb81e Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Tue, 15 Oct 2024 15:42:42 +0200 Subject: [PATCH 2/8] Trigger on PR --- .github/workflows/publish_plugins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index 1f04672e3..bc0e1162c 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -3,6 +3,7 @@ on: release: types: - published + pull_request: jobs: publish: From ff28a9015df67e7c2451128dbc4bac4281bcafac Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Tue, 15 Oct 2024 15:42:57 +0200 Subject: [PATCH 3/8] Use Scarb `2.8.4+nightly-2024-10-15` --- .github/workflows/publish_plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index bc0e1162c..79e4c89db 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -15,7 +15,7 @@ jobs: - uses: software-mansion/setup-scarb@v1 with: - scarb-version: ${{ github.ref_name }} + scarb-version: nightly-2024-10-15 - name: Init Scarb to cache plugins id: scarb-init From 15680d2716df0c625ecb99a60d4d82f3db7b4992 Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Tue, 15 Oct 2024 15:45:38 +0200 Subject: [PATCH 4/8] Disable regular CI --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 144278208..fc5ee1ed6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,6 @@ on: push: branches: - main - pull_request: merge_group: jobs: From 8b2735cdac40928b0b8b75a579947b17a3022880 Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Tue, 15 Oct 2024 15:58:33 +0200 Subject: [PATCH 5/8] Show file tree for cache dir --- .github/workflows/publish_plugins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index 79e4c89db..ed5ff65bc 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -32,6 +32,7 @@ jobs: - name: Publish plugins from cache run: | set -eo pipefail + tree -a $HOME/.cache/scarb/ pushd $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }} for package_dir in *; do if [ -d "$package_dir" ] && [ "$package_dir" != "core" ]; then From 2f933d26a61b7af86f76d1af76864ca42fc41135 Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Tue, 15 Oct 2024 16:57:36 +0200 Subject: [PATCH 6/8] Remove tree; Use path with commit hash --- .github/workflows/publish_plugins.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index ed5ff65bc..123857ec0 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -32,8 +32,7 @@ jobs: - name: Publish plugins from cache run: | set -eo pipefail - tree -a $HOME/.cache/scarb/ - pushd $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }} + pushd $HOME/.cache/scarb/registry/std/7a2cdc90b for package_dir in *; do if [ -d "$package_dir" ] && [ "$package_dir" != "core" ]; then pushd "$package_dir" From a6fedf508ba67d75a708ebcd5e3bdbe7766dcd52 Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Wed, 16 Oct 2024 11:53:16 +0200 Subject: [PATCH 7/8] Use scarbs.dev --- .github/workflows/publish_plugins.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index 917f80638..1927a2d0a 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -35,27 +35,27 @@ jobs: id: check-plugins run: | set -eo pipefail - echo "assert_macros_exists=$(curl -s https://scarbs.xyz/api/v1/index/as/se/assert_macros.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT - echo "cairo_run_exists=$(curl -s https://scarbs.xyz/api/v1/index/ca/ir/cairo_run.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT - echo "starknet_exists=$(curl -s https://scarbs.xyz/api/v1/index/st/ar/starknet.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT - echo "cairo_test_exists=$(curl -s https://scarbs.xyz/api/v1/index/te/st/test_plugin.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT + echo "assert_macros_exists=$(curl -s https://scarbs.dev/api/v1/index/as/se/assert_macros.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT + echo "cairo_run_exists=$(curl -s https://scarbs.dev/api/v1/index/ca/ir/cairo_run.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT + echo "starknet_exists=$(curl -s https://scarbs.dev/api/v1/index/st/ar/starknet.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT + echo "cairo_test_exists=$(curl -s https://scarbs.dev/api/v1/index/te/st/test_plugin.json | jq --arg version "${{ steps.scarb-init.outputs.CAIRO_VERSION }}" '[.[] | select(.v == $version)] | length > 0')" >> $GITHUB_OUTPUT - name: Publish starknet if: steps.check-plugins.outputs.starknet_exists != 'true' working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/starknet - run: scarb publish --no-verify + run: scarb publish --index https://scarbs.dev --no-verify - name: Publish cairo_run if: steps.check-plugins.outputs.cairo_run_exists != 'true' working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/cairo_run - run: scarb publish --no-verify + run: scarb publish --index https://scarbs.dev --no-verify - name: Publish cairo_test if: steps.check-plugins.outputs.cairo_test_exists != 'true' working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/test_plugin - run: scarb publish --no-verify + run: scarb publish --index https://scarbs.dev --no-verify - name: Publish assert_macros if: steps.check-plugins.outputs.assert_macros_exists != 'true' working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/assert_macros - run: scarb publish --no-verify + run: scarb publish --index https://scarbs.dev --no-verify From e006105b465a5506e4a4c167f1ad81ec2597adbe Mon Sep 17 00:00:00 2001 From: Maksim Zdobnikau Date: Wed, 16 Oct 2024 12:48:51 +0200 Subject: [PATCH 8/8] Use path with commit hash --- .github/workflows/publish_plugins.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_plugins.yml b/.github/workflows/publish_plugins.yml index bf9fdbe52..c65732882 100644 --- a/.github/workflows/publish_plugins.yml +++ b/.github/workflows/publish_plugins.yml @@ -42,20 +42,20 @@ jobs: - name: Publish starknet if: steps.check-plugins.outputs.starknet_exists != 'true' - working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/starknet + working-directory: $HOME/.cache/scarb/registry/std/7a2cdc90b/starknet run: scarb publish --index https://scarbs.dev --no-verify - name: Publish cairo_run if: steps.check-plugins.outputs.cairo_run_exists != 'true' - working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/cairo_run + working-directory: $HOME/.cache/scarb/registry/std/7a2cdc90b/cairo_run run: scarb publish --index https://scarbs.dev --no-verify - name: Publish cairo_test if: steps.check-plugins.outputs.cairo_test_exists != 'true' - working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/test_plugin + working-directory: $HOME/.cache/scarb/registry/std/7a2cdc90b/test_plugin run: scarb publish --index https://scarbs.dev --no-verify - name: Publish assert_macros if: steps.check-plugins.outputs.assert_macros_exists != 'true' - working-directory: $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/assert_macros + working-directory: $HOME/.cache/scarb/registry/std/7a2cdc90b/assert_macros run: scarb publish --index https://scarbs.dev --no-verify