From 2bfd17069a9a2d507803a58fe397c058011fb3f1 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Mon, 18 Dec 2023 17:04:22 -0500 Subject: [PATCH 01/23] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 14e25870..fce4ce66 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -26,7 +26,7 @@ jobs: ref: refs/pull/${{ github.event.issue.number }}/head - name: Build and run PR id: build-and-run - uses: SegmentLinking/TrackLooper-actions/standalone@v1 + uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 with: pr-number: ${{ github.event.issue.number }} - name: Upload plots to archival repo @@ -96,7 +96,7 @@ jobs: echo "cmssw-branch=$cmssw_branch" >> $GITHUB_ENV - name: Build and run PR id: build-and-run - uses: SegmentLinking/TrackLooper-actions/cmssw@v1 + uses: SegmentLinkingTests/TrackLooper-actions/cmssw@v1 with: pr-number: ${{ github.event.issue.number }} cmssw-branch: ${{ env.cmssw-branch }} From 1c969d42097698332df4c02568ede7c98585eee5 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Mon, 18 Dec 2023 17:17:19 -0500 Subject: [PATCH 02/23] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fce4ce66..2b576950 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,7 +17,7 @@ jobs: if: > github.event.issue.pull_request && contains(github.event.comment.body, '/run standalone') && - (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'CONTRIBUTOR') + github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest steps: - name: Checkout PR @@ -63,7 +63,7 @@ jobs: if: > github.event.issue.pull_request && contains(github.event.comment.body, '/run cmssw') && - (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'CONTRIBUTOR') + github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest steps: - name: Checkout PR From 24a8e49364285a3a96ee80e805cfa90b44b0732e Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 14:41:05 -0500 Subject: [PATCH 03/23] Update testing.yml --- .github/workflows/testing.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2b576950..1c22a1f7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,7 +5,7 @@ on: types: [created] concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }} + group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} cancel-in-progress: true permissions: @@ -19,11 +19,16 @@ jobs: contains(github.event.comment.body, '/run standalone') && github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout PR uses: actions/checkout@v4 with: ref: refs/pull/${{ github.event.issue.number }}/head + - name: Get commit SHA + run: | + sha=$(git rev-parse HEAD) + echo "COMMIT_SHA=$sha" >> $GITHUB_ENV - name: Build and run PR id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 @@ -58,6 +63,13 @@ jobs: repo: context.repo.repo, body: `There was a problem while building and running in standalone mode. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` }) + - uses: LouisBrunner/checks-action@v1.6.1 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ env.COMMIT_SHA }} + name: Standalone run + conclusion: ${{ job.status }} cmssw: if: > @@ -65,11 +77,16 @@ jobs: contains(github.event.comment.body, '/run cmssw') && github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest + timeout-minutes: 150 steps: - name: Checkout PR uses: actions/checkout@v4 with: ref: refs/pull/${{ github.event.issue.number }}/head + - name: Get commit SHA + run: | + sha=$(git rev-parse HEAD) + echo "COMMIT_SHA=$sha" >> $GITHUB_ENV - name: Get CMSSW branch name env: COMMENT_BODY: ${{ github.event.comment.body }} @@ -83,9 +100,8 @@ jobs: words=($line) cmssw_branch="${words[2]}" # Validate the extracted branch to avoid code injection - if ! [[ $cmssw_branch =~ ^[[:alnum:]_-]+$ ]]; then - echo "Branch name is invalid. Ignoring..." - cmssw_branch= + if [ -z "$cmssw_branch" ]; then + cmssw_branch=(git check-ref-format --branch $cmssw_branch || echo "default") fi fi done <<< "$COMMENT_BODY" @@ -129,3 +145,10 @@ jobs: repo: context.repo.repo, body: `There was a problem while building and running with CMSSW. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` }) + - uses: LouisBrunner/checks-action@v1.6.1 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ env.COMMIT_SHA }} + name: CMSSW run + conclusion: ${{ job.status }} From 18edd2764fd13acf544ab5d4e754f50baf112fc7 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 14:44:30 -0500 Subject: [PATCH 04/23] Update testing.yml --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1c22a1f7..3daf9981 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -100,7 +100,7 @@ jobs: words=($line) cmssw_branch="${words[2]}" # Validate the extracted branch to avoid code injection - if [ -z "$cmssw_branch" ]; then + if [ -n "$cmssw_branch" ]; then cmssw_branch=(git check-ref-format --branch $cmssw_branch || echo "default") fi fi From 9430724f9b98740ce48f0982a29f238ebf313284 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 14:48:35 -0500 Subject: [PATCH 05/23] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3daf9981..0538b1af 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -95,13 +95,13 @@ jobs: cmssw_branch= while IFS= read -r line; do echo "$line" - if [[ $line == *"/run cmssw"* ]]; then + if [[ $line == "/run cmssw"* ]]; then # Check if there is a branch after "/run cmssw" words=($line) cmssw_branch="${words[2]}" # Validate the extracted branch to avoid code injection if [ -n "$cmssw_branch" ]; then - cmssw_branch=(git check-ref-format --branch $cmssw_branch || echo "default") + cmssw_branch=$(git check-ref-format --branch $cmssw_branch || echo "default") fi fi done <<< "$COMMENT_BODY" From 459ff51fc8a605701a8b1355d800d0b8531e7d5f Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 15:00:29 -0500 Subject: [PATCH 06/23] Update testing.yml --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0538b1af..ac6c12aa 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,6 +11,7 @@ concurrency: permissions: contents: read pull-requests: write + checks: write jobs: standalone: From a0f17caf5eef5a8bd4be899ef41903a951f9d11d Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 16:11:42 -0500 Subject: [PATCH 07/23] Create checks_test.yml --- .github/workflows/checks_test.yml | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/checks_test.yml diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml new file mode 100644 index 00000000..76304a26 --- /dev/null +++ b/.github/workflows/checks_test.yml @@ -0,0 +1,73 @@ +name: Testing + +on: + issue_comment: + types: [created] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: write + checks: write + +jobs: + standalone: + if: > + github.event.issue.pull_request && + contains(github.event.comment.body, '/run standalone') && + github.event.comment.user.login == 'ariostas' + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout PR + uses: actions/checkout@v4 + with: + ref: refs/pull/${{ github.event.issue.number }}/head + - name: Get commit SHA + run: | + sha=$(git rev-parse HEAD) + echo "COMMIT_SHA=$sha" >> $GITHUB_ENV + - name: Build and run PR + id: build-and-run + uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 + with: + pr-number: ${{ github.event.issue.number }} + - name: Upload plots to archival repo + uses: s0/git-publish-subdir-action@develop + env: + REPO: git@github.com:${{ steps.build-and-run.outputs.archive-repo }}.git + BRANCH: ${{ steps.build-and-run.outputs.archive-branch }} + FOLDER: ${{ steps.build-and-run.outputs.archive-dir }} + SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} + TARGET_DIR: ${{ steps.build-and-run.outputs.archive-dir }} + - name: Comment on PR + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `${{ steps.build-and-run.outputs.comment }}` + }) + - name: Comment on PR if job failed. + if: failure() + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `There was a problem while building and running in standalone mode. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` + }) + - uses: LouisBrunner/checks-action@v1.6.1 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ env.COMMIT_SHA }} + name: Standalone run + conclusion: ${{ job.status }} From 4b66503cee34593e16a075afc494fea00fe6ae2b Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 16:14:02 -0500 Subject: [PATCH 08/23] Update checks_test.yml --- .github/workflows/checks_test.yml | 38 ++----------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml index 76304a26..12dc980f 100644 --- a/.github/workflows/checks_test.yml +++ b/.github/workflows/checks_test.yml @@ -1,4 +1,4 @@ -name: Testing +name: Checks test on: issue_comment: @@ -17,7 +17,7 @@ jobs: standalone: if: > github.event.issue.pull_request && - contains(github.event.comment.body, '/run standalone') && + contains(github.event.comment.body, '/run check') && github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest timeout-minutes: 60 @@ -30,40 +30,6 @@ jobs: run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV - - name: Build and run PR - id: build-and-run - uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 - with: - pr-number: ${{ github.event.issue.number }} - - name: Upload plots to archival repo - uses: s0/git-publish-subdir-action@develop - env: - REPO: git@github.com:${{ steps.build-and-run.outputs.archive-repo }}.git - BRANCH: ${{ steps.build-and-run.outputs.archive-branch }} - FOLDER: ${{ steps.build-and-run.outputs.archive-dir }} - SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} - TARGET_DIR: ${{ steps.build-and-run.outputs.archive-dir }} - - name: Comment on PR - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `${{ steps.build-and-run.outputs.comment }}` - }) - - name: Comment on PR if job failed. - if: failure() - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `There was a problem while building and running in standalone mode. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` - }) - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: From 1d39a2a9db107242c33ae639a30ae76f5ceff4b3 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 16:15:35 -0500 Subject: [PATCH 09/23] Update checks_test.yml --- .github/workflows/checks_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml index 12dc980f..64b1e6d2 100644 --- a/.github/workflows/checks_test.yml +++ b/.github/workflows/checks_test.yml @@ -35,5 +35,5 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ env.COMMIT_SHA }} - name: Standalone run + name: Test check conclusion: ${{ job.status }} From 0620e9ea2f0749b009ebeaeac057185c7b069259 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 16:17:10 -0500 Subject: [PATCH 10/23] Update checks_test.yml --- .github/workflows/checks_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml index 64b1e6d2..8f216a43 100644 --- a/.github/workflows/checks_test.yml +++ b/.github/workflows/checks_test.yml @@ -35,5 +35,5 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ env.COMMIT_SHA }} - name: Test check + name: Checks / Test check conclusion: ${{ job.status }} From 92201d82b5dd706d9e7aa363ce6893463c80597d Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 16:19:41 -0500 Subject: [PATCH 11/23] Update checks_test.yml --- .github/workflows/checks_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml index 8f216a43..df59e695 100644 --- a/.github/workflows/checks_test.yml +++ b/.github/workflows/checks_test.yml @@ -35,5 +35,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ env.COMMIT_SHA }} - name: Checks / Test check + name: Checks / Test check 2 conclusion: ${{ job.status }} + details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} From bc9be3672fcfce4dc632f7c07badb3fedf5d0788 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Wed, 3 Jan 2024 17:19:20 -0500 Subject: [PATCH 12/23] Update checks_test.yml --- .github/workflows/checks_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml index df59e695..b39e91eb 100644 --- a/.github/workflows/checks_test.yml +++ b/.github/workflows/checks_test.yml @@ -3,6 +3,7 @@ name: Checks test on: issue_comment: types: [created] + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} From 52e11c1676daaf6427917b6c41a9b260ebfb20a5 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 09:37:29 -0500 Subject: [PATCH 13/23] Updated checks --- .github/workflows/{testing.yml => checks.yml} | 65 +++++++++++++++++-- .github/workflows/checks_test.yml | 41 ------------ .github/workflows/static-checks.yml | 49 -------------- 3 files changed, 61 insertions(+), 94 deletions(-) rename .github/workflows/{testing.yml => checks.yml} (65%) delete mode 100644 .github/workflows/checks_test.yml delete mode 100644 .github/workflows/static-checks.yml diff --git a/.github/workflows/testing.yml b/.github/workflows/checks.yml similarity index 65% rename from .github/workflows/testing.yml rename to .github/workflows/checks.yml index ac6c12aa..a926e46e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/checks.yml @@ -1,11 +1,13 @@ -name: Testing +name: Checks on: issue_comment: types: [created] + pull_request: + branches: master concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} + group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }}-${{ github.sha }} cancel-in-progress: true permissions: @@ -30,6 +32,14 @@ jobs: run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV + - uses: LouisBrunner/checks-action@v1.6.1 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ env.COMMIT_SHA }} + name: standalone + status: in_progress + details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - name: Build and run PR id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 @@ -69,8 +79,9 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ env.COMMIT_SHA }} - name: Standalone run + name: standalone conclusion: ${{ job.status }} + details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} cmssw: if: > @@ -88,6 +99,14 @@ jobs: run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV + - uses: LouisBrunner/checks-action@v1.6.1 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ env.COMMIT_SHA }} + name: cmssw + status: in_progress + details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - name: Get CMSSW branch name env: COMMENT_BODY: ${{ github.event.comment.body }} @@ -151,5 +170,43 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ env.COMMIT_SHA }} - name: CMSSW run + name: cmssw conclusion: ${{ job.status }} + details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + linter: + if: ${{ github.event_name }} == 'pull_request' + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout PR + uses: actions/checkout@v4 + - name: Mount cvmfs + uses: cvmfs-contrib/github-action-cvmfs@v3 + - name: Gather paths of needed headers + shell: bash + run: | + source setup.sh + INCLUDE_FLAGS="-I$TRACKLOOPERDIR -I$BOOST_ROOT/include -I$ALPAKA_ROOT/include -I$CUDA_HOME/include -I$ROOT_ROOT/include -I$CMSSW_BASE/src" + INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1" + INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1/x86_64-redhat-linux-gnu/" + INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/lib/gcc/x86_64-redhat-linux-gnu/11.4.1/include" + echo "include-flags=$INCLUDE_FLAGS" >> $GITHUB_ENV + # Note: Ideally we would use compiledb to generate a compile_commands.json file, but I couldn't get it to work properly with clang-tidy. + # This alternative of simply passing some extra arguments to clang-tidy seems to work fine (at least for now). + - name: Run linter + uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file + thread-comments: true + # only use checks in .clang-tidy file + tidy-checks: '' + lines-changed-only: true + ignore: .github|bin|code|data|efficiency + extra-args: '-ferror-limit=0 -std=c++17 -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED ${{ env.include-flags }}' + - name: Fail job if there were checks that failed + if: steps.linter.outputs.checks-failed > 0 + run: exit 1 diff --git a/.github/workflows/checks_test.yml b/.github/workflows/checks_test.yml deleted file mode 100644 index b39e91eb..00000000 --- a/.github/workflows/checks_test.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Checks test - -on: - issue_comment: - types: [created] - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} - cancel-in-progress: true - -permissions: - contents: read - pull-requests: write - checks: write - -jobs: - standalone: - if: > - github.event.issue.pull_request && - contains(github.event.comment.body, '/run check') && - github.event.comment.user.login == 'ariostas' - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Checkout PR - uses: actions/checkout@v4 - with: - ref: refs/pull/${{ github.event.issue.number }}/head - - name: Get commit SHA - run: | - sha=$(git rev-parse HEAD) - echo "COMMIT_SHA=$sha" >> $GITHUB_ENV - - uses: LouisBrunner/checks-action@v1.6.1 - if: always() - with: - token: ${{ secrets.GITHUB_TOKEN }} - sha: ${{ env.COMMIT_SHA }} - name: Checks / Test check 2 - conclusion: ${{ job.status }} - details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml deleted file mode 100644 index e30ec8d7..00000000 --- a/.github/workflows/static-checks.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Static checks - -on: - pull_request: - branches: master - -concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }} - cancel-in-progress: true - -permissions: - contents: read - pull-requests: write - -jobs: - linter: - runs-on: ubuntu-latest - steps: - - name: Checkout PR - uses: actions/checkout@v4 - - name: Mount cvmfs - uses: cvmfs-contrib/github-action-cvmfs@v3 - - name: Gather paths of needed headers - shell: bash - run: | - source setup.sh - INCLUDE_FLAGS="-I$TRACKLOOPERDIR -I$BOOST_ROOT/include -I$ALPAKA_ROOT/include -I$CUDA_HOME/include -I$ROOT_ROOT/include -I$CMSSW_BASE/src" - INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1" - INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1/x86_64-redhat-linux-gnu/" - INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/lib/gcc/x86_64-redhat-linux-gnu/11.4.1/include" - echo "include-flags=$INCLUDE_FLAGS" >> $GITHUB_ENV - # Note: Ideally we would use compiledb to generate a compile_commands.json file, but I couldn't get it to work properly with clang-tidy. - # This alternative of simply passing some extra arguments to clang-tidy seems to work fine (at least for now). - - name: Run linter - uses: cpp-linter/cpp-linter-action@v2 - id: linter - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - style: file - thread-comments: true - # only use checks in .clang-tidy file - tidy-checks: '' - lines-changed-only: true - ignore: .github|bin|code|data|efficiency - extra-args: '-ferror-limit=0 -std=c++17 -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED ${{ env.include-flags }}' - - name: Fail job if there were checks that failed - if: steps.linter.outputs.checks-failed > 0 - run: exit 1 From 63c413550490e78cf08cbc7b78607d7eafbc2865 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 10:52:20 -0500 Subject: [PATCH 14/23] Added app --- .github/workflows/static-checks.yml | 49 +++++++++++++++ .github/workflows/{checks.yml => testing.yml} | 61 ++++++------------- 2 files changed, 66 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/static-checks.yml rename .github/workflows/{checks.yml => testing.yml} (74%) diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml new file mode 100644 index 00000000..85d87bf9 --- /dev/null +++ b/.github/workflows/static-checks.yml @@ -0,0 +1,49 @@ +name: Static checks + +on: + pull_request: + branches: master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.issue.number }} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: write + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - name: Checkout PR + uses: actions/checkout@v4 + - name: Mount cvmfs + uses: cvmfs-contrib/github-action-cvmfs@v3 + - name: Gather paths of needed headers + shell: bash + run: | + source setup.sh + INCLUDE_FLAGS="-I$TRACKLOOPERDIR -I$BOOST_ROOT/include -I$ALPAKA_ROOT/include -I$CUDA_HOME/include -I$ROOT_ROOT/include -I$CMSSW_BASE/src" + INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1" + INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1/x86_64-redhat-linux-gnu/" + INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/lib/gcc/x86_64-redhat-linux-gnu/11.4.1/include" + echo "include-flags=$INCLUDE_FLAGS" >> $GITHUB_ENV + # Note: Ideally we would use compiledb to generate a compile_commands.json file, but I couldn't get it to work properly with clang-tidy. + # This alternative of simply passing some extra arguments to clang-tidy seems to work fine (at least for now). + - name: Run linter + uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file + thread-comments: true + # only use checks in .clang-tidy file + tidy-checks: '' + lines-changed-only: true + ignore: .github|bin|code|data|efficiency + extra-args: '-ferror-limit=0 -std=c++17 -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED ${{ env.include-flags }}' + - name: Fail job if there were checks that failed + if: steps.linter.outputs.checks-failed > 0 + run: exit 1 \ No newline at end of file diff --git a/.github/workflows/checks.yml b/.github/workflows/testing.yml similarity index 74% rename from .github/workflows/checks.yml rename to .github/workflows/testing.yml index a926e46e..a529aeac 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/testing.yml @@ -3,11 +3,9 @@ name: Checks on: issue_comment: types: [created] - pull_request: - branches: master concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }}-${{ github.sha }} + group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} cancel-in-progress: true permissions: @@ -32,10 +30,16 @@ jobs: run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV + - name: Create App Token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: 778431 + private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} name: standalone status: in_progress @@ -77,7 +81,7 @@ jobs: - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} name: standalone conclusion: ${{ job.status }} @@ -99,10 +103,16 @@ jobs: run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV + - name: Create App Token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: 778431 + private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} name: cmssw status: in_progress @@ -168,45 +178,8 @@ jobs: - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} name: cmssw conclusion: ${{ job.status }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - - linter: - if: ${{ github.event_name }} == 'pull_request' - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout PR - uses: actions/checkout@v4 - - name: Mount cvmfs - uses: cvmfs-contrib/github-action-cvmfs@v3 - - name: Gather paths of needed headers - shell: bash - run: | - source setup.sh - INCLUDE_FLAGS="-I$TRACKLOOPERDIR -I$BOOST_ROOT/include -I$ALPAKA_ROOT/include -I$CUDA_HOME/include -I$ROOT_ROOT/include -I$CMSSW_BASE/src" - INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1" - INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1/x86_64-redhat-linux-gnu/" - INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/lib/gcc/x86_64-redhat-linux-gnu/11.4.1/include" - echo "include-flags=$INCLUDE_FLAGS" >> $GITHUB_ENV - # Note: Ideally we would use compiledb to generate a compile_commands.json file, but I couldn't get it to work properly with clang-tidy. - # This alternative of simply passing some extra arguments to clang-tidy seems to work fine (at least for now). - - name: Run linter - uses: cpp-linter/cpp-linter-action@v2 - id: linter - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - style: file - thread-comments: true - # only use checks in .clang-tidy file - tidy-checks: '' - lines-changed-only: true - ignore: .github|bin|code|data|efficiency - extra-args: '-ferror-limit=0 -std=c++17 -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED ${{ env.include-flags }}' - - name: Fail job if there were checks that failed - if: steps.linter.outputs.checks-failed > 0 - run: exit 1 From 40646fdcfe2c6736dbfa24afe568b53cd5f3259f Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 14:15:37 -0500 Subject: [PATCH 15/23] Update static checks --- .github/workflows/static-checks.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 85d87bf9..0d95e340 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -15,22 +15,32 @@ permissions: jobs: linter: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout PR uses: actions/checkout@v4 - name: Mount cvmfs uses: cvmfs-contrib/github-action-cvmfs@v3 - - name: Gather paths of needed headers - shell: bash + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Generate compilation database + working-directory: ./SDL run: | - source setup.sh + pip install compiledb compdb + make BACKEND=cpu -Bnwk > build_log.txt + compiledb < build_log.txt + # This extra step is needed to generate compilation commands for headers + compdb list > compile_commands_new.json + mv compile_commands_new.json > compile_commands.json + # Now we gather some include paths since the compiler is not fully configured to find all the headers. + source setup.sh 1> /dev/null 2> /dev/null INCLUDE_FLAGS="-I$TRACKLOOPERDIR -I$BOOST_ROOT/include -I$ALPAKA_ROOT/include -I$CUDA_HOME/include -I$ROOT_ROOT/include -I$CMSSW_BASE/src" INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1" INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/include/c++/11.4.1/x86_64-redhat-linux-gnu/" INCLUDE_FLAGS="$INCLUDE_FLAGS -I/cvmfs/cms.cern.ch/el8_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/lib/gcc/x86_64-redhat-linux-gnu/11.4.1/include" echo "include-flags=$INCLUDE_FLAGS" >> $GITHUB_ENV - # Note: Ideally we would use compiledb to generate a compile_commands.json file, but I couldn't get it to work properly with clang-tidy. - # This alternative of simply passing some extra arguments to clang-tidy seems to work fine (at least for now). - name: Run linter uses: cpp-linter/cpp-linter-action@v2 id: linter @@ -43,7 +53,7 @@ jobs: tidy-checks: '' lines-changed-only: true ignore: .github|bin|code|data|efficiency - extra-args: '-ferror-limit=0 -std=c++17 -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED ${{ env.include-flags }}' + extra-args: '-ferror-limit=0 ${{ env.include-flags }}' - name: Fail job if there were checks that failed if: steps.linter.outputs.checks-failed > 0 run: exit 1 \ No newline at end of file From 9262fd7787374b910c773e8a65f0c519b0ed5040 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 16:30:30 -0500 Subject: [PATCH 16/23] Update testing.yml --- .github/workflows/testing.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a529aeac..682440d8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,13 +5,12 @@ on: types: [created] concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ github.event.comment.user.login }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} + group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ contains(github.event.comment.body, '/run standalone') }}-${{ contains(github.event.comment.body, '/run cmssw') }} cancel-in-progress: true permissions: contents: read pull-requests: write - checks: write jobs: standalone: @@ -78,14 +77,23 @@ jobs: repo: context.repo.repo, body: `There was a problem while building and running in standalone mode. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` }) + - name: Create App Token + if: always() + uses: actions/create-github-app-token@v1 + id: app-token-end + with: + app-id: 778431 + private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: - token: ${{ steps.app-token.outputs.token }} + token: ${{ steps.app-token-end.outputs.token }} sha: ${{ env.COMMIT_SHA }} name: standalone conclusion: ${{ job.status }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: | + {"summary": "Status: ${{ job.status }}", "text_description": "More details can be found in the job logs [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} cmssw: if: > @@ -93,7 +101,7 @@ jobs: contains(github.event.comment.body, '/run cmssw') && github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest - timeout-minutes: 150 + timeout-minutes: 180 steps: - name: Checkout PR uses: actions/checkout@v4 @@ -175,11 +183,20 @@ jobs: repo: context.repo.repo, body: `There was a problem while building and running with CMSSW. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` }) + - name: Create App Token + if: always() + uses: actions/create-github-app-token@v1 + id: app-token-end + with: + app-id: 778431 + private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() with: - token: ${{ steps.app-token.outputs.token }} + token: ${{ steps.app-token-end.outputs.token }} sha: ${{ env.COMMIT_SHA }} name: cmssw conclusion: ${{ job.status }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: | + {"summary": "Status: ${{ job.status }}", "text_description": "More details can be found in the job logs [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} From 28c656c354c11ef2acd9a41f0f8801775c086f80 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 16:56:44 -0500 Subject: [PATCH 17/23] Update testing.yml --- .github/workflows/testing.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 682440d8..6b0a1a6c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -40,9 +40,11 @@ jobs: with: token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} - name: standalone + name: Run Standalone PU200 status: in_progress details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: | + {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Build and run PR id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 @@ -75,7 +77,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `There was a problem while building and running in standalone mode. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` + body: `There was a problem while building and running in standalone mode. The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` }) - name: Create App Token if: always() @@ -89,11 +91,11 @@ jobs: with: token: ${{ steps.app-token-end.outputs.token }} sha: ${{ env.COMMIT_SHA }} - name: standalone + name: Run Standalone PU200 conclusion: ${{ job.status }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"summary": "Status: ${{ job.status }}", "text_description": "More details can be found in the job logs [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} cmssw: if: > @@ -122,9 +124,11 @@ jobs: with: token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} - name: cmssw + name: Run CMSSW 21034.1 status: in_progress details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + output: | + {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Get CMSSW branch name env: COMMENT_BODY: ${{ github.event.comment.body }} @@ -181,7 +185,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `There was a problem while building and running with CMSSW. You can find a log of the job [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` + body: `There was a problem while building and running with CMSSW. The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).` }) - name: Create App Token if: always() @@ -195,8 +199,8 @@ jobs: with: token: ${{ steps.app-token-end.outputs.token }} sha: ${{ env.COMMIT_SHA }} - name: cmssw + name: Run CMSSW 21034.1 conclusion: ${{ job.status }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"summary": "Status: ${{ job.status }}", "text_description": "More details can be found in the job logs [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} From 51ca6ea45db1f756cbc5e52cb836b5aab54015d5 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 16:59:39 -0500 Subject: [PATCH 18/23] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6b0a1a6c..6113eac7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -44,7 +44,7 @@ jobs: status: in_progress details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "This check is in progress...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Build and run PR id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 @@ -128,7 +128,7 @@ jobs: status: in_progress details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "This check is in progress...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Get CMSSW branch name env: COMMENT_BODY: ${{ github.event.comment.body }} From e26e897bfee6167dc5cfa2c716482d8f4e0a5885 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 4 Jan 2024 17:03:28 -0500 Subject: [PATCH 19/23] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6113eac7..d5baba28 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -44,7 +44,7 @@ jobs: status: in_progress details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"title": "This check is in progress...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "This check has started...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Build and run PR id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 @@ -128,7 +128,7 @@ jobs: status: in_progress details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"title": "This check is in progress...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "This check has started...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Get CMSSW branch name env: COMMENT_BODY: ${{ github.event.comment.body }} From 88cfeb154e5e7a14bee80fa222a48d2b5a89e2fe Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Fri, 5 Jan 2024 09:37:41 -0500 Subject: [PATCH 20/23] Update testing.yml --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d5baba28..76fe462a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -19,7 +19,6 @@ jobs: contains(github.event.comment.body, '/run standalone') && github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest - timeout-minutes: 60 steps: - name: Checkout PR uses: actions/checkout@v4 @@ -46,6 +45,7 @@ jobs: output: | {"title": "This check has started...", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} - name: Build and run PR + timeout-minutes: 60 id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/standalone@v1 with: @@ -103,7 +103,6 @@ jobs: contains(github.event.comment.body, '/run cmssw') && github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest - timeout-minutes: 180 steps: - name: Checkout PR uses: actions/checkout@v4 @@ -153,6 +152,7 @@ jobs: echo "Using CMSSW branch: $cmssw_branch" echo "cmssw-branch=$cmssw_branch" >> $GITHUB_ENV - name: Build and run PR + timeout-minutes: 180 id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/cmssw@v1 with: From eed94cda63d30759e74823edaeaf937df6b274b9 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Fri, 5 Jan 2024 09:50:46 -0500 Subject: [PATCH 21/23] Update testing.yml --- .github/workflows/testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 76fe462a..00dd638b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -32,7 +32,7 @@ jobs: uses: actions/create-github-app-token@v1 id: app-token with: - app-id: 778431 + app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() @@ -84,7 +84,7 @@ jobs: uses: actions/create-github-app-token@v1 id: app-token-end with: - app-id: 778431 + app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() @@ -116,7 +116,7 @@ jobs: uses: actions/create-github-app-token@v1 id: app-token with: - app-id: 778431 + app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() @@ -192,7 +192,7 @@ jobs: uses: actions/create-github-app-token@v1 id: app-token-end with: - app-id: 778431 + app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: LouisBrunner/checks-action@v1.6.1 if: always() From 97c000f629fd1f9fc12258f5c006bce726e19856 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Tue, 9 Jan 2024 13:50:36 -0500 Subject: [PATCH 22/23] Match main repo --- .github/workflows/testing.yml | 36 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 00dd638b..ad78bdbe 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,4 +1,4 @@ -name: Checks +name: Testing on: issue_comment: @@ -20,22 +20,23 @@ jobs: github.event.comment.user.login == 'ariostas' runs-on: ubuntu-latest steps: - - name: Checkout PR + - name: Check out PR uses: actions/checkout@v4 with: ref: refs/pull/${{ github.event.issue.number }}/head - name: Get commit SHA - run: | + run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV - name: Create App Token uses: actions/create-github-app-token@v1 id: app-token - with: + with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: LouisBrunner/checks-action@v1.6.1 - if: always() + skip-token-revoke: true + - name: Create in progress check + uses: LouisBrunner/checks-action@v1.6.1 with: token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} @@ -83,10 +84,11 @@ jobs: if: always() uses: actions/create-github-app-token@v1 id: app-token-end - with: + with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: LouisBrunner/checks-action@v1.6.1 + - name: Create completed check + uses: LouisBrunner/checks-action@v1.6.1 if: always() with: token: ${{ steps.app-token-end.outputs.token }} @@ -109,17 +111,18 @@ jobs: with: ref: refs/pull/${{ github.event.issue.number }}/head - name: Get commit SHA - run: | + run: | sha=$(git rev-parse HEAD) echo "COMMIT_SHA=$sha" >> $GITHUB_ENV - name: Create App Token uses: actions/create-github-app-token@v1 id: app-token - with: + with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: LouisBrunner/checks-action@v1.6.1 - if: always() + skip-token-revoke: true + - name: Create in progress check + uses: LouisBrunner/checks-action@v1.6.1 with: token: ${{ steps.app-token.outputs.token }} sha: ${{ env.COMMIT_SHA }} @@ -152,7 +155,7 @@ jobs: echo "Using CMSSW branch: $cmssw_branch" echo "cmssw-branch=$cmssw_branch" >> $GITHUB_ENV - name: Build and run PR - timeout-minutes: 180 + timeout-minutes: 200 id: build-and-run uses: SegmentLinkingTests/TrackLooper-actions/cmssw@v1 with: @@ -191,10 +194,11 @@ jobs: if: always() uses: actions/create-github-app-token@v1 id: app-token-end - with: + with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: LouisBrunner/checks-action@v1.6.1 + - name: Create completed check + uses: LouisBrunner/checks-action@v1.6.1 if: always() with: token: ${{ steps.app-token-end.outputs.token }} @@ -203,4 +207,4 @@ jobs: conclusion: ${{ job.status }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} output: | - {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} + {"title": "Status: ${{ job.status }}", "summary": "The logs can be found [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."} \ No newline at end of file From 483164768c4db95c026c759db97885a21051318f Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Tue, 9 Jan 2024 21:29:56 -0500 Subject: [PATCH 23/23] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7da68668..b81da510 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # TrackLooper +# test ## Quick Start