From 86f9e304d6fcd0082727c76cdf9595f9b3ddfc2e Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 1 Nov 2024 14:43:18 -0600 Subject: [PATCH 01/14] report full path during benchmark --- .github/workflows/benchmark_parallel.yml | 4 ++++ .github/workflows/run_test.yml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/benchmark_parallel.yml b/.github/workflows/benchmark_parallel.yml index 97be14ec31..3ce86db173 100644 --- a/.github/workflows/benchmark_parallel.yml +++ b/.github/workflows/benchmark_parallel.yml @@ -58,6 +58,10 @@ jobs: ref: ${{ inputs.base-branch }} token: ${{ secrets.LASTMJS_GITHUB_TOKEN || github.token }} + - name: Report full path of test + # Just in case the path isn't obvious from the name, this will remove ambiguity + run: echo ${{matrix.test.path}} + - uses: ./.github/actions/setup_node - uses: ./.github/actions/setup_dfx diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index f7815fdc1e..79b57998e9 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -20,7 +20,7 @@ on: jobs: run-test: - name: '${{matrix.tests.name}} | ${{matrix.tests.displayPath}} | ${{matrix.azle_source}}' + name: '${{matrix.test.name}} | ${{matrix.test.displayPath}} | ${{matrix.azle_source}}' runs-on: ${{ matrix.os }} env: ETHEREUM_URL: ${{ secrets.ETHEREUM_URL }} @@ -39,7 +39,7 @@ jobs: os: [ubuntu-latest] azle_source: - ${{ inputs.include_npm == true && 'npm' || 'repo' }} - tests: ${{ fromJSON(inputs.test_infos) }} + test: ${{ fromJSON(inputs.test_infos) }} steps: - uses: actions/checkout@v4 @@ -64,7 +64,7 @@ jobs: - name: Report full path of test # Just in case the path isn't obvious from the name, this will remove ambiguity - run: echo ${{matrix.tests.path}} + run: echo ${{matrix.test.path}} - uses: ./.github/actions/setup_node @@ -86,7 +86,7 @@ jobs: npm run lint shell: bash -l {0} - - name: Run pre-test setup for ${{ matrix.tests.name }} + - name: Run pre-test setup for ${{ matrix.test.name }} run: | npm install @@ -95,17 +95,17 @@ jobs: fi npx azle install-dfx-extension - working-directory: ${{ matrix.tests.path }} + working-directory: ${{ matrix.test.path }} shell: bash -l {0} - name: Start dfx with artificial delay 0 if: ${{ steps.set-conditions.outputs.is_feature_branch_pr == 'true' || steps.set-conditions.outputs.is_feature_branch_draft_pr == 'true' }} - working-directory: ${{ matrix.tests.path }} + working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 --artificial-delay 0 - name: Start dfx if: ${{ steps.set-conditions.outputs.is_release_branch_pr == 'true' || steps.set-conditions.outputs.is_main_branch_push == 'true' || steps.set-conditions.outputs.is_main_branch_push_from_release_merge == 'true' }} - working-directory: ${{ matrix.tests.path }} + working-directory: ${{ matrix.test.path }} run: dfx start --clean --background --host 127.0.0.1:8000 - name: Calculate number of test runs @@ -140,7 +140,7 @@ jobs: - name: Run tests run: npm test shell: bash -l {0} - working-directory: ${{ matrix.tests.path }} + working-directory: ${{ matrix.test.path }} env: AZLE_PROPTEST_NUM_RUNS: ${{ steps.calc-runs.outputs.runs }} AZLE_PROPTEST_VERBOSE: true From d32215df88750a8f0222fd25ff01fb6ebc888337 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 1 Nov 2024 14:48:53 -0600 Subject: [PATCH 02/14] use personal github token for pr creation --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3cb268f1ec..54029d626f 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -119,7 +119,7 @@ jobs: - name: Create Pull Request env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.LASTMJS_GITHUB_TOKEN }} run: | gh pr create \ --base main \ From f1ca834c74ed3ed86d3934e17d9a9ce41a974fe0 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 1 Nov 2024 16:40:24 -0600 Subject: [PATCH 03/14] only run repo on regular main pushes --- .github/workflows/get_and_run_tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/get_and_run_tests.yml b/.github/workflows/get_and_run_tests.yml index 4ee002b3c9..ca0dea9d45 100644 --- a/.github/workflows/get_and_run_tests.yml +++ b/.github/workflows/get_and_run_tests.yml @@ -37,8 +37,7 @@ jobs: id: set-conditions - id: set-include-npm run: | - if [[ "${{ steps.set-conditions.outputs.is_main_branch_push }}" == "true" || \ - "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" || \ + if [[ "${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" || \ "${{ steps.set-conditions.outputs.is_release_branch_pr }}" == "true" ]]; then echo "include_npm=true" >> $GITHUB_OUTPUT else From 4f3e65cae8ae59d91edcaacea55990dc263dc8b8 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 1 Nov 2024 16:42:15 -0600 Subject: [PATCH 04/14] update release to use the right token --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2888eb09f6..2840ceb841 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -154,7 +154,7 @@ jobs: - name: Create Pull Request env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.LASTMJS_GITHUB_TOKEN }} run: | gh pr create \ --base main \ From 3b0d5586e8c9c440dbb3dd5492734fd74005c45e Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 15 Nov 2024 15:51:19 -0700 Subject: [PATCH 05/14] add exclusions to the release process --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2840ceb841..ec532980b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,41 @@ on: inputs: release-version: required: true + exclude-slow-benchmarks: + description: 'Exclude slow benchmarks' + required: true + type: boolean + default: false + exclude-unstable-benchmarks: + description: 'Exclude unstable benchmarks' + required: true + type: boolean + default: false + exclude-release-only-benchmarks: + description: 'Exclude release benchmarks' + required: true + type: boolean + default: false jobs: + get-exclude-dirs: + name: Get exclude directories + runs-on: ubuntu-latest + outputs: + exclude-dirs: ${{ steps.get-exclude-dirs.outputs.exclude-dirs }} + steps: + - uses: actions/checkout@v4 + + - id: get-exclude-dirs + uses: ./.github/actions/get_exclude_dirs + with: + exclude-slow: ${{ github.event.inputs.exclude-slow-benchmarks }} + exclude-unstable: ${{ github.event.inputs.exclude-unstable-benchmarks }} + exclude-release-only: ${{ github.event.inputs.exclude-release-only-benchmarks }} + prepare-release: name: Prepare Release + needs: get-exclude-dirs runs-on: ubuntu-latest env: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} # All commits must be verified @@ -57,6 +88,7 @@ jobs: directories: | ./examples ./tests + exclude-dirs: ${{ needs.get-exclude-dirs.outputs.exclude-dirs }} update-test-files-for-release-commit: needs: prepare-release From a83718093d3cc66f0901b48c586649a59ab82251 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 18 Nov 2024 09:41:00 -0700 Subject: [PATCH 06/14] create release branch automatically --- .github/actions/commit_and_push/README.md | 1 + .github/actions/commit_and_push/action.yml | 14 +++-- .github/workflows/benchmark.yml | 30 +++-------- .github/workflows/benchmark_parallel.yml | 1 + .github/workflows/create_branch_prefix.yml | 50 ++++++++++++++++++ .github/workflows/release.yml | 59 ++++++++++++++++------ 6 files changed, 112 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/create_branch_prefix.yml diff --git a/.github/actions/commit_and_push/README.md b/.github/actions/commit_and_push/README.md index 36391926e8..c2e21b6ae5 100644 --- a/.github/actions/commit_and_push/README.md +++ b/.github/actions/commit_and_push/README.md @@ -9,4 +9,5 @@ steps: gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} branch-name: 'branch-name' commit-message: 'commit message' + create-branch: 'true' ``` diff --git a/.github/actions/commit_and_push/action.yml b/.github/actions/commit_and_push/action.yml index b9937de63f..9a56b9e8c0 100644 --- a/.github/actions/commit_and_push/action.yml +++ b/.github/actions/commit_and_push/action.yml @@ -2,8 +2,12 @@ name: Commit and Push Changes description: 'Configures git, commits changes, and pushes to a new branch' inputs: branch-name: - description: 'Name of the branch to create' + description: 'Name of the branch to push to' required: true + create-branch: + description: 'Whether to create a new branch' + required: false + default: 'false' commit-message: description: 'Commit message' required: true @@ -20,8 +24,12 @@ runs: - name: Commit and push changes shell: bash run: | - # Create and switch to new branch - git switch -c "${{ inputs.branch-name }}" + # Create new branch if requested + if [ "${{ inputs.create-branch }}" = "true" ]; then + git switch -c "${{ inputs.branch-name }}" + else + git switch "${{ inputs.branch-name }}" + fi # Show status of working directory echo "Current git status:" diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 54029d626f..1b307ba8a1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -35,30 +35,12 @@ jobs: exclude-release-only: ${{ github.event.inputs.exclude-release-only-benchmarks }} create-branch-prefix: - name: Create Branch and Branch Prefix - runs-on: ubuntu-latest - outputs: - branch-prefix: ${{ steps.create-prefix.outputs.branch-prefix }} - base-branch: ${{ steps.create-prefix.outputs.base-branch }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - id: create-prefix - run: | - VERSION=$(jq -r '.version' package.json) - echo "branch-prefix=benchmark--$VERSION-" >> $GITHUB_OUTPUT - echo "base-branch=benchmark--$VERSION" >> $GITHUB_OUTPUT - - - uses: ./.github/actions/configure_git - with: - gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} - - - name: Create base branch - run: | - git checkout -b ${{ steps.create-prefix.outputs.base-branch }} - git push origin ${{ steps.create-prefix.outputs.base-branch }} + uses: ./.github/workflows/create_branch_prefix.yml + with: + prefix: 'benchmark' + version: VERSION=$(jq -r '.version' package.json) + secrets: + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} run-benchmarks: name: ${{ matrix.benchmark_group.name }} diff --git a/.github/workflows/benchmark_parallel.yml b/.github/workflows/benchmark_parallel.yml index 3ce86db173..91122cd1e2 100644 --- a/.github/workflows/benchmark_parallel.yml +++ b/.github/workflows/benchmark_parallel.yml @@ -95,3 +95,4 @@ jobs: branch-name: ${{ steps.create-branch-name.outputs.branch-name }} commit-message: 'Run benchmarks for ${{ matrix.test.displayPath }}' gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} + create-branch: 'true' diff --git a/.github/workflows/create_branch_prefix.yml b/.github/workflows/create_branch_prefix.yml new file mode 100644 index 0000000000..ee308f544b --- /dev/null +++ b/.github/workflows/create_branch_prefix.yml @@ -0,0 +1,50 @@ +name: Create Branch Prefix +on: + workflow_call: + inputs: + prefix: + required: true + type: string + description: 'Prefix to use for branch names (e.g. benchmark, update)' + version: + required: true + type: string + description: 'Version to use in branch names' + outputs: + branch-prefix: + description: 'The generated branch prefix ({prefix}--{version}-)' + value: ${{ jobs.create-branch-prefix.outputs.branch-prefix }} + base-branch: + description: 'The generated base branch name ({prefix}--{version})' + value: ${{ jobs.create-branch-prefix.outputs.base-branch }} + secrets: + GPG_SIGNING_KEY: + required: true + +jobs: + create-branch-prefix: + name: Create Branch and Branch Prefix + runs-on: ubuntu-latest + outputs: + branch-prefix: ${{ steps.create-prefix.outputs.branch-prefix }} + base-branch: ${{ steps.create-prefix.outputs.base-branch }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + + - id: create-prefix + shell: bash + run: | + VERSION="${{ inputs.version }}" + echo "branch-prefix=${{ inputs.prefix }}--$VERSION-" >> $GITHUB_OUTPUT + echo "base-branch=${{ inputs.prefix }}--$VERSION" >> $GITHUB_OUTPUT + + - uses: ./.github/actions/configure_git + with: + gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} + + - name: Create base branch + run: | + git checkout -b ${{ steps.create-prefix.outputs.base-branch }} + git push origin ${{ steps.create-prefix.outputs.base-branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec532980b1..e00219b279 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,9 +36,19 @@ jobs: exclude-unstable: ${{ github.event.inputs.exclude-unstable-benchmarks }} exclude-release-only: ${{ github.event.inputs.exclude-release-only-benchmarks }} + create-branch-prefix: + uses: ./.github/workflows/create_branch_prefix.yml + with: + prefix: 'update' + version: ${{ inputs.release-version }} + secrets: + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} + prepare-release: name: Prepare Release - needs: get-exclude-dirs + needs: + - get-exclude-dirs + - create-branch-prefix runs-on: ubuntu-latest env: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} # All commits must be verified @@ -49,7 +59,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + ref: ${{ needs.create-branch-prefix.outputs.base-branch }} token: ${{ secrets.LASTMJS_GITHUB_TOKEN || github.token }} - uses: ./.github/actions/setup_node @@ -74,6 +84,12 @@ jobs: AZLE_VERBOSE=true npx azle template AZLE_VERBOSE=true npx azle template --experimental + - uses: ./.github/actions/commit_and_push + with: + branch-name: ${{ needs.create-branch-prefix.outputs.base-branch }} + commit-message: 'Prepare release ${{ inputs.release-version }}' + gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} + - name: Publish to npm run: | if [[ "${{ inputs.release-version }}" == *"-rc."* ]]; then @@ -91,7 +107,9 @@ jobs: exclude-dirs: ${{ needs.get-exclude-dirs.outputs.exclude-dirs }} update-test-files-for-release-commit: - needs: prepare-release + needs: + - prepare-release + - create-branch-prefix name: Update ${{ matrix.test.name }} files for release commit runs-on: ubuntu-latest env: @@ -104,7 +122,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + ref: ${{ needs.create-branch-prefix.outputs.base-branch }} token: ${{ secrets.LASTMJS_GITHUB_TOKEN || github.token }} - uses: ./.github/actions/setup_node @@ -115,7 +133,7 @@ jobs: run: | npm install cd ${{ matrix.test.path }} - sed -E -i "s/(\"azle\": \")(.*)(\")/\1${{ needs.prepare-release.outputs.release-version }}\3/" package.json + sed -E -i "s/(\"azle\": \")(.*)(\")/\1${{ inputs.release-version }}\3/" package.json npm install - name: Start dfx with artificial delay 0 @@ -131,7 +149,7 @@ jobs: id: create-branch-name uses: ./.github/actions/create_branch_name with: - prefix: 'update--${{ needs.prepare-release.outputs.release-version }}-' + prefix: ${{ needs.create-branch-prefix.outputs.branch-prefix }} path: ${{ matrix.test.displayPath }} - uses: ./.github/actions/commit_and_push @@ -139,21 +157,27 @@ jobs: branch-name: ${{ steps.create-branch-name.outputs.branch-name }} commit-message: 'Update test files for ${{ matrix.test.displayPath }}' gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} + create-branch: 'true' squash-branches: - needs: [prepare-release, update-test-files-for-release-commit] + needs: + - prepare-release + - update-test-files-for-release-commit + - create-branch-prefix uses: ./.github/workflows/squash_branches.yml with: - base-branch: release--${{ needs.prepare-release.outputs.release-version }} - branch-prefix: 'update--${{ needs.prepare-release.outputs.release-version }}-' - commit-message: 'Update test files for all tests and examples ${{ needs.prepare-release.outputs.release-version }}' + base-branch: ${{ needs.create-branch-prefix.outputs.base-branch }} + branch-prefix: ${{ needs.create-branch-prefix.outputs.branch-prefix }} + commit-message: 'Update test files for all tests and examples ${{ inputs.release-version }}' secrets: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} LASTMJS_GITHUB_TOKEN: ${{ secrets.LASTMJS_GITHUB_TOKEN }} create-release: - needs: [prepare-release, squash-branches] + needs: + - prepare-release + - squash-branches name: Create Release runs-on: ubuntu-latest steps: @@ -166,7 +190,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - VERSION=${{ needs.prepare-release.outputs.release-version }} + VERSION=${{ inputs.release-version }} git tag $VERSION git push origin $VERSION @@ -177,7 +201,10 @@ jobs: fi create-pr: - needs: [prepare-release, squash-branches] + needs: + - prepare-release + - squash-branches + - create-branch-prefix runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -190,6 +217,6 @@ jobs: run: | gh pr create \ --base main \ - --head release--${{ needs.prepare-release.outputs.release-version }} \ - --title "Release ${{ needs.prepare-release.outputs.release-version }}" \ - --body "Automated PR for release ${{ needs.prepare-release.outputs.release-version }}" + --head ${{ needs.create-branch-prefix.outputs.base-branch }} \ + --title "Release ${{ inputs.release-version }}" \ + --body "Automated PR for release ${{ inputs.release-version }}" From f29cf4c33dac2ebaa7c778c76339b2534694726b Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 18 Nov 2024 11:54:32 -0700 Subject: [PATCH 07/14] rename workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e00219b279..1cc2c4f385 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Parallel Release +name: Release on: workflow_dispatch: inputs: From 672f199267fec1a9fbd32c9b40347ea7f2845f07 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Fri, 1 Nov 2024 14:43:18 -0600 Subject: [PATCH 08/14] rename branch to release instead of update --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1cc2c4f385..45cd4686ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: create-branch-prefix: uses: ./.github/workflows/create_branch_prefix.yml with: - prefix: 'update' + prefix: 'release' version: ${{ inputs.release-version }} secrets: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} From 0c9bd8801153a2528fb0e654109eef238e20086c Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 18 Nov 2024 13:01:17 -0700 Subject: [PATCH 09/14] update version name --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 1b307ba8a1..e6947c0a91 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -38,7 +38,7 @@ jobs: uses: ./.github/workflows/create_branch_prefix.yml with: prefix: 'benchmark' - version: VERSION=$(jq -r '.version' package.json) + version: $(jq -r '.version' package.json) secrets: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} From 5e075609b3ef62e0a4d81f301e74e97786d23158 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 18 Nov 2024 14:15:13 -0700 Subject: [PATCH 10/14] make needs format more consistent --- .github/workflows/benchmark.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e6947c0a91..1a549b7e10 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -92,7 +92,9 @@ jobs: LASTMJS_GITHUB_TOKEN: ${{ secrets.LASTMJS_GITHUB_TOKEN }} create-pr: - needs: [squash-branches, create-branch-prefix] + needs: + - squash-branches + - create-branch-prefix runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From ccc537854d893426a6ed75bd23b99f6aa2008133 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 18 Nov 2024 14:51:38 -0700 Subject: [PATCH 11/14] try running in bash by default --- .github/workflows/benchmark_parallel.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/benchmark_parallel.yml b/.github/workflows/benchmark_parallel.yml index 91122cd1e2..b9332dc3f7 100644 --- a/.github/workflows/benchmark_parallel.yml +++ b/.github/workflows/benchmark_parallel.yml @@ -45,6 +45,9 @@ jobs: needs: prepare-benchmark name: Run benchmarks for ${{ matrix.test.name }} runs-on: ubuntu-latest + defaults: + run: + shell: bash env: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From da68a2fa978707578c2b8410481a03463507a02c Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Mon, 18 Nov 2024 15:51:44 -0700 Subject: [PATCH 12/14] might as well try this --- .github/workflows/benchmark_parallel.yml | 2 +- dfx/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark_parallel.yml b/.github/workflows/benchmark_parallel.yml index b9332dc3f7..eaf0e20ecf 100644 --- a/.github/workflows/benchmark_parallel.yml +++ b/.github/workflows/benchmark_parallel.yml @@ -84,7 +84,7 @@ jobs: - name: Run npm test (continue on error) working-directory: ${{ matrix.test.path }} continue-on-error: true - run: AZLE_RECORD_BENCHMARKS=true npm test + run: AZLE_IDENTITY_STORAGE_MODE=plaintext AZLE_RECORD_BENCHMARKS=true npm test - name: Create branch name id: create-branch-name diff --git a/dfx/index.ts b/dfx/index.ts index 567b98c1fb..5b628eaa7b 100644 --- a/dfx/index.ts +++ b/dfx/index.ts @@ -137,6 +137,9 @@ function determineStorageMode(): StorageMode | undefined { `AZLE_IDENTITY_STORAGE_MODE must be 'plaintext', 'keyring', 'password-protected'` ); } + console.info( + `>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Using ${mode} storage mode` + ); return mode; } From fa6a75688473b2ea583bd44898260fec11004fa7 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Wed, 20 Nov 2024 14:02:22 -0700 Subject: [PATCH 13/14] clean up --- .github/workflows/benchmark_parallel.yml | 3 --- dfx/index.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/benchmark_parallel.yml b/.github/workflows/benchmark_parallel.yml index eaf0e20ecf..ac88c0b25f 100644 --- a/.github/workflows/benchmark_parallel.yml +++ b/.github/workflows/benchmark_parallel.yml @@ -45,9 +45,6 @@ jobs: needs: prepare-benchmark name: Run benchmarks for ${{ matrix.test.name }} runs-on: ubuntu-latest - defaults: - run: - shell: bash env: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/dfx/index.ts b/dfx/index.ts index 5b628eaa7b..567b98c1fb 100644 --- a/dfx/index.ts +++ b/dfx/index.ts @@ -137,9 +137,6 @@ function determineStorageMode(): StorageMode | undefined { `AZLE_IDENTITY_STORAGE_MODE must be 'plaintext', 'keyring', 'password-protected'` ); } - console.info( - `>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Using ${mode} storage mode` - ); return mode; } From cdff184fa5349cf4c138b8f5744dbc26247aa636 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Wed, 20 Nov 2024 14:26:43 -0700 Subject: [PATCH 14/14] pr fixes --- .github/actions/commit_and_push/action.yml | 2 +- .github/workflows/create_branch_prefix.yml | 2 +- .github/workflows/release.yml | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/commit_and_push/action.yml b/.github/actions/commit_and_push/action.yml index 9a56b9e8c0..7bf7b13331 100644 --- a/.github/actions/commit_and_push/action.yml +++ b/.github/actions/commit_and_push/action.yml @@ -5,7 +5,7 @@ inputs: description: 'Name of the branch to push to' required: true create-branch: - description: 'Whether to create a new branch' + description: 'Whether to create the branch specified by branch-name' required: false default: 'false' commit-message: diff --git a/.github/workflows/create_branch_prefix.yml b/.github/workflows/create_branch_prefix.yml index ee308f544b..bc326655dc 100644 --- a/.github/workflows/create_branch_prefix.yml +++ b/.github/workflows/create_branch_prefix.yml @@ -5,7 +5,7 @@ on: prefix: required: true type: string - description: 'Prefix to use for branch names (e.g. benchmark, update)' + description: 'Prefix to use for branch names (e.g. benchmark, release)' version: required: true type: string diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45cd4686ad..2dc423e216 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,18 +4,18 @@ on: inputs: release-version: required: true - exclude-slow-benchmarks: - description: 'Exclude slow benchmarks' + exclude-slow-tests: + description: 'Exclude slow tests' required: true type: boolean default: false - exclude-unstable-benchmarks: - description: 'Exclude unstable benchmarks' + exclude-unstable-tests: + description: 'Exclude unstable tests' required: true type: boolean default: false - exclude-release-only-benchmarks: - description: 'Exclude release benchmarks' + exclude-release-only-tests: + description: 'Exclude release tests' required: true type: boolean default: false @@ -32,9 +32,9 @@ jobs: - id: get-exclude-dirs uses: ./.github/actions/get_exclude_dirs with: - exclude-slow: ${{ github.event.inputs.exclude-slow-benchmarks }} - exclude-unstable: ${{ github.event.inputs.exclude-unstable-benchmarks }} - exclude-release-only: ${{ github.event.inputs.exclude-release-only-benchmarks }} + exclude-slow: ${{ github.event.inputs.exclude-slow-tests }} + exclude-unstable: ${{ github.event.inputs.exclude-unstable-tests }} + exclude-release-only: ${{ github.event.inputs.exclude-release-only-tests }} create-branch-prefix: uses: ./.github/workflows/create_branch_prefix.yml