From ef6aaa11d401b05437f0eb73b6aeb08580e05319 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:20:17 -0400 Subject: [PATCH 01/62] main will skip upgrade tests for commits names [breaking] --- .github/workflows/ci.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 26f2311b0..a88d8c517 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -227,13 +227,24 @@ jobs: # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ + # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + - name: Check if this commit has [breaking] in the message + id: check_breaking_commit + run: | + LAST_COMMIT_MESSAGE=$(git log -1 --pretty=%B) + if echo "$LAST_COMMIT_MESSAGE" | grep -q "\[breaking\]"; then + echo "hasBreakingCommit=true" >> $GITHUB_ENV + else + echo "hasBreakingCommit=false" >> $GITHUB_ENV + fi + - name: upgrade - should be backwards compatible - # should always run unless we explicitly mark the branch or tag as "breaking" - if: ${{ !contains(steps.get_branch.outputs.branch, 'breaking/') }} + + if: ${{ env.hasBreakingCommit == 'false' || !contains(steps.get_branch.outputs.branch, 'breaking/') }} working-directory: ./upgrade-tests # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha run: | - echo "Branch name inside check: ${{ steps.get_branch.outputs.branch }}" + echo "Branch name inside check: ${{ steps.get_branch.outputs.branch }}, env.hasBreakingCommit: ${{ env.hasBreakingCommit }}" RUST_MIN_STACK=104857600 cargo test compatible_ rescue: From 569aff50e91249921478e90ceb39b203286e18d6 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:12:01 -0400 Subject: [PATCH 02/62] debugging ci --- .github/workflows/{ci.yaml => ci.todo} | 0 .../{cleanliness.yaml => cleanliness.todo} | 0 .github/workflows/debug.yaml | 64 +++++++++++++++++++ .../workflows/{formal.yaml => formal.todo} | 0 .github/workflows/{move.yaml => move.todo} | 0 .../workflows/{nuke-ci.yaml => nuke-ci.todo} | 0 .../workflows/{publish.yaml => publish.todo} | 0 framework/src/release.rs | 2 +- 8 files changed, 65 insertions(+), 1 deletion(-) rename .github/workflows/{ci.yaml => ci.todo} (100%) rename .github/workflows/{cleanliness.yaml => cleanliness.todo} (100%) create mode 100644 .github/workflows/debug.yaml rename .github/workflows/{formal.yaml => formal.todo} (100%) rename .github/workflows/{move.yaml => move.todo} (100%) rename .github/workflows/{nuke-ci.yaml => nuke-ci.todo} (100%) rename .github/workflows/{publish.yaml => publish.todo} (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.todo similarity index 100% rename from .github/workflows/ci.yaml rename to .github/workflows/ci.todo diff --git a/.github/workflows/cleanliness.yaml b/.github/workflows/cleanliness.todo similarity index 100% rename from .github/workflows/cleanliness.yaml rename to .github/workflows/cleanliness.todo diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml new file mode 100644 index 000000000..58ed4febc --- /dev/null +++ b/.github/workflows/debug.yaml @@ -0,0 +1,64 @@ +name: rust ci + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" + branches: ["**"] # glob pattern to allow slash / + pull_request: + types: + - opened + - synchronize + branches: + - "release**" + - "main**" + schedule: + - cron: "30 00 * * *" + +env: + DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node + LIBRA_CI: 1 + MODE_0L: "TESTNET" + +jobs: + upgrades: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + # - name: Get branch name + # id: get_branch + # uses: actions/github-script@v6 + # with: + # script: | + # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); + # core.setOutput('branch', branch); + + - name: Print branch name + run: | + echo "ref: ${{ github.ref }}" + echo "ref name: ${{ github.ref_name }}" + echo "head ref: ${{ github.head_ref }}" + + # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + - name: Check if this commit has [breaking] in the message + id: check_breaking_commit + run: | + git log -1 --pretty=%B + echo LAST_COMMIT_MESSAGE="$(git --no-pager log -1 --pretty=%B)" >> $GITHUB_ENV + if echo $LAST_COMMIT_MESSAGE | grep -q "\[breaking\]"; then + echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV + else + echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV + fi + echo $HAS_BREAKING_COMMIT + + - name: upgrade - should be backwards compatible + + run: | + echo $HAS_BREAKING_COMMIT + echo Branch name inside check: ${{ steps.get_branch.outputs.branch }} + echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" diff --git a/.github/workflows/formal.yaml b/.github/workflows/formal.todo similarity index 100% rename from .github/workflows/formal.yaml rename to .github/workflows/formal.todo diff --git a/.github/workflows/move.yaml b/.github/workflows/move.todo similarity index 100% rename from .github/workflows/move.yaml rename to .github/workflows/move.todo diff --git a/.github/workflows/nuke-ci.yaml b/.github/workflows/nuke-ci.todo similarity index 100% rename from .github/workflows/nuke-ci.yaml rename to .github/workflows/nuke-ci.todo diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.todo similarity index 100% rename from .github/workflows/publish.yaml rename to .github/workflows/publish.todo diff --git a/framework/src/release.rs b/framework/src/release.rs index 84042f712..fe81d6868 100644 --- a/framework/src/release.rs +++ b/framework/src/release.rs @@ -91,7 +91,7 @@ impl ReleaseTarget { pub fn create_release_options(self, dev_mode: bool, out: Option) -> ReleaseOptions { let crate_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - // let crate_dir = crate_dir.parent().unwrap().to_path_buf(); + let packages = self .packages() .into_iter() From 816477f47ca5b62a1b7166bcf79ff72f36ff1f4c Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:15:13 -0400 Subject: [PATCH 03/62] patch --- .github/workflows/debug.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 58ed4febc..f00e5d473 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -26,9 +26,17 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest steps: + # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + detached: true + timeout-minutes: 5 + - name: Check out code uses: actions/checkout@v3 + # - name: Get branch name # id: get_branch # uses: actions/github-script@v6 @@ -60,5 +68,5 @@ jobs: run: | echo $HAS_BREAKING_COMMIT - echo Branch name inside check: ${{ steps.get_branch.outputs.branch }} + echo Branch name inside check: ${{ github.head_ref }} echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" From bf4d83e5fe132e72ed61f0f439cfe16c863a3cd1 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:21:18 -0400 Subject: [PATCH 04/62] try github.event.head_commit.message --- .github/workflows/debug.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index f00e5d473..515dd1618 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -20,6 +20,7 @@ env: DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node LIBRA_CI: 1 MODE_0L: "TESTNET" + LAST_COMMIT_MSG: ${{github.event.head_commit.message}} jobs: upgrades: @@ -47,6 +48,7 @@ jobs: - name: Print branch name run: | + echo $LAST_COMMIT_MSG echo "ref: ${{ github.ref }}" echo "ref name: ${{ github.ref_name }}" echo "head ref: ${{ github.head_ref }}" @@ -56,17 +58,18 @@ jobs: id: check_breaking_commit run: | git log -1 --pretty=%B - echo LAST_COMMIT_MESSAGE="$(git --no-pager log -1 --pretty=%B)" >> $GITHUB_ENV - if echo $LAST_COMMIT_MESSAGE | grep -q "\[breaking\]"; then + echo LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}} >> $GITHUB_ENV + if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV else echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV fi - echo $HAS_BREAKING_COMMIT + - name: upgrade - should be backwards compatible run: | echo $HAS_BREAKING_COMMIT + echo $LAST_COMMIT_MSG_ALT echo Branch name inside check: ${{ github.head_ref }} echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" From 6bebd7f8b39b65264dcdf7bd66d9ae8f1c80918d Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:30:50 -0400 Subject: [PATCH 05/62] test marketplace action --- .github/workflows/debug.yaml | 55 +++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 515dd1618..174ccbaad 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -37,6 +37,15 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Check Commits + uses: giner/check-commits@358edf572b8aa3644621f3761b531603d91df0a3 # v1.0.0 + with: + regex_filter: '\[(squash|wip|tmp)\]' # Stop on commits marked with [squash], [wip] or [tmp] + - name: output + shell: bash + run: | + echo env + # - name: Get branch name # id: get_branch @@ -46,30 +55,30 @@ jobs: # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); # core.setOutput('branch', branch); - - name: Print branch name - run: | - echo $LAST_COMMIT_MSG - echo "ref: ${{ github.ref }}" - echo "ref name: ${{ github.ref_name }}" - echo "head ref: ${{ github.head_ref }}" + # - name: Print branch name + # run: | + # echo $LAST_COMMIT_MSG + # echo "ref: ${{ github.ref }}" + # echo "ref name: ${{ github.ref_name }}" + # echo "head ref: ${{ github.head_ref }}" - # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - name: Check if this commit has [breaking] in the message - id: check_breaking_commit - run: | - git log -1 --pretty=%B - echo LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}} >> $GITHUB_ENV - if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then - echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV - else - echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV - fi + # # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + # - name: Check if this commit has [breaking] in the message + # id: check_breaking_commit + # run: | + # git log -1 --pretty=%B + # echo LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}} >> $GITHUB_ENV + # if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then + # echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV + # else + # echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV + # fi - - name: upgrade - should be backwards compatible + # - name: upgrade - should be backwards compatible - run: | - echo $HAS_BREAKING_COMMIT - echo $LAST_COMMIT_MSG_ALT - echo Branch name inside check: ${{ github.head_ref }} - echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" + # run: | + # echo $HAS_BREAKING_COMMIT + # echo $LAST_COMMIT_MSG_ALT + # echo Branch name inside check: ${{ github.head_ref }} + # echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" From 7bf32381393c8e065cd7b2eef3690662c21a649c Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:32:27 -0400 Subject: [PATCH 06/62] patch --- .github/workflows/debug.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 174ccbaad..9bb8846db 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -28,14 +28,16 @@ jobs: runs-on: ubuntu-latest steps: # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - detached: true - timeout-minutes: 5 + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + # with: + # detached: true + # timeout-minutes: 5 - name: Check out code uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Check Commits uses: giner/check-commits@358edf572b8aa3644621f3761b531603d91df0a3 # v1.0.0 From d04b6aef9fbe383c874f578b64575b37d9932add Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:41:11 -0400 Subject: [PATCH 07/62] try git-commit-data-action@v2 --- .github/workflows/debug.yaml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 9bb8846db..59974f1d2 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -36,17 +36,31 @@ jobs: - name: Check out code uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Check Commits - uses: giner/check-commits@358edf572b8aa3644621f3761b531603d91df0a3 # v1.0.0 - with: - regex_filter: '\[(squash|wip|tmp)\]' # Stop on commits marked with [squash], [wip] or [tmp] - - name: output - shell: bash + - name: Expose git commit data + uses: jcputney/git-commit-data-action@v2 + + - name: Print git commit data run: | - echo env + echo "Get author info" + echo " - ${{ env.GIT_COMMIT_AUTHOR }}" + echo " - ${{ env.GIT_COMMIT_AUTHOR_NAME }}" + echo " - ${{ env.GIT_COMMIT_AUTHOR_EMAIL }}" + echo "Get committer info" + echo " - ${{ env.GIT_COMMIT_COMMITTER }}" + echo " - ${{ env.GIT_COMMIT_COMMITTER_NAME }}" + echo " - ${{ env.GIT_COMMIT_COMMITTER_EMAIL }}" + echo "Get commit info" + echo " - ${{ env.GIT_COMMIT_MESSAGE }}" + + # - name: Check Commits + # uses: giner/check-commits@358edf572b8aa3644621f3761b531603d91df0a3 # v1.0.0 + # with: + # regex_filter: '\[(squash|wip|tmp)\]' # Stop on commits marked with [squash], [wip] or [tmp] + # - name: output + # shell: bash + # run: | + # echo env # - name: Get branch name From 867824c709967683e886311433183433f0bad944 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:02:06 -0400 Subject: [PATCH 08/62] debug --- .github/workflows/debug.yaml | 73 ++++-------------------------------- 1 file changed, 7 insertions(+), 66 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 59974f1d2..a2d4bb959 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -28,73 +28,14 @@ jobs: runs-on: ubuntu-latest steps: # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - # with: - # detached: true - # timeout-minutes: 5 + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + detached: true + timeout-minutes: 5 - name: Check out code uses: actions/checkout@v3 - - - name: Expose git commit data - uses: jcputney/git-commit-data-action@v2 - - - name: Print git commit data + - name: test run: | - echo "Get author info" - echo " - ${{ env.GIT_COMMIT_AUTHOR }}" - echo " - ${{ env.GIT_COMMIT_AUTHOR_NAME }}" - echo " - ${{ env.GIT_COMMIT_AUTHOR_EMAIL }}" - echo "Get committer info" - echo " - ${{ env.GIT_COMMIT_COMMITTER }}" - echo " - ${{ env.GIT_COMMIT_COMMITTER_NAME }}" - echo " - ${{ env.GIT_COMMIT_COMMITTER_EMAIL }}" - echo "Get commit info" - echo " - ${{ env.GIT_COMMIT_MESSAGE }}" - - # - name: Check Commits - # uses: giner/check-commits@358edf572b8aa3644621f3761b531603d91df0a3 # v1.0.0 - # with: - # regex_filter: '\[(squash|wip|tmp)\]' # Stop on commits marked with [squash], [wip] or [tmp] - # - name: output - # shell: bash - # run: | - # echo env - - - # - name: Get branch name - # id: get_branch - # uses: actions/github-script@v6 - # with: - # script: | - # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); - # core.setOutput('branch', branch); - - # - name: Print branch name - # run: | - # echo $LAST_COMMIT_MSG - # echo "ref: ${{ github.ref }}" - # echo "ref name: ${{ github.ref_name }}" - # echo "head ref: ${{ github.head_ref }}" - - # # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - # - name: Check if this commit has [breaking] in the message - # id: check_breaking_commit - # run: | - # git log -1 --pretty=%B - # echo LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}} >> $GITHUB_ENV - # if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then - # echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV - # else - # echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV - # fi - - - # - name: upgrade - should be backwards compatible - - # run: | - # echo $HAS_BREAKING_COMMIT - # echo $LAST_COMMIT_MSG_ALT - # echo Branch name inside check: ${{ github.head_ref }} - # echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" + echo ${{github.event.commits[0]}} From 25556898a17a8855a4ad411e82196bb6490491e5 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:06:35 -0400 Subject: [PATCH 09/62] try this message --- .github/workflows/debug.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index a2d4bb959..00defcaad 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -38,4 +38,4 @@ jobs: uses: actions/checkout@v3 - name: test run: | - echo ${{github.event.commits[0]}} + echo git log $GITHUB_SHA --pretty=%B From 8df7864b97513d37cc62e2d983e2c4afed35ae0f Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:10:45 -0400 Subject: [PATCH 10/62] try getting message into env --- .github/workflows/debug.yaml | 68 ++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 00defcaad..99f5baa92 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -28,14 +28,68 @@ jobs: runs-on: ubuntu-latest steps: # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - detached: true - timeout-minutes: 5 + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + # with: + # detached: true + # timeout-minutes: 5 - name: Check out code uses: actions/checkout@v3 - - name: test + + - name: try get message + shell: bash run: | - echo git log $GITHUB_SHA --pretty=%B + echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} + echo $LAST_COMMIT_MSG + + # - name: Setup Environment (PR) + # if: ${{ github.event_name == 'pull_request' }} + # shell: bash + # run: | + + # - name: Setup Environment (Push) + # if: ${{ github.event_name == 'push' }} + # shell: bash + # run: | + # echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} + + # - name: set message + + + + # - name: Get branch name + # id: get_branch + # uses: actions/github-script@v6 + # with: + # script: | + # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); + # core.setOutput('branch', branch); + + # - name: Print branch name + # run: | + # echo $LAST_COMMIT_MSG + # echo "ref: ${{ github.ref }}" + # echo "ref name: ${{ github.ref_name }}" + # echo "head ref: ${{ github.head_ref }}" + + # # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + # - name: Check if this commit has [breaking] in the message + # id: check_breaking_commit + # run: | + # git log -1 --pretty=%B + # echo LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}} >> $GITHUB_ENV + # if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then + # echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV + # else + # echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV + # fi + + + # - name: upgrade - should be backwards compatible + + # run: | + # echo $HAS_BREAKING_COMMIT + # echo $LAST_COMMIT_MSG_ALT + # echo Branch name inside check: ${{ github.head_ref }} + # echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" From 41703f9c83911df028fadc33e5567ce319e8b4f7 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:15:22 -0400 Subject: [PATCH 11/62] debug print --- .github/workflows/debug.yaml | 74 ++++++++++++------------------------ 1 file changed, 25 insertions(+), 49 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 99f5baa92..eef55818f 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -37,59 +37,35 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: try get message + - name: Get commit message shell: bash run: | echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} echo $LAST_COMMIT_MSG - # - name: Setup Environment (PR) - # if: ${{ github.event_name == 'pull_request' }} - # shell: bash - # run: | - - # - name: Setup Environment (Push) - # if: ${{ github.event_name == 'push' }} - # shell: bash - # run: | - # echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} - - # - name: set message - - - - # - name: Get branch name - # id: get_branch - # uses: actions/github-script@v6 - # with: - # script: | - # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); - # core.setOutput('branch', branch); - - # - name: Print branch name - # run: | - # echo $LAST_COMMIT_MSG - # echo "ref: ${{ github.ref }}" - # echo "ref name: ${{ github.ref_name }}" - # echo "head ref: ${{ github.head_ref }}" - - # # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - # - name: Check if this commit has [breaking] in the message - # id: check_breaking_commit - # run: | - # git log -1 --pretty=%B - # echo LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}} >> $GITHUB_ENV - # if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then - # echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV - # else - # echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV - # fi - + - name: Get branch name + id: get_branch + uses: actions/github-script@v6 + with: + script: | + const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); + core.setOutput('branch', branch); + + # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + - name: Check if this commit has [breaking] in the message + id: check_breaking_commit + run: | + if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then + echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV + else + echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV + fi - # - name: upgrade - should be backwards compatible - # run: | - # echo $HAS_BREAKING_COMMIT - # echo $LAST_COMMIT_MSG_ALT - # echo Branch name inside check: ${{ github.head_ref }} - # echo env.HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }}" + - name: upgrade - should be backwards compatible + run: | + echo HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }} + echo LAST_COMMIT_MSG ${{ env.LAST_COMMIT_MSG }} + echo Branch name inside check: ${{ github.head_ref }} + echo Branch name inside check: ${{ github.ref }} + echo Branch name inside check: ${{ github.ref_name }} From 8c39f984123695fedfdfb1528dfadb99ff72ea0e Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:16:24 -0400 Subject: [PATCH 12/62] test [breaking] --- .github/workflows/debug.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index eef55818f..d77151e69 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -61,7 +61,6 @@ jobs: echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV fi - - name: upgrade - should be backwards compatible run: | echo HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }} From 8781b24acc00b204ad96888479adeb594161a176 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:19:08 -0400 Subject: [PATCH 13/62] checks for [breaking] --- .github/workflows/debug.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index d77151e69..0ca1a997e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -63,8 +63,9 @@ jobs: - name: upgrade - should be backwards compatible run: | - echo HAS_BREAKING_COMMIT ${{ env.HAS_BREAKING_COMMIT }} - echo LAST_COMMIT_MSG ${{ env.LAST_COMMIT_MSG }} + echo HAS_BREAKING_COMMIT: ${{ env.HAS_BREAKING_COMMIT }} + echo containt breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} + echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo Branch name inside check: ${{ github.head_ref }} echo Branch name inside check: ${{ github.ref }} echo Branch name inside check: ${{ github.ref_name }} From 67d1724e63b3647b64630409744e067bdc798cc5 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:21:51 -0400 Subject: [PATCH 14/62] test branch names --- .github/workflows/debug.yaml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 0ca1a997e..d830a3dbf 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -43,29 +43,23 @@ jobs: echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} echo $LAST_COMMIT_MSG - - name: Get branch name - id: get_branch - uses: actions/github-script@v6 - with: - script: | - const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); - core.setOutput('branch', branch); + # - name: Get branch name + # id: get_branch + # uses: actions/github-script@v6 + # with: + # script: | + # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); + # core.setOutput('branch', branch); # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - name: Check if this commit has [breaking] in the message - id: check_breaking_commit - run: | - if echo $LAST_COMMIT_MSG | grep -q "\[breaking\]"; then - echo "HAS_BREAKING_COMMIT=true" >> $GITHUB_ENV - else - echo "HAS_BREAKING_COMMIT=false" >> $GITHUB_ENV - fi - name: upgrade - should be backwards compatible run: | - echo HAS_BREAKING_COMMIT: ${{ env.HAS_BREAKING_COMMIT }} - echo containt breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} - echo Branch name inside check: ${{ github.head_ref }} - echo Branch name inside check: ${{ github.ref }} - echo Branch name inside check: ${{ github.ref_name }} + echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} + echo github.head_ref: ${{ github.head_ref }} + echo ${{contains(github.head_ref, 'breaking-')}} + echo github.ref : ${{ github.ref }} + echo ${{contains(github.ref, 'breaking-')}} + echo github.ref_name: ${{ github.ref_name }} + echo ${{contains(github.ref_name, 'breaking-')}} From d8bb8459b45f365808eb738610336afaa7723aef Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:22:41 -0400 Subject: [PATCH 15/62] test branch and commit [breaking] --- .github/workflows/debug.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index d830a3dbf..b9c527ede 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -52,7 +52,6 @@ jobs: # core.setOutput('branch', branch); # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - name: upgrade - should be backwards compatible run: | echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} From 5a22011c92005a78382746d42193ff788513a7d5 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:26:34 -0400 Subject: [PATCH 16/62] test branch breaking [breaking] --- .github/workflows/debug.yaml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index b9c527ede..047625fee 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -37,23 +37,10 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Get commit message - shell: bash - run: | - echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} - echo $LAST_COMMIT_MSG - - # - name: Get branch name - # id: get_branch - # uses: actions/github-script@v6 - # with: - # script: | - # const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); - # core.setOutput('branch', branch); - # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: upgrade - should be backwards compatible run: | + echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} echo github.head_ref: ${{ github.head_ref }} @@ -62,3 +49,5 @@ jobs: echo ${{contains(github.ref, 'breaking-')}} echo github.ref_name: ${{ github.ref_name }} echo ${{contains(github.ref_name, 'breaking-')}} + echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}} >> ${GITHUB_ENV} + echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} From 837457fa6ce7714bd5c577d437eacc8ae250f1fa Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:27:31 -0400 Subject: [PATCH 17/62] patch [breaking] --- .github/workflows/debug.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 047625fee..f61ae657e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -49,5 +49,5 @@ jobs: echo ${{contains(github.ref, 'breaking-')}} echo github.ref_name: ${{ github.ref_name }} echo ${{contains(github.ref_name, 'breaking-')}} - echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}} >> ${GITHUB_ENV} + echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} From 67cbc392d9cfa60c3164dbba14ffb8f1595ffbb1 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:30:57 -0400 Subject: [PATCH 18/62] try if [breaking] --- .github/workflows/debug.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index f61ae657e..6f70b226e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -51,3 +51,8 @@ jobs: echo ${{contains(github.ref_name, 'breaking-')}} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + + - name: should skip + if: ${{contains(env.LAST_COMMIT_MSG, '[breaking]') || contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-') }} + run: + echo "should not run" From 7e9b34c09f8c7481f360ab110ccd9a4873558789 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:32:07 -0400 Subject: [PATCH 19/62] try should not run --- .github/workflows/debug.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 6f70b226e..81c665a43 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -52,7 +52,11 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - - name: should skip + - name: should run if: ${{contains(env.LAST_COMMIT_MSG, '[breaking]') || contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-') }} + run: + echo "should run" + - name: shoul not run + if: (!${{contains(env.LAST_COMMIT_MSG, '[breaking]') || contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-') }}) run: echo "should not run" From e504596b377052dabe123f1968cc4f372df202ac Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:34:45 -0400 Subject: [PATCH 20/62] patch should run --- .github/workflows/debug.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 81c665a43..da509f21d 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -20,7 +20,6 @@ env: DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node LIBRA_CI: 1 MODE_0L: "TESTNET" - LAST_COMMIT_MSG: ${{github.event.head_commit.message}} jobs: upgrades: @@ -53,10 +52,10 @@ jobs: echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - name: should run - if: ${{contains(env.LAST_COMMIT_MSG, '[breaking]') || contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-') }} + if: ${{env.BRANCH_BREAKING }} run: echo "should run" - name: shoul not run - if: (!${{contains(env.LAST_COMMIT_MSG, '[breaking]') || contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-') }}) + if: (!${{env.BRANCH_BREAKING }}) run: echo "should not run" From 43c951e16671b44db63741fc835bb9cffb9a63a9 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:35:45 -0400 Subject: [PATCH 21/62] again --- .github/workflows/debug.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index da509f21d..2d9232249 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -52,10 +52,10 @@ jobs: echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - name: should run - if: ${{env.BRANCH_BREAKING }} + if: ${{env.BRANCH_BREAKING=='true' }} run: echo "should run" - name: shoul not run - if: (!${{env.BRANCH_BREAKING }}) + if: (!${{env.BRANCH_BREAKING=='true'}}) run: echo "should not run" From 9b7c3210631bdbdf0fdc2fc53c83184993b35668 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:37:42 -0400 Subject: [PATCH 22/62] more debugging --- .github/workflows/debug.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 2d9232249..03d556790 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -42,6 +42,8 @@ jobs: echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} + echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} + echo github.head_ref: ${{ github.head_ref }} echo ${{contains(github.head_ref, 'breaking-')}} echo github.ref : ${{ github.ref }} @@ -49,11 +51,12 @@ jobs: echo github.ref_name: ${{ github.ref_name }} echo ${{contains(github.ref_name, 'breaking-')}} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - name: should run if: ${{env.BRANCH_BREAKING=='true' }} - run: + run: | + echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo "should run" - name: shoul not run if: (!${{env.BRANCH_BREAKING=='true'}}) From f620035bd8474d154ebc5fbaa018a43ec98b2d28 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:39:11 -0400 Subject: [PATCH 23/62] negative if --- .github/workflows/debug.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 03d556790..0e61fe27e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -59,6 +59,6 @@ jobs: echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo "should run" - name: shoul not run - if: (!${{env.BRANCH_BREAKING=='true'}}) + if: (${{!env.BRANCH_BREAKING=='true'}}) run: echo "should not run" From f0cb506f890e6c6116f34a6d0facc3eb2f6eef23 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:39:46 -0400 Subject: [PATCH 24/62] again --- .github/workflows/debug.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 0e61fe27e..ca01ae05e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -59,6 +59,6 @@ jobs: echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo "should run" - name: shoul not run - if: (${{!env.BRANCH_BREAKING=='true'}}) + if: ${{!env.BRANCH_BREAKING=='true'}} run: echo "should not run" From 8aee7b66f66835b0f23d548cd112c4bf85e8d0a3 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:45:50 -0400 Subject: [PATCH 25/62] test ci.yaml [breaking] --- .github/workflows/ci.todo | 270 ------------------ .github/workflows/ci.yaml | 276 +++++++++++++++++++ .github/workflows/{debug.yaml => debug.depr} | 0 3 files changed, 276 insertions(+), 270 deletions(-) delete mode 100644 .github/workflows/ci.todo create mode 100644 .github/workflows/ci.yaml rename .github/workflows/{debug.yaml => debug.depr} (100%) diff --git a/.github/workflows/ci.todo b/.github/workflows/ci.todo deleted file mode 100644 index a88d8c517..000000000 --- a/.github/workflows/ci.todo +++ /dev/null @@ -1,270 +0,0 @@ -name: rust ci - -on: - push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" - - "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" - branches: ["**"] # glob pattern to allow slash / - pull_request: - types: - - opened - - synchronize - branches: - - "release**" - - "main**" - schedule: - - cron: "30 00 * * *" - -env: - DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node - LIBRA_CI: 1 - MODE_0L: "TESTNET" - -jobs: - build-framework: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - name: build framework - working-directory: ./framework - run: cargo r release - - - uses: actions/upload-artifact@v4.3.1 - with: - name: framework-build - path: framework/* - - types: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - # fail fast if types doesnt compile, everything else will fail. - - name: types - working-directory: ./types - run: cargo test --no-fail-fast - - wallet: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - name: wallet - if: always() - working-directory: ./tools/wallet - run: cargo test --no-fail-fast - - # NOTE: all jobs below need the fresh framework build - smoke: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - # make sure we have a fresh framework build - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - # Check test suite meta tests - - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH - if: always() - working-directory: ./smoke-tests - run: cargo test --no-fail-fast -- --test-threads=1 - - query: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - # Tools tests (some use smoke-tests) - - name: query - if: always() - working-directory: ./tools/query - run: cargo test --no-fail-fast - - genesis: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - name: genesis - if: always() - working-directory: ./tools/genesis - run: cargo test --no-fail-fast - - txs: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - name: txs - if: always() - working-directory: ./tools/txs - # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. - run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast - - upgrades: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get branch name - id: get_branch - uses: actions/github-script@v6 - with: - script: | - const branch = process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME || context.ref.replace('refs/heads/', ''); - core.setOutput('branch', branch); - - - name: Print branch name - run: | - echo "Branch name: ${{ steps.get_branch.outputs.branch }}" - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - name: upgrade - check workflow - if: always() - working-directory: ./upgrade-tests - # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. - run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ - - # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - name: Check if this commit has [breaking] in the message - id: check_breaking_commit - run: | - LAST_COMMIT_MESSAGE=$(git log -1 --pretty=%B) - if echo "$LAST_COMMIT_MESSAGE" | grep -q "\[breaking\]"; then - echo "hasBreakingCommit=true" >> $GITHUB_ENV - else - echo "hasBreakingCommit=false" >> $GITHUB_ENV - fi - - - name: upgrade - should be backwards compatible - - if: ${{ env.hasBreakingCommit == 'false' || !contains(steps.get_branch.outputs.branch, 'breaking/') }} - working-directory: ./upgrade-tests - # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha - run: | - echo "Branch name inside check: ${{ steps.get_branch.outputs.branch }}, env.hasBreakingCommit: ${{ env.hasBreakingCommit }}" - RUST_MIN_STACK=104857600 cargo test compatible_ - - rescue: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - if: ${{runner.environment == 'self-hosted'}} - uses: ./.github/actions/build_env - - - uses: actions/download-artifact@v4.1.2 - if: ${{runner.environment == 'self-hosted'}} - with: - name: framework-build - path: framework/ - - name: rescue - # if: always() - if: ${{runner.environment == 'self-hosted'}} - working-directory: ./tools/rescue - run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..031ded443 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,276 @@ +name: rust ci + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" + branches: ["**"] # glob pattern to allow slash / + pull_request: + types: + - opened + - synchronize + branches: + - "release**" + - "main**" + schedule: + - cron: "30 00 * * *" + +env: + DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node + LIBRA_CI: 1 + MODE_0L: "TESTNET" + +jobs: + # build-framework: + # timeout-minutes: 60 + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # - name: build framework + # working-directory: ./framework + # run: cargo r release + + # - uses: actions/upload-artifact@v4.3.1 + # with: + # name: framework-build + # path: framework/* + + # types: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # # fail fast if types doesnt compile, everything else will fail. + # - name: types + # working-directory: ./types + # run: cargo test --no-fail-fast + + # wallet: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # - name: wallet + # if: always() + # working-directory: ./tools/wallet + # run: cargo test --no-fail-fast + + # # NOTE: all jobs below need the fresh framework build + # smoke: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: setup env + # uses: ./.github/actions/build_env + + # # make sure we have a fresh framework build + # - uses: actions/download-artifact@v4.1.2 + # with: + # name: framework-build + # path: framework/ + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # # Check test suite meta tests + # - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH + # if: always() + # working-directory: ./smoke-tests + # run: cargo test --no-fail-fast -- --test-threads=1 + + # query: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # - uses: actions/download-artifact@v4.1.2 + # with: + # name: framework-build + # path: framework/ + + # # Tools tests (some use smoke-tests) + # - name: query + # if: always() + # working-directory: ./tools/query + # run: cargo test --no-fail-fast + + # genesis: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # - uses: actions/download-artifact@v4.1.2 + # with: + # name: framework-build + # path: framework/ + + # - name: genesis + # if: always() + # working-directory: ./tools/genesis + # run: cargo test --no-fail-fast + + # txs: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # - uses: actions/download-artifact@v4.1.2 + # with: + # name: framework-build + # path: framework/ + + # - name: txs + # if: always() + # working-directory: ./tools/txs + # # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. + # run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast + + upgrades: + timeout-minutes: 60 + # needs: [build-framework] + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + - name: check breaking compat branch or commit + run: | + echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} + echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} + echo github.head_ref: ${{ github.head_ref }} + echo ${{contains(github.head_ref, 'breaking-')}} + echo github.ref : ${{ github.ref }} + echo ${{contains(github.ref, 'breaking-')}} + echo github.ref_name: ${{ github.ref_name }} + echo ${{contains(github.ref_name, 'breaking-')}} + # save to GH action env + echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} + echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} + + # - name: should run + # if: ${{env.BRANCH_BREAKING=='true' }} + # run: | + + # echo "should run" + # - name: shoul not run + # if: ${{!env.BRANCH_BREAKING=='true'}} + # run: + # echo "should not run" + + - name: upgrade - should be backwards compatible + if: ${{ env.BRANCH_BREAKING != 'true' || env.COMMIT_BREAKING != 'true' }} + working-directory: ./upgrade-tests + # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha + run: | + echo "Don't run this when we expect the change to break backward compatibility" + echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + # RUST_MIN_STACK=104857600 cargo test compatible_ + + # - name: upgrade - check workflow + # if: always() + # working-directory: ./upgrade-tests + # # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. + # run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ + + + + # rescue: + # timeout-minutes: 60 + # needs: [build-framework] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: setup env + # if: ${{runner.environment == 'self-hosted'}} + # uses: ./.github/actions/build_env + + # - uses: actions/download-artifact@v4.1.2 + # if: ${{runner.environment == 'self-hosted'}} + # with: + # name: framework-build + # path: framework/ + # - name: rescue + # # if: always() + # if: ${{runner.environment == 'self-hosted'}} + # working-directory: ./tools/rescue + # run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.depr similarity index 100% rename from .github/workflows/debug.yaml rename to .github/workflows/debug.depr From a2c32260e49b623566e5e656cc216425be8abb24 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:46:08 -0400 Subject: [PATCH 26/62] patch [breaking] --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 031ded443..39b6a7af2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -221,7 +221,6 @@ jobs: echo ${{contains(github.ref, 'breaking-')}} echo github.ref_name: ${{ github.ref_name }} echo ${{contains(github.ref_name, 'breaking-')}} - # save to GH action env echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} From ebf2041e99f570db749e405e5c1a614ca100ed21 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:48:09 -0400 Subject: [PATCH 27/62] check [breaking] --- .github/workflows/ci.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 39b6a7af2..2c6bff541 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -196,18 +196,18 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ + # - name: setup env + # uses: ./.github/actions/build_env + + # - uses: Swatinem/rust-cache@v2.7.3 + # with: + # shared-key: "libra-framework" + # cache-all-crates: true + + # - uses: actions/download-artifact@v4.1.2 + # with: + # name: framework-build + # path: framework/ # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: check breaking compat branch or commit From 1c8e1cb0bff3d1c5ce29e0e72f1960c36705f524 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:49:01 -0400 Subject: [PATCH 28/62] break commit [breaking] --- .github/workflows/ci.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c6bff541..049421eef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -224,16 +224,6 @@ jobs: echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - # - name: should run - # if: ${{env.BRANCH_BREAKING=='true' }} - # run: | - - # echo "should run" - # - name: shoul not run - # if: ${{!env.BRANCH_BREAKING=='true'}} - # run: - # echo "should not run" - - name: upgrade - should be backwards compatible if: ${{ env.BRANCH_BREAKING != 'true' || env.COMMIT_BREAKING != 'true' }} working-directory: ./upgrade-tests From 46773b828ec6497ddfd3431865789044f8d011bb Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:52:21 -0400 Subject: [PATCH 29/62] try debug [breaking] --- .github/workflows/{debug.depr => debug.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{debug.depr => debug.yaml} (96%) diff --git a/.github/workflows/debug.depr b/.github/workflows/debug.yaml similarity index 96% rename from .github/workflows/debug.depr rename to .github/workflows/debug.yaml index ca01ae05e..ddb63f86a 100644 --- a/.github/workflows/debug.depr +++ b/.github/workflows/debug.yaml @@ -53,7 +53,7 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - name: should run - if: ${{env.BRANCH_BREAKING=='true' }} + if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}} run: | echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} From 981ceb1478e7335d18a3068eccfb29f06c1beee9 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:54:39 -0400 Subject: [PATCH 30/62] sanity [breaking] --- .github/workflows/ci.yaml | 1 + .github/workflows/debug.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 049421eef..a5f51660e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -212,6 +212,7 @@ jobs: # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: check breaking compat branch or commit run: | + git log $GITHUB_SHA --pretty=%B echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index ddb63f86a..7c16301c2 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -20,6 +20,7 @@ env: DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node LIBRA_CI: 1 MODE_0L: "TESTNET" + LAST_COMMIT_MSG: ${{github.event.head_commit.message}} jobs: upgrades: From 84d8e92cb2d152953aa5242bcb48a88c514d6966 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:56:54 -0400 Subject: [PATCH 31/62] get from event [breaking] --- .github/workflows/debug.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 7c16301c2..8e07b8aaf 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -20,7 +20,7 @@ env: DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node LIBRA_CI: 1 MODE_0L: "TESTNET" - LAST_COMMIT_MSG: ${{github.event.head_commit.message}} + # LAST_COMMIT_MSG: ${{github.event.head_commit.message}} jobs: upgrades: @@ -40,8 +40,9 @@ jobs: # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: upgrade - should be backwards compatible run: | - echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} - echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + #echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} + echo LAST_COMMIT_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} + echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} From 8d7b8d8196d703d0e06661d85ad0e68fa9897303 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sat, 3 Aug 2024 15:59:38 -0400 Subject: [PATCH 32/62] dont set msg env [breaking] --- .github/workflows/debug.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 8e07b8aaf..05f3eeb42 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -44,7 +44,7 @@ jobs: echo LAST_COMMIT_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} - echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} + echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} echo github.head_ref: ${{ github.head_ref }} echo ${{contains(github.head_ref, 'breaking-')}} From 553f24ec20286c6a9b47f80b6b32f1d196930ffa Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:09:11 -0400 Subject: [PATCH 33/62] debug --- .github/workflows/{ci.yaml => ci.todo} | 0 .github/workflows/debug.yaml | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename .github/workflows/{ci.yaml => ci.todo} (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.todo similarity index 100% rename from .github/workflows/ci.yaml rename to .github/workflows/ci.todo diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 05f3eeb42..551995bae 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -20,7 +20,6 @@ env: DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node LIBRA_CI: 1 MODE_0L: "TESTNET" - # LAST_COMMIT_MSG: ${{github.event.head_commit.message}} jobs: upgrades: @@ -40,7 +39,7 @@ jobs: # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: upgrade - should be backwards compatible run: | - #echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} + echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} echo LAST_COMMIT_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} @@ -57,6 +56,8 @@ jobs: - name: should run if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}} run: | + echo LAST_COMMIT: ${{ env.LAST_COMMIT }} + echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo "should run" From 708eb3fa150a45dffd0b3ea131133e30a012c2a2 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:10:40 -0400 Subject: [PATCH 34/62] debug [breaking] --- .github/workflows/debug.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 551995bae..7025baa9e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -43,6 +43,8 @@ jobs: echo LAST_COMMIT_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} + echo LAST_COMMIT: ${{ env.LAST_COMMIT }} + echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} echo github.head_ref: ${{ github.head_ref }} From e57a10fd3e649b23c52b1706ed3b83312ef65522 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:15:13 -0400 Subject: [PATCH 35/62] get message [breaking] --- .github/workflows/debug.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 7025baa9e..0265709a6 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -37,22 +37,17 @@ jobs: uses: actions/checkout@v3 # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) +# echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} +# echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} +# echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} +# echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} + - name: upgrade - should be backwards compatible run: | echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} - echo LAST_COMMIT_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} - echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} - echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} - echo LAST_COMMIT: ${{ env.LAST_COMMIT }} - echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} - echo github.head_ref: ${{ github.head_ref }} - echo ${{contains(github.head_ref, 'breaking-')}} - echo github.ref : ${{ github.ref }} - echo ${{contains(github.ref, 'breaking-')}} - echo github.ref_name: ${{ github.ref_name }} - echo ${{contains(github.ref_name, 'breaking-')}} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - name: should run From c6dcdbc5d21a64ddebb51d70dd248bd4fb1c52e7 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:16:41 -0400 Subject: [PATCH 36/62] clean [breaking] --- .github/workflows/debug.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 0265709a6..9b6957cdf 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -45,7 +45,7 @@ jobs: - name: upgrade - should be backwards compatible run: | echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} - echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} From 5a828e2ae8989eab176b7ae54f3f32b6cddeef77 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:19:13 -0400 Subject: [PATCH 37/62] try get alt message --- .github/workflows/debug.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 9b6957cdf..66f3c314e 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -44,8 +44,9 @@ jobs: - name: upgrade - should be backwards compatible run: | - echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} + LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) echo LAST_COMMIT=$LAST_COMMIT >> ${GITHUB_ENV} echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} + echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} From 77478f21ebbfc7bcbcf1565a0412ba1f8b74f072 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:19:44 -0400 Subject: [PATCH 38/62] test persist env [breaking] --- .github/workflows/debug.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 66f3c314e..ec03532ee 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -44,7 +44,8 @@ jobs: - name: upgrade - should be backwards compatible run: | - LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) echo LAST_COMMIT=$LAST_COMMIT >> ${GITHUB_ENV} + export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) + echo LAST_COMMIT=$LAST_COMMIT >> ${GITHUB_ENV} echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} From a2c03330fd0d3e64d0d1c2b6082968fe8df0acc6 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:22:25 -0400 Subject: [PATCH 39/62] breaking alt --- .github/workflows/debug.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index ec03532ee..c1bb32a50 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -46,8 +46,10 @@ jobs: run: | export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) echo LAST_COMMIT=$LAST_COMMIT >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} + echo "COMMIT_BREAKING_ALT=${{contains(env.LAST_COMMIT, '[breaking]')}}" >> ${GITHUB_ENV} + + echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} @@ -57,6 +59,7 @@ jobs: run: | echo LAST_COMMIT: ${{ env.LAST_COMMIT }} echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + echo COMMIT_BREAKING_ALT: ${{env.COMMIT_BREAKING_ALT}} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo "should run" From be9745b47658ddb31765fbfb9b269135d732db2a Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:23:56 -0400 Subject: [PATCH 40/62] breaking alt [breaking] --- .github/workflows/debug.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index c1bb32a50..0dd89fbff 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -54,6 +54,7 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} + - name: should run if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}} run: | From 1dbdc259e18d95c0f5c95d9ff17f129d2b737a5d Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:24:37 -0400 Subject: [PATCH 41/62] sanity [breaking] --- .github/workflows/debug.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 0dd89fbff..8fefdc180 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -45,7 +45,6 @@ jobs: - name: upgrade - should be backwards compatible run: | export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) - echo LAST_COMMIT=$LAST_COMMIT >> ${GITHUB_ENV} echo "COMMIT_BREAKING_ALT=${{contains(env.LAST_COMMIT, '[breaking]')}}" >> ${GITHUB_ENV} From 88ff46957c1fd952afb489047f03588bc87a7a6f Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:25:43 -0400 Subject: [PATCH 42/62] sanity [breaking] --- .github/workflows/debug.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 8fefdc180..271a87b20 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -44,7 +44,8 @@ jobs: - name: upgrade - should be backwards compatible run: | - export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) + # export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) + echo LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} echo "COMMIT_BREAKING_ALT=${{contains(env.LAST_COMMIT, '[breaking]')}}" >> ${GITHUB_ENV} From f1715bec97ac16c7a976ccc70d052c6a158642da Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:28:58 -0400 Subject: [PATCH 43/62] split up eval [breaking] --- .github/workflows/debug.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 271a87b20..4d73c296d 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -42,15 +42,14 @@ jobs: # echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} # echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} - - name: upgrade - should be backwards compatible + - name: get commit names run: | - # export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) - echo LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} - - echo "COMMIT_BREAKING_ALT=${{contains(env.LAST_COMMIT, '[breaking]')}}" >> ${GITHUB_ENV} - - echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} - echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV} + echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} + # better to do it in a new context so the env has been saved + - name: eval breaking + run: | + echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG_ALT, '[breaking]') || contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} @@ -58,8 +57,8 @@ jobs: - name: should run if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}} run: | - echo LAST_COMMIT: ${{ env.LAST_COMMIT }} echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} echo COMMIT_BREAKING_ALT: ${{env.COMMIT_BREAKING_ALT}} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} From 9611f8a09391d7eb4f820de1d88f9dd0e8bbb80a Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:31:19 -0400 Subject: [PATCH 44/62] test rust-ci file --- .github/workflows/{ci.todo => ci.yaml} | 20 ++++++++------------ .github/workflows/debug.yaml | 5 ----- 2 files changed, 8 insertions(+), 17 deletions(-) rename .github/workflows/{ci.todo => ci.yaml} (90%) diff --git a/.github/workflows/ci.todo b/.github/workflows/ci.yaml similarity index 90% rename from .github/workflows/ci.todo rename to .github/workflows/ci.yaml index a5f51660e..d9b602764 100644 --- a/.github/workflows/ci.todo +++ b/.github/workflows/ci.yaml @@ -210,19 +210,15 @@ jobs: # path: framework/ # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - name: check breaking compat branch or commit + - name: get commit names run: | - git log $GITHUB_SHA --pretty=%B - echo "LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} - echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} - echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} - echo github.head_ref: ${{ github.head_ref }} - echo ${{contains(github.head_ref, 'breaking-')}} - echo github.ref : ${{ github.ref }} - echo ${{contains(github.ref, 'breaking-')}} - echo github.ref_name: ${{ github.ref_name }} - echo ${{contains(github.ref_name, 'breaking-')}} - echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} + echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} + # better to do it in a new context so the env has been saved + - name: eval breaking + run: | + echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG_ALT, '[breaking]') || contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} + echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - name: upgrade - should be backwards compatible diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index 4d73c296d..f1230f5e0 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -37,10 +37,6 @@ jobs: uses: actions/checkout@v3 # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) -# echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV} -# echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV} -# echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}} -# echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}} - name: get commit names run: | @@ -59,7 +55,6 @@ jobs: run: | echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} - echo COMMIT_BREAKING_ALT: ${{env.COMMIT_BREAKING_ALT}} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo "should run" From fb36dc39937d4254005050e8f6b5c2ffaa5f29b1 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:34:15 -0400 Subject: [PATCH 45/62] test skip [breaking] --- .github/workflows/{ci.yaml => rust-ci.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{ci.yaml => rust-ci.yaml} (98%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/rust-ci.yaml similarity index 98% rename from .github/workflows/ci.yaml rename to .github/workflows/rust-ci.yaml index d9b602764..837611639 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -222,7 +222,7 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - name: upgrade - should be backwards compatible - if: ${{ env.BRANCH_BREAKING != 'true' || env.COMMIT_BREAKING != 'true' }} + if: ${{ !env.BRANCH_BREAKING == 'true' && !env.COMMIT_BREAKING == 'true' }} working-directory: ./upgrade-tests # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha run: | From 04902172dd3de0634013a60207748206cdce4e6b Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:35:09 -0400 Subject: [PATCH 46/62] change branch pattern --- .github/workflows/rust-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 837611639..4d2be0ba3 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -219,7 +219,7 @@ jobs: run: | echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG_ALT, '[breaking]') || contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} - echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} + echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking/') || contains(github.ref, 'breaking/') || contains(github.head_ref, 'breaking/')}}" >> ${GITHUB_ENV} - name: upgrade - should be backwards compatible if: ${{ !env.BRANCH_BREAKING == 'true' && !env.COMMIT_BREAKING == 'true' }} From 25424295a841c26a6f25ecbc122ab87919829590 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:37:00 -0400 Subject: [PATCH 47/62] should be noop --- .github/workflows/debug.yaml | 1 - .github/workflows/rust-ci.yaml | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml index f1230f5e0..3994fd269 100644 --- a/.github/workflows/debug.yaml +++ b/.github/workflows/debug.yaml @@ -49,7 +49,6 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - - name: should run if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}} run: | diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 4d2be0ba3..03523d1b2 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -221,6 +221,14 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking/') || contains(github.ref, 'breaking/') || contains(github.head_ref, 'breaking/')}}" >> ${GITHUB_ENV} + + - name: sanity + run: | + echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} + echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + - name: upgrade - should be backwards compatible if: ${{ !env.BRANCH_BREAKING == 'true' && !env.COMMIT_BREAKING == 'true' }} working-directory: ./upgrade-tests From 8275088cbae58ace59d03b3638e5045e64826851 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:45:43 -0400 Subject: [PATCH 48/62] logic noop --- .github/workflows/rust-ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 03523d1b2..db76e600e 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -228,9 +228,10 @@ jobs: echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + echo test: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} - name: upgrade - should be backwards compatible - if: ${{ !env.BRANCH_BREAKING == 'true' && !env.COMMIT_BREAKING == 'true' }} + if: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} working-directory: ./upgrade-tests # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha run: | From ae6a6975b5587f0ec310b3d584df08fea8d7da08 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 17:47:17 -0400 Subject: [PATCH 49/62] change logic --- .github/workflows/rust-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index db76e600e..72fe23df3 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -231,7 +231,7 @@ jobs: echo test: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} - name: upgrade - should be backwards compatible - if: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} + if: ${{ env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true' }} working-directory: ./upgrade-tests # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha run: | From bff20bda74a431031ebd5dba041c90353c140a47 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 18:12:37 -0400 Subject: [PATCH 50/62] debug noop --- .github/workflows/rust-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 72fe23df3..db76e600e 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -231,7 +231,7 @@ jobs: echo test: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} - name: upgrade - should be backwards compatible - if: ${{ env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true' }} + if: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} working-directory: ./upgrade-tests # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha run: | From 5fed7927131f285ab2f7ce8d1345fec527c9ac3f Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 18:13:27 -0400 Subject: [PATCH 51/62] test commit [breaking] --- .github/workflows/rust-ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index db76e600e..ddf60a9a1 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -230,6 +230,7 @@ jobs: echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo test: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} + - name: upgrade - should be backwards compatible if: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} working-directory: ./upgrade-tests From d67710c56b67e501b4dc8fee603fb50c8258c206 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 18:15:20 -0400 Subject: [PATCH 52/62] breaking commit [breaking] --- .github/workflows/rust-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index ddf60a9a1..69756e709 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -228,11 +228,11 @@ jobs: echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} - echo test: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} + echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} - name: upgrade - should be backwards compatible - if: ${{ env.BRANCH_BREAKING == 'false' && !env.COMMIT_BREAKING == 'false' }} + if: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} working-directory: ./upgrade-tests # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha run: | From 8e7b7f29a74d0f8130a02e236c06af1eb35b7a38 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 18:15:55 -0400 Subject: [PATCH 53/62] sanity noop --- .github/workflows/rust-ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 69756e709..9549df9b4 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -230,7 +230,6 @@ jobs: echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} - - name: upgrade - should be backwards compatible if: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} working-directory: ./upgrade-tests From aea82c7c76c5174c89b7b0012beb7b061f4cffc0 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 18:55:20 -0400 Subject: [PATCH 54/62] resume rust ci testing --- .github/workflows/debug.yaml | 63 ----- .github/workflows/rust-ci.yaml | 422 ++++++++++++++++----------------- 2 files changed, 210 insertions(+), 275 deletions(-) delete mode 100644 .github/workflows/debug.yaml diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml deleted file mode 100644 index 3994fd269..000000000 --- a/.github/workflows/debug.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: rust ci - -on: - push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" - - "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" - branches: ["**"] # glob pattern to allow slash / - pull_request: - types: - - opened - - synchronize - branches: - - "release**" - - "main**" - schedule: - - cron: "30 00 * * *" - -env: - DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node - LIBRA_CI: 1 - MODE_0L: "TESTNET" - -jobs: - upgrades: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - # with: - # detached: true - # timeout-minutes: 5 - - - name: Check out code - uses: actions/checkout@v3 - - # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - - name: get commit names - run: | - echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} - # better to do it in a new context so the env has been saved - - name: eval breaking - run: | - echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG_ALT, '[breaking]') || contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} - - echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV} - - - name: should run - if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}} - run: | - echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} - echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} - echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} - echo "should run" - - name: shoul not run - if: ${{!env.BRANCH_BREAKING=='true'}} - run: - echo "should not run" diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 9549df9b4..e216daf13 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -22,192 +22,192 @@ env: MODE_0L: "TESTNET" jobs: - # build-framework: - # timeout-minutes: 60 - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: setup env - # uses: ./.github/actions/build_env - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # - name: build framework - # working-directory: ./framework - # run: cargo r release - - # - uses: actions/upload-artifact@v4.3.1 - # with: - # name: framework-build - # path: framework/* - - # types: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: setup env - # uses: ./.github/actions/build_env - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # # fail fast if types doesnt compile, everything else will fail. - # - name: types - # working-directory: ./types - # run: cargo test --no-fail-fast - - # wallet: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: setup env - # uses: ./.github/actions/build_env - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # - name: wallet - # if: always() - # working-directory: ./tools/wallet - # run: cargo test --no-fail-fast - - # # NOTE: all jobs below need the fresh framework build - # smoke: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: setup env - # uses: ./.github/actions/build_env - - # # make sure we have a fresh framework build - # - uses: actions/download-artifact@v4.1.2 - # with: - # name: framework-build - # path: framework/ - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # # Check test suite meta tests - # - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH - # if: always() - # working-directory: ./smoke-tests - # run: cargo test --no-fail-fast -- --test-threads=1 - - # query: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: setup env - # uses: ./.github/actions/build_env - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # - uses: actions/download-artifact@v4.1.2 - # with: - # name: framework-build - # path: framework/ - - # # Tools tests (some use smoke-tests) - # - name: query - # if: always() - # working-directory: ./tools/query - # run: cargo test --no-fail-fast - - # genesis: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: setup env - # uses: ./.github/actions/build_env - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # - uses: actions/download-artifact@v4.1.2 - # with: - # name: framework-build - # path: framework/ - - # - name: genesis - # if: always() - # working-directory: ./tools/genesis - # run: cargo test --no-fail-fast - - # txs: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: setup env - # uses: ./.github/actions/build_env - - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true - - # - uses: actions/download-artifact@v4.1.2 - # with: - # name: framework-build - # path: framework/ - - # - name: txs - # if: always() - # working-directory: ./tools/txs - # # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. - # run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast + build-framework: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - name: build framework + working-directory: ./framework + run: cargo r release + + - uses: actions/upload-artifact@v4.3.1 + with: + name: framework-build + path: framework/* + + types: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + # fail fast if types doesnt compile, everything else will fail. + - name: types + working-directory: ./types + run: cargo test --no-fail-fast + + wallet: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - name: wallet + if: always() + working-directory: ./tools/wallet + run: cargo test --no-fail-fast + + # NOTE: all jobs below need the fresh framework build + smoke: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + # make sure we have a fresh framework build + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + # Check test suite meta tests + - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH + if: always() + working-directory: ./smoke-tests + run: cargo test --no-fail-fast -- --test-threads=1 + + query: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + # Tools tests (some use smoke-tests) + - name: query + if: always() + working-directory: ./tools/query + run: cargo test --no-fail-fast + + genesis: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + - name: genesis + if: always() + working-directory: ./tools/genesis + run: cargo test --no-fail-fast + + txs: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + - name: txs + if: always() + working-directory: ./tools/txs + # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. + run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast upgrades: timeout-minutes: 60 - # needs: [build-framework] + needs: [build-framework] runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v3 - # - name: setup env - # uses: ./.github/actions/build_env + - name: setup env + uses: ./.github/actions/build_env - # - uses: Swatinem/rust-cache@v2.7.3 - # with: - # shared-key: "libra-framework" - # cache-all-crates: true + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true - # - uses: actions/download-artifact@v4.1.2 - # with: - # name: framework-build - # path: framework/ + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: get commit names @@ -222,13 +222,13 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking/') || contains(github.ref, 'breaking/') || contains(github.head_ref, 'breaking/')}}" >> ${GITHUB_ENV} - - name: sanity - run: | - echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} - echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} - echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} - echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} + # - name: sanity check vars + # run: | + # echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + # echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} + # echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + # echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + # echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} - name: upgrade - should be backwards compatible if: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} @@ -240,32 +240,30 @@ jobs: echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} # RUST_MIN_STACK=104857600 cargo test compatible_ - # - name: upgrade - check workflow - # if: always() - # working-directory: ./upgrade-tests - # # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. - # run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ - - - - # rescue: - # timeout-minutes: 60 - # needs: [build-framework] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: setup env - # if: ${{runner.environment == 'self-hosted'}} - # uses: ./.github/actions/build_env - - # - uses: actions/download-artifact@v4.1.2 - # if: ${{runner.environment == 'self-hosted'}} - # with: - # name: framework-build - # path: framework/ - # - name: rescue - # # if: always() - # if: ${{runner.environment == 'self-hosted'}} - # working-directory: ./tools/rescue - # run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 + - name: upgrade - check workflow + if: always() + working-directory: ./upgrade-tests + # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. + run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ + + rescue: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + if: ${{runner.environment == 'self-hosted'}} + uses: ./.github/actions/build_env + + - uses: actions/download-artifact@v4.1.2 + if: ${{runner.environment == 'self-hosted'}} + with: + name: framework-build + path: framework/ + - name: rescue + # if: always() + if: ${{runner.environment == 'self-hosted'}} + working-directory: ./tools/rescue + run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 From fe9560139abbae75bb28abb5294a1b98a953e3d3 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 18:56:17 -0400 Subject: [PATCH 55/62] resume all tests [breaking] --- .github/workflows/{cleanliness.todo => cleanliness.yaml} | 0 .github/workflows/{formal.todo => formal.yaml} | 0 .github/workflows/{move.todo => move.yaml} | 0 .github/workflows/{nuke-ci.todo => nuke-ci.yaml} | 0 .github/workflows/{publish.todo => publish.yaml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{cleanliness.todo => cleanliness.yaml} (100%) rename .github/workflows/{formal.todo => formal.yaml} (100%) rename .github/workflows/{move.todo => move.yaml} (100%) rename .github/workflows/{nuke-ci.todo => nuke-ci.yaml} (100%) rename .github/workflows/{publish.todo => publish.yaml} (100%) diff --git a/.github/workflows/cleanliness.todo b/.github/workflows/cleanliness.yaml similarity index 100% rename from .github/workflows/cleanliness.todo rename to .github/workflows/cleanliness.yaml diff --git a/.github/workflows/formal.todo b/.github/workflows/formal.yaml similarity index 100% rename from .github/workflows/formal.todo rename to .github/workflows/formal.yaml diff --git a/.github/workflows/move.todo b/.github/workflows/move.yaml similarity index 100% rename from .github/workflows/move.todo rename to .github/workflows/move.yaml diff --git a/.github/workflows/nuke-ci.todo b/.github/workflows/nuke-ci.yaml similarity index 100% rename from .github/workflows/nuke-ci.todo rename to .github/workflows/nuke-ci.yaml diff --git a/.github/workflows/publish.todo b/.github/workflows/publish.yaml similarity index 100% rename from .github/workflows/publish.todo rename to .github/workflows/publish.yaml From 3ff00673b78f60565e4c892a29383c519823312f Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 20:25:57 -0400 Subject: [PATCH 56/62] get commit name in PR --- .github/workflows/rust-ci.yaml | 227 +-------------- .../cleanliness.yaml | 0 .../{workflows => workflows_temp}/formal.yaml | 0 .../{workflows => workflows_temp}/move.yaml | 0 .../nuke-ci.yaml | 0 .../publish.yaml | 0 .github/workflows_temp/rust-ci.yaml | 269 ++++++++++++++++++ 7 files changed, 275 insertions(+), 221 deletions(-) rename .github/{workflows => workflows_temp}/cleanliness.yaml (100%) rename .github/{workflows => workflows_temp}/formal.yaml (100%) rename .github/{workflows => workflows_temp}/move.yaml (100%) rename .github/{workflows => workflows_temp}/nuke-ci.yaml (100%) rename .github/{workflows => workflows_temp}/publish.yaml (100%) create mode 100644 .github/workflows_temp/rust-ci.yaml diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index e216daf13..51b68461c 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -22,192 +22,15 @@ env: MODE_0L: "TESTNET" jobs: - build-framework: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - name: build framework - working-directory: ./framework - run: cargo r release - - - uses: actions/upload-artifact@v4.3.1 - with: - name: framework-build - path: framework/* - - types: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - # fail fast if types doesnt compile, everything else will fail. - - name: types - working-directory: ./types - run: cargo test --no-fail-fast - - wallet: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - name: wallet - if: always() - working-directory: ./tools/wallet - run: cargo test --no-fail-fast - - # NOTE: all jobs below need the fresh framework build - smoke: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - # make sure we have a fresh framework build - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - # Check test suite meta tests - - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH - if: always() - working-directory: ./smoke-tests - run: cargo test --no-fail-fast -- --test-threads=1 - - query: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - # Tools tests (some use smoke-tests) - - name: query - if: always() - working-directory: ./tools/query - run: cargo test --no-fail-fast - - genesis: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - name: genesis - if: always() - working-directory: ./tools/genesis - run: cargo test --no-fail-fast - - txs: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ - - - name: txs - if: always() - working-directory: ./tools/txs - # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. - run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast upgrades: timeout-minutes: 60 - needs: [build-framework] runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v3 - - name: setup env - uses: ./.github/actions/build_env - - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true - - - uses: actions/download-artifact@v4.1.2 - with: - name: framework-build - path: framework/ # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: get commit names @@ -222,48 +45,10 @@ jobs: echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking/') || contains(github.ref, 'breaking/') || contains(github.head_ref, 'breaking/')}}" >> ${GITHUB_ENV} - # - name: sanity check vars - # run: | - # echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} - # echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} - # echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - # echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} - # echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} - - - name: upgrade - should be backwards compatible - if: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} - working-directory: ./upgrade-tests - # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha + - name: sanity check vars run: | - echo "Don't run this when we expect the change to break backward compatibility" - echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} - echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} - # RUST_MIN_STACK=104857600 cargo test compatible_ - - - name: upgrade - check workflow - if: always() - working-directory: ./upgrade-tests - # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. - run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ - - rescue: - timeout-minutes: 60 - needs: [build-framework] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: setup env - if: ${{runner.environment == 'self-hosted'}} - uses: ./.github/actions/build_env - - - uses: actions/download-artifact@v4.1.2 - if: ${{runner.environment == 'self-hosted'}} - with: - name: framework-build - path: framework/ - - name: rescue - # if: always() - if: ${{runner.environment == 'self-hosted'}} - working-directory: ./tools/rescue - run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 + echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} + echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} diff --git a/.github/workflows/cleanliness.yaml b/.github/workflows_temp/cleanliness.yaml similarity index 100% rename from .github/workflows/cleanliness.yaml rename to .github/workflows_temp/cleanliness.yaml diff --git a/.github/workflows/formal.yaml b/.github/workflows_temp/formal.yaml similarity index 100% rename from .github/workflows/formal.yaml rename to .github/workflows_temp/formal.yaml diff --git a/.github/workflows/move.yaml b/.github/workflows_temp/move.yaml similarity index 100% rename from .github/workflows/move.yaml rename to .github/workflows_temp/move.yaml diff --git a/.github/workflows/nuke-ci.yaml b/.github/workflows_temp/nuke-ci.yaml similarity index 100% rename from .github/workflows/nuke-ci.yaml rename to .github/workflows_temp/nuke-ci.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows_temp/publish.yaml similarity index 100% rename from .github/workflows/publish.yaml rename to .github/workflows_temp/publish.yaml diff --git a/.github/workflows_temp/rust-ci.yaml b/.github/workflows_temp/rust-ci.yaml new file mode 100644 index 000000000..e216daf13 --- /dev/null +++ b/.github/workflows_temp/rust-ci.yaml @@ -0,0 +1,269 @@ +name: rust ci + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" + branches: ["**"] # glob pattern to allow slash / + pull_request: + types: + - opened + - synchronize + branches: + - "release**" + - "main**" + schedule: + - cron: "30 00 * * *" + +env: + DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node + LIBRA_CI: 1 + MODE_0L: "TESTNET" + +jobs: + build-framework: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - name: build framework + working-directory: ./framework + run: cargo r release + + - uses: actions/upload-artifact@v4.3.1 + with: + name: framework-build + path: framework/* + + types: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + # fail fast if types doesnt compile, everything else will fail. + - name: types + working-directory: ./types + run: cargo test --no-fail-fast + + wallet: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - name: wallet + if: always() + working-directory: ./tools/wallet + run: cargo test --no-fail-fast + + # NOTE: all jobs below need the fresh framework build + smoke: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + # make sure we have a fresh framework build + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + # Check test suite meta tests + - name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH + if: always() + working-directory: ./smoke-tests + run: cargo test --no-fail-fast -- --test-threads=1 + + query: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + # Tools tests (some use smoke-tests) + - name: query + if: always() + working-directory: ./tools/query + run: cargo test --no-fail-fast + + genesis: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + - name: genesis + if: always() + working-directory: ./tools/genesis + run: cargo test --no-fail-fast + + txs: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + - name: txs + if: always() + working-directory: ./tools/txs + # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. + run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast + + upgrades: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: setup env + uses: ./.github/actions/build_env + + - uses: Swatinem/rust-cache@v2.7.3 + with: + shared-key: "libra-framework" + cache-all-crates: true + + - uses: actions/download-artifact@v4.1.2 + with: + name: framework-build + path: framework/ + + # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) + - name: get commit names + run: | + echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} + # better to do it in a new context so the env has been saved + - name: eval breaking + run: | + echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG_ALT, '[breaking]') || contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV} + + echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking/') || contains(github.ref, 'breaking/') || contains(github.head_ref, 'breaking/')}}" >> ${GITHUB_ENV} + + + # - name: sanity check vars + # run: | + # echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }} + # echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }} + # echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + # echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + # echo test: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} + + - name: upgrade - should be backwards compatible + if: ${{ !(env.BRANCH_BREAKING == 'true' || !env.COMMIT_BREAKING == 'true') }} + working-directory: ./upgrade-tests + # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow com o tamanho padrão da pilha + run: | + echo "Don't run this when we expect the change to break backward compatibility" + echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }} + echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }} + # RUST_MIN_STACK=104857600 cargo test compatible_ + + - name: upgrade - check workflow + if: always() + working-directory: ./upgrade-tests + # NOTE: upgrade tests which compile Move code, and then submit in the same thread will cause a stack overflow with the default rust stack size. + run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --skip compatible_ + + rescue: + timeout-minutes: 60 + needs: [build-framework] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: setup env + if: ${{runner.environment == 'self-hosted'}} + uses: ./.github/actions/build_env + + - uses: actions/download-artifact@v4.1.2 + if: ${{runner.environment == 'self-hosted'}} + with: + name: framework-build + path: framework/ + - name: rescue + # if: always() + if: ${{runner.environment == 'self-hosted'}} + working-directory: ./tools/rescue + run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1 From 5257339985b353931c945e672669206f3196736c Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 20:27:46 -0400 Subject: [PATCH 57/62] get latest commit msg --- .github/workflows/rust-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 51b68461c..57b22450a 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -36,7 +36,7 @@ jobs: - name: get commit names run: | echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}}" >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=${{github.event.pull_request.commits[0].message}}" >> ${GITHUB_ENV} # better to do it in a new context so the env has been saved - name: eval breaking run: | From 2a9d0b874de5d3d0eeda4c86c5879d84aaa041bd Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Sun, 4 Aug 2024 20:31:20 -0400 Subject: [PATCH 58/62] try wirkflow run head commit --- .github/workflows/rust-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 57b22450a..8d2671a23 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -36,7 +36,7 @@ jobs: - name: get commit names run: | echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=${{github.event.pull_request.commits[0].message}}" >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=${{ github.event.workflow_run.head_commit.message }}" >> ${GITHUB_ENV} # better to do it in a new context so the env has been saved - name: eval breaking run: | From b0afe4729df05a7e56e6148dfbbc8dcc0670c062 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:10:07 -0400 Subject: [PATCH 59/62] try get alt name --- .github/workflows/rust-ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 8d2671a23..b46b3044c 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -33,10 +33,10 @@ jobs: # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - - name: get commit names + - name: get commit message run: | - echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=${{ github.event.workflow_run.head_commit.message }}" >> ${GITHUB_ENV} + echo LAST_COMMIT_MSG=$(git --no-pager log $GITHUB_SHA -n 1 --pretty=%B) >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=git --no-pager log $GITHUB_REF_NAME -n 1 --pretty=%B" >> ${GITHUB_ENV} # better to do it in a new context so the env has been saved - name: eval breaking run: | From 87add7733ac947c60f40c4c477ebbea69ccb402b Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:11:12 -0400 Subject: [PATCH 60/62] patch --- .github/workflows/rust-ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index b46b3044c..981c91631 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -36,7 +36,8 @@ jobs: - name: get commit message run: | echo LAST_COMMIT_MSG=$(git --no-pager log $GITHUB_SHA -n 1 --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=git --no-pager log $GITHUB_REF_NAME -n 1 --pretty=%B" >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=$(git --no-pager log $GITHUB_REF_NAME -n 1 --pretty=%B)" >> ${GITHUB_ENV} + echo ${GITHB_ENV} # better to do it in a new context so the env has been saved - name: eval breaking run: | From d22356f39c3e1d6363a0182b846b9f1eec4745e2 Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:13:25 -0400 Subject: [PATCH 61/62] GITHUB_HEAD_REF --- .github/workflows/rust-ci.yaml | 9 +++++++-- .github/workflows_temp/formal.yaml | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 981c91631..29357f26b 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -31,13 +31,18 @@ jobs: - name: Check out code uses: actions/checkout@v3 + # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + detached: true + timeout-minutes: 3 # should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title) - name: get commit message run: | echo LAST_COMMIT_MSG=$(git --no-pager log $GITHUB_SHA -n 1 --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=$(git --no-pager log $GITHUB_REF_NAME -n 1 --pretty=%B)" >> ${GITHUB_ENV} - echo ${GITHB_ENV} + echo "LAST_COMMIT_MSG_ALT=$(git --no-pager log $GITHUB_HEAD_REF -n 1 --pretty=%B)" >> ${GITHUB_ENV} # better to do it in a new context so the env has been saved - name: eval breaking run: | diff --git a/.github/workflows_temp/formal.yaml b/.github/workflows_temp/formal.yaml index 97963a495..75cd3e747 100644 --- a/.github/workflows_temp/formal.yaml +++ b/.github/workflows_temp/formal.yaml @@ -23,7 +23,7 @@ jobs: formal: runs-on: ubuntu-latest steps: - # # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url + # NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url # - name: Setup tmate session # uses: mxschmitt/action-tmate@v3 # with: From fd5904716e7e46f074950c7342af48ddd23717dd Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:18:52 -0400 Subject: [PATCH 62/62] use head sha --- .github/workflows/rust-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index 29357f26b..7b2aa7e09 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -42,7 +42,7 @@ jobs: - name: get commit message run: | echo LAST_COMMIT_MSG=$(git --no-pager log $GITHUB_SHA -n 1 --pretty=%B) >> ${GITHUB_ENV} - echo "LAST_COMMIT_MSG_ALT=$(git --no-pager log $GITHUB_HEAD_REF -n 1 --pretty=%B)" >> ${GITHUB_ENV} + echo "LAST_COMMIT_MSG_ALT=$(git --no-pager show ${{github.event.pull_request.head.sha}} --pretty=%B)" >> ${GITHUB_ENV} # better to do it in a new context so the env has been saved - name: eval breaking run: |