From f094f148f3c2e547de06cfc665e8d7fee52041f7 Mon Sep 17 00:00:00 2001 From: Efe Date: Fri, 12 Jan 2024 16:17:57 +0100 Subject: [PATCH 1/4] checking script wf --- main.yml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 main.yml diff --git a/main.yml b/main.yml new file mode 100644 index 000000000000..d2ecf7aed9c9 --- /dev/null +++ b/main.yml @@ -0,0 +1,103 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + paths: + - '.github/workflows/**' + - 'bin/Powheg/**' + - '!**/*.input' + - 'bin/utils/**' + pull_request: + branches: [ master ] + paths: + - '.github/workflows/**' + - 'bin/Powheg/**' + - '!**/*.input' + - 'bin/utils/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + powheg: + strategy: + matrix: + proc: [hvq] + #cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1] + cmssw_release: [CMSSW_10_6_30] + include: + - cmssw_release: CMSSW_10_6_30 + scram_arch: slc7_amd64_gcc700 + - cmssw_release: CMSSW_11_0_1 + scram_arch: slc7_amd64_gcc820 + - cmssw_release: CMSSW_12_3_1 + scram_arch: slc7_amd64_gcc10 + fail-fast: false + # The type of runner that the job will run on + runs-on: [self-hosted, linux, x64] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + powheg1: + - 'bin/Powheg/**' + workflow: + - '.github/workflows/**' + - name: Build gridpack + if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true' + uses: nick-fields/retry@v2 + with: + max_attempts: 5 + timeout_minutes: 60 + retry_on_exit_code: 111 # failed CMSSW setup, likely due to cvmfs connectivity + command: docker run --rm -v /cvmfs:/cvmfs -v $PWD:$PWD -w $PWD gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.scram_arch }} -p ${{ matrix.proc }} + + - name: Check pwg-stat.dat + if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true' + run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + commit-message: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} + branch: create-pull-request/${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} + delete-branch: true + base: master + title: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} + body: | + Automated addition by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. + Please review the cross section file carefully! + ############################################################# + req_check_script: + # The type of runner that the job will run on + runs-on: [self-hosted, linux, x64] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + bin: + - 'bin/utils/**' + workflow: + - '.github/workflows/**' + - name: Run the request checking script on local mcm requests + #shell: python + if: steps.filter.outputs.bin == 'true' || steps.filter.outputs.workflow == 'true' + run: | + python3 bin/utils/request_fragment_check.py --bypass_status --develop --local --prepid SUS-RunIISummer20UL16wmLHEGEN-00768 From ca7b27d9bf62bc2054b882b254dac719eafbce53 Mon Sep 17 00:00:00 2001 From: Efe Date: Fri, 12 Jan 2024 16:25:31 +0100 Subject: [PATCH 2/4] wf for req chk scr --- .github/workflows/main.yml | 40 ++++++++++++-- main.yml | 103 ------------------------------------- 2 files changed, 37 insertions(+), 106 deletions(-) delete mode 100644 main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03a1b21ecc48..d2ecf7aed9c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,12 +11,14 @@ on: - '.github/workflows/**' - 'bin/Powheg/**' - '!**/*.input' + - 'bin/utils/**' pull_request: branches: [ master ] paths: - '.github/workflows/**' - 'bin/Powheg/**' - '!**/*.input' + - 'bin/utils/**' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -28,7 +30,8 @@ jobs: strategy: matrix: proc: [hvq] - cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1] + #cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1] + cmssw_release: [CMSSW_10_6_30] include: - cmssw_release: CMSSW_10_6_30 scram_arch: slc7_amd64_gcc700 @@ -44,8 +47,16 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + powheg1: + - 'bin/Powheg/**' + workflow: + - '.github/workflows/**' - name: Build gridpack + if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true' uses: nick-fields/retry@v2 with: max_attempts: 5 @@ -54,6 +65,7 @@ jobs: command: docker run --rm -v /cvmfs:/cvmfs -v $PWD:$PWD -w $PWD gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.scram_arch }} -p ${{ matrix.proc }} - name: Check pwg-stat.dat + if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true' run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} - name: Create Pull Request @@ -66,4 +78,26 @@ jobs: title: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} body: | Automated addition by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. - Please review the cross section file carefully! \ No newline at end of file + Please review the cross section file carefully! + ############################################################# + req_check_script: + # The type of runner that the job will run on + runs-on: [self-hosted, linux, x64] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + bin: + - 'bin/utils/**' + workflow: + - '.github/workflows/**' + - name: Run the request checking script on local mcm requests + #shell: python + if: steps.filter.outputs.bin == 'true' || steps.filter.outputs.workflow == 'true' + run: | + python3 bin/utils/request_fragment_check.py --bypass_status --develop --local --prepid SUS-RunIISummer20UL16wmLHEGEN-00768 diff --git a/main.yml b/main.yml deleted file mode 100644 index d2ecf7aed9c9..000000000000 --- a/main.yml +++ /dev/null @@ -1,103 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - paths: - - '.github/workflows/**' - - 'bin/Powheg/**' - - '!**/*.input' - - 'bin/utils/**' - pull_request: - branches: [ master ] - paths: - - '.github/workflows/**' - - 'bin/Powheg/**' - - '!**/*.input' - - 'bin/utils/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - powheg: - strategy: - matrix: - proc: [hvq] - #cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1] - cmssw_release: [CMSSW_10_6_30] - include: - - cmssw_release: CMSSW_10_6_30 - scram_arch: slc7_amd64_gcc700 - - cmssw_release: CMSSW_11_0_1 - scram_arch: slc7_amd64_gcc820 - - cmssw_release: CMSSW_12_3_1 - scram_arch: slc7_amd64_gcc10 - fail-fast: false - # The type of runner that the job will run on - runs-on: [self-hosted, linux, x64] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - uses: dorny/paths-filter@v2 - id: filter - with: - filters: | - powheg1: - - 'bin/Powheg/**' - workflow: - - '.github/workflows/**' - - name: Build gridpack - if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true' - uses: nick-fields/retry@v2 - with: - max_attempts: 5 - timeout_minutes: 60 - retry_on_exit_code: 111 # failed CMSSW setup, likely due to cvmfs connectivity - command: docker run --rm -v /cvmfs:/cvmfs -v $PWD:$PWD -w $PWD gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.scram_arch }} -p ${{ matrix.proc }} - - - name: Check pwg-stat.dat - if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true' - run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 - with: - commit-message: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} - branch: create-pull-request/${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} - delete-branch: true - base: master - title: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }} - body: | - Automated addition by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. - Please review the cross section file carefully! - ############################################################# - req_check_script: - # The type of runner that the job will run on - runs-on: [self-hosted, linux, x64] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - uses: dorny/paths-filter@v2 - id: filter - with: - filters: | - bin: - - 'bin/utils/**' - workflow: - - '.github/workflows/**' - - name: Run the request checking script on local mcm requests - #shell: python - if: steps.filter.outputs.bin == 'true' || steps.filter.outputs.workflow == 'true' - run: | - python3 bin/utils/request_fragment_check.py --bypass_status --develop --local --prepid SUS-RunIISummer20UL16wmLHEGEN-00768 From 81daafaacbccc1f0c77b959902530cf4063dc816 Mon Sep 17 00:00:00 2001 From: Efe Date: Fri, 12 Jan 2024 17:29:19 +0100 Subject: [PATCH 3/4] test --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2ecf7aed9c9..426ce8d592d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,7 +86,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it# - uses: actions/checkout@v3 - uses: dorny/paths-filter@v2 id: filter From 150586d464b14fa3b70510c60e3b917301f959fe Mon Sep 17 00:00:00 2001 From: Efe Date: Fri, 12 Jan 2024 17:33:29 +0100 Subject: [PATCH 4/4] test --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 426ce8d592d6..94ec3bcbd603 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,8 +30,7 @@ jobs: strategy: matrix: proc: [hvq] - #cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1] - cmssw_release: [CMSSW_10_6_30] + cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1] include: - cmssw_release: CMSSW_10_6_30 scram_arch: slc7_amd64_gcc700