-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Amd/dev/hjagasia amd #170154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Amd/dev/hjagasia amd #170154
Changes from all commits
Commits
Show all changes
10000 commits
Select commit
Hold shift + click to select a range
c500c6a
merge main into amd-staging (#537)
z1-cciauto 98a4dbd
merge main into amd-staging
z1-cciauto 176dd5b
merge main into amd-staging (#538)
ronlieb da0afff
merge main into amd-staging
z1-cciauto e736c5c
merge main into amd-staging (#539)
z1-cciauto 32f9cce
merge main into amd-staging
z1-cciauto d8f3202
merge main into amd-staging (#540)
z1-cciauto 24525f1
merge main into amd-staging
z1-cciauto bf50425
merge main into amd-staging (#542)
z1-cciauto f1e4266
merge main into amd-staging
z1-cciauto 0c4c05e
merge main into amd-staging (#543)
ronlieb 7f18465
merge main into amd-staging
ronlieb 0fadc21
merge main into amd-staging
z1-cciauto c44e578
merge main into amd-staging (#545)
z1-cciauto 73f26e2
merge main into amd-staging (#544)
z1-cciauto 3170777
merge main into amd-staging
z1-cciauto 902bb31
[OpenMP] Fixes failing lit test
nicebert fb71c30
merge main into amd-staging (#547)
z1-cciauto 0d7c0b2
merge main into amd-staging
ronlieb 2f0e563
Increase parallelism in dm
b-sumner 26b4ac0
Revert "[OMPIRBuilder] Fix addrspace of internal critical section loc…
ronlieb a96efa8
Add user poison functions (#494)
b-sumner 70559d4
merge main into amd-staging
ronlieb 05bb629
merge main into amd-staging (#550)
z1-cciauto 12daccd
merge main into amd-staging (#554)
z1-cciauto b1b1257
merge main into amd-staging
ronlieb 3a73595
Revert "Reland "[clang] Refactor option-related code from clangDriver…
ronlieb fa81402
merge main into amd-staging
ronlieb bcb8544
merge main into amd-staging
ronlieb a549ae5
[OpenMP][Clang][Driver] Removes opaque-offload-linker (#507)
nicebert 6f22abd
merge main into amd-staging (#560)
z1-cciauto dd0c29b
Increase parallelism in dm (#551)
b-sumner c2e90ff
merge main into amd-staging (#562)
z1-cciauto ab9cb6a
merge main into amd-staging
ronlieb b7befd2
Reland "[clang] Refactor option-related code from clangDriver into ne…
naveen-seth bb44d77
[clang] retrofit amd-staging for options refactor
macurtis-amd ebcaa3d
[comgr]Options changes for comgr
ronlieb 6b9bcf9
Update reverted_patches.txt
ronlieb 7888bdb
merge main into amd-staging (#563)
z1-cciauto e6a908b
merge main into amd-staging (#566)
z1-cciauto 1ae833f
merge main into amd-staging
ronlieb 34a4763
mar unstable llvm/test/MC/MachO/invalid-section-index.s
ronlieb c1f09d1
merge main into amd-staging (#567)
z1-cciauto 518c02b
merge main into amd-staging
ronlieb e34e00f
merge main into amd-staging (#569)
z1-cciauto 173fe17
Merge llvm/main into amd-debug
mariusz-sikora-at-amd 20def4b
merge main into amd-staging
z1-cciauto f5dae9d
merge main into amd-staging (#570)
z1-cciauto 312a2f5
merge main into amd-staging
z1-cciauto fbb705f
[Flang] Add -ffast-real-mod back for further control of MOD optimizat…
mjklemm bfc8431
Resolve compiler issues after rebasing
mjklemm 82a6eaa
Enable Lintian Support hipcc (#445)
jonatluu ab0b829
merge main into amd-staging (#571)
z1-cciauto 02d967a
[Flang] Add -ffast-real-mod back for further control of MOD optimizat…
ronlieb c3103eb
[OpenMP] Fix small merge artifact in OpenMP device runtime (#568)
agozillon f4093c8
merge main into amd-staging
ronlieb 56c1a58
merge main into amd-staging (#575)
z1-cciauto c5593b7
reland [OMPIRBuilder] Fix addrspace of internal critical section lock…
ronlieb 316ccf2
merge main into amd-staging
z1-cciauto 2dee476
merge main into amd-staging (#579)
z1-cciauto 679865e
Revert "Increase parallelism in dm" (#578)
ronlieb 57d09d3
merge main into amd-staging
z1-cciauto 8570bbe
[openmp] - Add -fno-openmp-implicit-rpath to openmp-config (#527)
estewart08 da9a9ea
merge main into amd-staging (#581)
z1-cciauto 100f084
Merge llvm/main into amd-debug
mariusz-sikora-at-amd d793a77
merge main into amd-staging
z1-cciauto edf06d7
merge main into amd-staging (#582)
z1-cciauto 1c41784
Merge llvm/main into amd-debug
6e7e6ed
[Flang][NFC] Un-xfail tests that had to be xfailed in f4093c8 (#583)
bhandarkar-pranav a5d2b37
merge main into amd-staging
ronlieb bc8423d
[Offload] Add device info for shared memory (#167817)
kevinsala 89671db
Revert "[Offload] Add device info for shared memory (#167817)"
ronlieb d0d0205
merge main into amd-staging
ronlieb 5caa3f6
merge main into amd-staging (#590)
ronlieb 6b9911f
merge main into amd-staging (#591)
ronlieb 0a10125
AMDGPU: Constrain readfirstlane operand to vgpr_32 (#168001)
arsenm 3b160ec
AMDGPU: Constrain readfirstlane operand when writing to m0 (#168004)
arsenm 2e1360c
AMDGPU: Fix verifier error when waterfall call target is in AV regist…
arsenm abb805a
Remaster llvm/test/CodeGen/AMDGPU/waterfall-call-target-av-register-f…
ronlieb ac1f55e
merge main into amd-staging (#593)
ronlieb ec893e2
merge main into amd-staging
ronlieb 09641c7
Manual update of LLVM_MAIN_REVISION to 559440 (#594)
skganesan008 1beead7
merge main into amd-staging (#595)
ronlieb afc80b7
merge main into amd-staging
z1-cciauto 662749c
merge main into amd-staging (#596)
ronlieb b51530b
merge main into amd-staging
ronlieb f473089
merge main into amd-staging (#597)
ronlieb 810ebe6
merge main into amd-staging
ronlieb 878b266
merge main into amd-staging (#598)
ronlieb 62e1f52
merge main into amd-staging
z1-cciauto 6019e13
merge main into amd-staging (#599)
ronlieb 4c07102
merge main into amd-staging
z1-cciauto 3ba0a93
Revert "DAG: Allow select ptr combine for non-0 address spaces (#1679…
ronlieb b5e0dd6
reverted_patches.txt: select ptr
ronlieb 7d7dd41
merge main into amd-staging (#601)
z1-cciauto 130e00f
[Offload] Add device info for shared memory (#167817) (#602)
ronlieb f612d34
merge main into amd-staging
z1-cciauto d56ec74
merge main into amd-staging (#603)
z1-cciauto e54b9c0
merge main into amd-staging
ronlieb 0c89c0a
Cleanup revert_patches.txt : select
ronlieb 967d5ce
merge main into amd-staging (#604)
z1-cciauto b849e7c
merge main into amd-staging
z1-cciauto 524efbe
merge main into amd-staging (#605)
z1-cciauto cbdd9d1
merge main into amd-staging
z1-cciauto 8ad44f5
merge main into amd-staging (#607)
z1-cciauto 5a5462d
merge main into amd-staging
z1-cciauto 7d6a25a
merge main into amd-staging (#608)
ronlieb fc0b487
merge main into amd-staging
ronlieb 1213a71
Merge llvm/main into amd-debug
sstipano d6c2e8c
merge main into amd-staging (#611)
z1-cciauto ecb66f0
merge main into amd-staging
z1-cciauto 3f0aa69
merge main into amd-staging (#612)
ronlieb 81da1c3
merge main into amd-staging
z1-cciauto e9b3d79
merge main into amd-staging (#615)
z1-cciauto 2ee4a8f
merge main into amd-staging
z1-cciauto 1096c52
merge main into amd-staging (#616)
ronlieb 330326a
[runtimes] - Ensure device-libs installs into proper libdir (#618)
estewart08 ba0964a
merge main into amd-staging
ronlieb 9cc0238
merge main into amd-staging (#621)
z1-cciauto a9c2a06
[gpurun] force numatcl with rocr_vis_dev or mpi rank (#619)
ronlieb 4a24947
merge main into amd-staging
ronlieb 13ceadd
[hipcc] Define Debian doc source path relative to utils.cmake
frederik-h a0b005f
[hipcc] Define var for Debian build directory
frederik-h 3d3844f
Revert "[AMDGPU] Adding instruction specific features (#167809)"
ronlieb d59d11f
merge main into amd-staging
ronlieb 9ced405
[Comgr] Add missing clangOptions
jmmartinez bcea769
merge main into amd-staging (#622)
z1-cciauto 94a627f
merge main into amd-staging (#624)
z1-cciauto 1de58bd
[gpurun] add numactl check and fallback for -nm and -nr (#625)
ronlieb ecd0f61
merge main into amd-staging
ronlieb 304af5d
merge main into amd-staging (#628)
z1-cciauto 6a3d6db
merge main into amd-staging
z1-cciauto 0d7728c
merge main into amd-staging (#629)
z1-cciauto 13a0614
merge main into amd-staging
ronlieb f098205
Merge branch 'amd-debug' into amd-staging
slinder1 f963e75
merge main into amd-staging (#631)
z1-cciauto 09a4d41
[Comgr] Add missing clangOptions to Comgr link libraries (#626)
jmmartinez 560a61e
[Comgr] Use CLANG_LINK_CLANG_DYLIB instead of checking if the clangFr…
jmmartinez af15ace
[gpurun] enable GPURUN_BYPASS after argument processing (#630)
ronlieb ec75711
merge main into amd-staging
ronlieb 913ae1c
merge main into amd-staging (#633)
z1-cciauto 16790ef
merge main into amd-staging
ronlieb 09e5dc6
Resolve conflicts
slinder1 728a6c9
Introduce DwarfUnit::addBlock helper method (#168446)
tromey 4f5eaa1
merge main into amd-staging (#635)
z1-cciauto 5cf3ecb
regen CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
ronlieb 3c34d45
merge main into amd-staging
z1-cciauto 7b7ff69
[Flang] Support generic execution of parallel regions (#414)
skatrak 4b7ddf4
merge main into amd-staging (#637)
z1-cciauto 6541ffb
Merge branch 'amd-debug' into amd-staging (#636)
ronlieb 51299f0
merge main into amd-staging
ronlieb 0576f51
merge main into amd-staging (#640)
z1-cciauto 4b33e3d
[Comgr] Use CLANG_LINK_CLANG_DYLIB instead of checking if the clangFr…
jmmartinez e5d02dd
[CK][AMDGPU] Verify dominance when rewriting spills to registers (#641)
ronlieb c302141
merge main into amd-staging
ronlieb 8ea233f
merge main into amd-staging (#642)
z1-cciauto 9405055
merge main into amd-staging
ronlieb 8bd72cb
Revert "[OpenMP] Fix firstprivate pointer handling in target regions …
ronlieb 0410a9a
update reverted_patches.txt
ronlieb 4c5d7dd
merge main into amd-staging (#645)
z1-cciauto fe70b8a
Manual update of LLVM_MAIN_REVISION to 560248 (#648)
skganesan008 921a2e9
merge main into amd-staging
z1-cciauto dc2c396
merge main into amd-staging (#649)
z1-cciauto bc15782
Reland add features: cube-insts, lerp-inst, qsad-insts, sad-insts (#651)
ronlieb 400b4a2
merge main into amd-staging
ronlieb c23228a
merge main into amd-staging (#656)
z1-cciauto 71cc541
merge main into amd-staging
z1-cciauto b44c3f1
ReGen 4 lits local-atomicrmw-{fadd,fsub,fmin,fmax
ronlieb 43c0d1c
merge main into amd-staging (#657)
ronlieb 744a94f
merge main into amd-staging
ronlieb 28bd166
merge main into amd-staging (#658)
z1-cciauto 1673c52
merge main into amd-staging
ronlieb 0b9b0b4
[comgr] GetResourcesPath changes
ronlieb 9664939
merge main into amd-staging (#660)
z1-cciauto 446b06e
Revert "Re-land [Transform][LoadStoreVectorizer] allow redundant in C…
ronlieb bbe5f80
merge main into amd-staging
ronlieb dd192b6
Update revert_patches.txt : breaks CK
ronlieb 5b91392
merge main into amd-staging (#663)
z1-cciauto 669e22f
Revert "Re-land [Transform][LoadStoreVectorizer] allow redundant in C…
ronlieb 5adce54
merge main into amd-staging
z1-cciauto 1f35e37
merge main into amd-staging (#665)
z1-cciauto c08f05e
merge main into amd-staging
ronlieb bf7d1c8
merge main into amd-staging
z1-cciauto c186543
[MLIR][OpenMP] Introduce overlapped record type map support
agozillon 1c2677f
[hipcc] Define Debian doc source path relative to utils.cmake (#623)
frederik-h c622647
[Flang][OpenMP][MLIR] Initial declare target to for variables impleme…
agozillon 32c812f
merge main into amd-staging (#666)
z1-cciauto 41f7de0
merge main into amd-staging (#667)
z1-cciauto c2de9b2
merge main into amd-staging
ronlieb 5d7c0e4
[Flang][OpenMP] Guideline merge for PR #119589 and PR #119588 (#669)
ronlieb b92350c
merge main into amd-staging (#671)
z1-cciauto 12e582c
merge main into amd-staging
ronlieb 0443630
merge main into amd-staging
ronlieb e512b81
merge main into amd-staging
ronlieb aa00a52
merge main into amd-staging (#674)
z1-cciauto 835ea63
merge main into amd-staging (#675)
z1-cciauto 60e4357
merge main into amd-staging
ronlieb f008f25
xfail: flang/test/Lower/OpenMP/reduction_var_map.f90
ronlieb b5e847e
merge main into amd-staging (#676)
z1-cciauto 1758b4f
merge main into amd-staging
ronlieb 823e008
merge main into amd-staging (#681)
z1-cciauto 3d0743b
merge main into amd-staging
z1-cciauto 4b512b4
Regen llvm/test/Transforms/InstCombine/cast-mul-select.ll
ronlieb 1423ed0
[MC] Use a variant to hold MCCFIInstruction state (NFC) (#164720) (#682)
slinder1 cef1d4a
merge main into amd-staging (#685)
z1-cciauto 8050157
[OpenMP] Added missing MPI include file in Emissary source. (#684)
dhruvachak c8058ff
merge main into amd-staging
ronlieb 473d7ea
merge main into amd-staging (#686)
z1-cciauto b2638a0
merge main into amd-staging
z1-cciauto 253c189
merge main into amd-staging (#687)
z1-cciauto 304346f
merge main into amd-staging
z1-cciauto 3529145
merge main into amd-staging (#689)
z1-cciauto f8bba3b
merge main into amd-staging
z1-cciauto ccb14ba
comgr remove Driver:: from GetResourcesPath
ronlieb 1acee9c
merge main into amd-staging (#692)
z1-cciauto dbb3a6b
merge main into amd-staging
z1-cciauto a470909
merge main into amd-staging (#695)
z1-cciauto 684f140
merge main into amd-staging
ronlieb 66296d9
Re-land [Transform][LoadStoreVectorizer] allow redundant in Chain (#1…
cmc-rep fd0d595
[LoadStoreVectorizer] Fix one-element vector handling (#169671)
cmc-rep b40818f
update revert_patches.txt
ronlieb b9c347b
merge main into amd-staging (#696)
z1-cciauto 1a77aed
merge main into amd-staging (#697)
ronlieb 120deff
merge main into amd-staging
z1-cciauto 2520866
merge main into amd-staging (#699)
z1-cciauto 8ccc861
merge main into amd-staging
ronlieb b617908
merge main into amd-staging (#701)
ronlieb 9a65678
merge main into amd-staging
z1-cciauto 2ae3ec9
merge main into amd-staging (#703)
z1-cciauto a1826a7
merge main into amd-staging
z1-cciauto 4bdd172
merge main into amd-staging (#706)
z1-cciauto 08ba4bb
merge main into amd-staging
z1-cciauto 95b39a9
merge main into amd-staging (#709)
ronlieb c3a280c
merge main into amd-staging
z1-cciauto ea568b2
merge main into amd-staging (#711)
z1-cciauto 774ed58
merge main into amd-staging
ronlieb 58bfee6
merge main into amd-staging (#716)
z1-cciauto 0930bc7
merge main into amd-staging
z1-cciauto 54ffaf5
merge main into amd-staging (#717)
z1-cciauto 08b4a7a
merge main into amd-staging
z1-cciauto 4ee8045
merge main into amd-staging (#718)
z1-cciauto 6db5de0
merge main into amd-staging
z1-cciauto f5d93b8
merge main into amd-staging (#719)
z1-cciauto 3c27360
merge main into amd-staging
z1-cciauto bea23cf
merge main into amd-staging (#720)
z1-cciauto fc97e06
merge main into amd-staging
z1-cciauto f96f35f
merge main into amd-staging (#723)
z1-cciauto efdebf8
merge main into amd-staging
ronlieb 8f6a28b
merge main into amd-staging (#724)
z1-cciauto 752678f
[AMDGPU] Fix AGPR_32 reg assign for mfma scale ops
hjagasiaAMD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| resources: | ||
| repositories: | ||
| - repository: pipelines_repo | ||
| type: github | ||
| endpoint: ROCm | ||
| name: ROCm/ROCm | ||
|
|
||
| variables: | ||
| - group: common | ||
| - template: /.azuredevops/variables-global.yml@pipelines_repo | ||
|
|
||
| trigger: | ||
| batch: true | ||
| branches: | ||
| include: | ||
| - amd-staging | ||
| - amd-mainline-open | ||
| paths: | ||
| exclude: | ||
| - .ci | ||
| - .github | ||
| - '*.md' | ||
| - '**/*.md' | ||
| - LICENSE.TXT | ||
|
|
||
| pr: none | ||
|
|
||
| jobs: | ||
| - template: ${{ variables.CI_COMPONENT_PATH }}/llvm-project.yml@pipelines_repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "monthly" | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" | ||
| - package-ecosystem: "pip" | ||
| directory: "/llvm/docs" | ||
| schedule: | ||
| interval: "monthly" | ||
| groups: | ||
| llvm-docs-requirements: | ||
| patterns: | ||
| - "*" | ||
| - package-ecosystem: "pip" # See documentation for possible values | ||
| directory: "/amd/hipcc/docs/sphinx" # Location of package manifests | ||
| open-pull-requests-limit: 10 | ||
| schedule: | ||
| interval: "daily" | ||
| labels: | ||
| - "documentation" | ||
| reviewers: | ||
| - "samjwu" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| name: Compiler CI PSDB trigger on amd-staging branch | ||
|
|
||
| # Controls when the workflow will run | ||
| on: | ||
| pull_request: | ||
| branches: [amd-staging] | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
| workflow_dispatch: | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel, below is a single job called invoke jenkins jobs | ||
| jobs: | ||
| # This workflow contains a single job called "invoke_jenkins_PSDB" | ||
| invoke_jenkins_PSDB: | ||
| if: github.event.pull_request.draft == false | ||
| runs-on: | ||
| group: compiler-generic-runners | ||
| env: | ||
| svc_acc_org_secret: ${{secrets.CI_GITHUB_TOKEN}} | ||
| input_sha: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }} | ||
| input_pr_num: ${{ github.event.pull_request.number != '' && github.event.pull_request.number || 0 }} | ||
| input_pr_url: ${{ github.event.pull_request.html_url != '' && github.event.pull_request.html_url || '' }} | ||
| input_pr_title: ${{ github.event.pull_request.title != '' && github.event.pull_request.title || '' }} | ||
| # set the pipeline name here based on branch name | ||
| pipeline_name: ${{secrets.CI_JENKINS_JOB_NAME}} | ||
| JENKINS_URL: ${{secrets.CI_JENKINS_URL}} | ||
| CONTAINER_IMAGE: ${{ secrets.JENKINS_TRIGGER_DOCKER_IMAGE }} | ||
|
|
||
| # 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 | ||
| - name: Set environment variable for container image | ||
| run: | | ||
| echo "CONTAINER_IMAGE=${{ secrets.JENKINS_TRIGGER_DOCKER_IMAGE }}" >> $GITHUB_ENV | ||
| echo "CONTAINER_NAME=my_container_${{ github.run_id }}" >> $GITHUB_ENV | ||
|
|
||
|
|
||
| - name: Pull container image | ||
| run: docker pull "${{env.CONTAINER_IMAGE}}" | ||
|
|
||
|
|
||
| - name: Run container | ||
| run: | | ||
| docker run -d --name "${{env.CONTAINER_NAME}}" $CONTAINER_IMAGE sleep infinity | ||
| #docker exec "${{env.CONTAINER_NAME}}" /bin/bash -c "git clone ${{secrets.CI_UTILS_REPO}} ." | ||
| docker exec "${{env.CONTAINER_NAME}}" /bin/bash -c "echo 'Running commands inside the container'" | ||
|
|
||
| - name: Escape pull request title | ||
| run: | | ||
| import json | ||
| import os | ||
| import shlex | ||
| with open('${{ github.event_path }}') as fh: | ||
| event = json.load(fh) | ||
| escaped = event['pull_request']['title'] | ||
| with open(os.environ['GITHUB_ENV'], 'a') as fh: | ||
| print(f'PR_TITLE={escaped}', file=fh) | ||
| shell: python3 {0} | ||
|
|
||
| - name: Run Jenkins Cancel Script | ||
| env: | ||
| JENKINS_URL: ${{secrets.CI_JENKINS_URL}} | ||
| JENKINS_USER: ${{secrets.CI_JENKINS_USER}} | ||
| JENKINS_API_TOKEN: ${{secrets.CI_JENKINS_TOKEN}} | ||
| JENKINS_JOB_NAME: ${{secrets.CI_JENKINS_JOB_NAME}} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| COMMIT_HASH: ${{ github.event.after }} | ||
| run: | | ||
| docker exec -e JENKINS_JOB_NAME=${{secrets.CI_JENKINS_JOB_NAME}} -e PR_NUMBER=${{ github.event.pull_request.number }} -e COMMIT_HASH=${{ github.event.after }} -e JENKINS_URL=${{secrets.CI_JENKINS_URL}} -e JENKINS_USER=${{secrets.CI_JENKINS_USER}} -e JENKINS_API_TOKEN=${{secrets.CI_JENKINS_TOKEN}} "${{env.CONTAINER_NAME}}" /bin/bash -c "PYTHONHTTPSVERIFY=0 python3 cancel_previous_build.py" | ||
|
|
||
|
|
||
| # Runs a set of commands using the runners shell | ||
| - name: Getting Event Details | ||
| run: | | ||
| echo $(pwd) | ||
| echo $GITHUB_ENV | ||
| echo $GITHUB_REPOSITORY | ||
| echo $GITHUB_SERVER_URL | ||
| echo "GITHUB_SHA is: $GITHUB_SHA" | ||
| echo "GITHUB_WORKFLOW_SHA is: $GITHUB_WORKFLOW_SHA" | ||
| echo "GITHUB_BASE_REF is: $GITHUB_BASE_REF" | ||
| echo "GITHUB_REF_NAME is: $GITHUB_REF_NAME" | ||
| echo "github.event.pull_request.id is: ${{github.event.pull_request.id}}" | ||
| echo "github.event.pull_request.html_url is: ${{github.event.pull_request.html_url}}" | ||
| echo "github.event.pull_request.number is: ${{github.event.pull_request.number}}" | ||
| echo "github.event.pull_request.url is: ${{github.event.pull_request.url}}" | ||
| echo "github.event.pull_request.issue_url is: ${{github.event.pull_request.issue_url}}" | ||
| echo "github.event.pull_request.head.sha is: ${{github.event.pull_request.head.sha}}" | ||
| echo "github.event.pull_request.base.ref is: ${{github.event.pull_request.base.ref}}" | ||
| echo "github.event.pull_request.merge_commit_sha is: ${{github.event.pull_request.merge_commit_sha}}" | ||
| echo "github.event.pull_request is: ${{github.event.pull_request}}" | ||
|
|
||
|
|
||
| - name: Trigger Jenkins Pipeline | ||
| if: steps.check_changes.outcome != 'failure' | ||
| run: | | ||
| echo "--Running jenkins_api.py with input sha - $input_sha for pull request - $input_pr_url" | ||
| docker exec -e GITHUB_REPOSITORY="$GITHUB_REPOSITORY" -e svc_acc_org_secret="$svc_acc_org_secret" -e input_sha="$input_sha" -e input_pr_url="$input_pr_url" -e pipeline_name="$pipeline_name" \ | ||
| -e input_pr_num="$input_pr_num" -e PR_TITLE="$PR_TITLE" -e JENKINS_URL="$JENKINS_URL" -e GITHUB_PAT="$svc_acc_org_secret" "${{env.CONTAINER_NAME}}" \ | ||
| /bin/bash -c 'echo \"PR NUM: "$input_pr_num"\" && PYTHONHTTPSVERIFY=0 python3 jenkins_api.py -s \"${JENKINS_URL}\" -jn "$pipeline_name" -ghr "$GITHUB_REPOSITORY" -ghsha "$input_sha" -ghprn "$input_pr_num" -ghpru "$input_pr_url" -ghprt "$PR_TITLE" -ghpat="$svc_acc_org_secret"' | ||
|
|
||
| - name: Stop and remove container | ||
| if: always() | ||
| run: | | ||
| docker stop "${{env.CONTAINER_NAME}}" | ||
| docker rm "${{env.CONTAINER_NAME}}" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| name: Trigger amd-debug Buildbot Build | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: [amd-debug] | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
|
|
||
|
|
||
| jobs: | ||
| trigger-build: | ||
| if: github.event.pull_request.draft == false | ||
| runs-on: | ||
| group: compiler-generic-runners | ||
| env: | ||
| PR_SHA: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number != '' && github.event.pull_request.number || 0 }} | ||
| PR_URL: ${{ github.event.pull_request.html_url != '' && github.event.pull_request.html_url || '' }} | ||
| PR_TITLE: ${{ github.event.pull_request.title != '' && github.event.pull_request.title || '' }} | ||
| BASE_BRANCH: ${{ github.event.pull_request.base.ref != '' && github.event.pull_request.base.ref || '' }} | ||
| GITHUB_TOKEN: ${{secrets.CI_GITHUB_TOKEN}} | ||
|
|
||
| steps: | ||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - name: Set environment variable for container image | ||
| run: | | ||
| echo "CONTAINER_IMAGE=${{ secrets.BUILDBOT_DOCKER_IMAGE }}" >> $GITHUB_ENV | ||
| echo "CONTAINER_NAME=my_container_${{ github.run_id }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Pull container image | ||
| run: docker pull "${{env.CONTAINER_IMAGE}}" | ||
|
|
||
| - name: Run container | ||
| run: | | ||
| docker run -d --name "${{env.CONTAINER_NAME}}" $CONTAINER_IMAGE sleep infinity | ||
| docker exec "${{env.CONTAINER_NAME}}" /bin/bash -c "echo 'Running commands inside the container'" | ||
|
|
||
| - name: Escape pull request title | ||
| run: | | ||
| import json | ||
| import os | ||
| import shlex | ||
| with open('${{ github.event_path }}') as fh: | ||
| event = json.load(fh) | ||
| escaped = event['pull_request']['title'] | ||
| with open(os.environ['GITHUB_ENV'], 'a') as fh: | ||
| print(f'PR_TITLE={escaped}', file=fh) | ||
| shell: python3 {0} | ||
|
|
||
| - name: Trigger Buildbot Build | ||
| run: | | ||
| echo "${{ secrets.BUILDBOT_HOST }}:${{ secrets.BUILDBOT_WORKER_PORT }}" | ||
| docker exec -e PR_TITLE="$PR_TITLE" "${{env.CONTAINER_NAME}}" /bin/bash -c 'buildbot sendchange -W ${{ secrets.BUILDBOT_USER }} -a ${{secrets.BUILDBOT_USER}}:${{secrets.BUILDBOT_PWD}} --master="${{ secrets.BUILDBOT_HOST }}:${{ secrets.BUILDBOT_WORKER_PORT }}" --branch=${{ env.BASE_BRANCH }} --revision=${{ env.PR_SHA }} -p PR_NUMBER:${{ env.PR_NUMBER }} -p PR_TITLE:"$PR_TITLE" -p PR_URL:${{ env.PR_URL }} -p SHA:${{ env.PR_SHA }}' | ||
|
|
||
| - name: Set Initial Status to Pending | ||
| run: | | ||
| docker exec -e PR_SHA=$PR_SHA -e GITHUB_TOKEN=$GITHUB_TOKEN "${{env.CONTAINER_NAME}}" /bin/bash -c "python3 -c \" | ||
| import os | ||
| import requests | ||
| GITHUB_TOKEN = os.getenv('GITHUB_TOKEN') | ||
| TARGET_SHA = os.getenv('PR_SHA') | ||
| print('debug', TARGET_SHA) | ||
| api_url = f'https://api.github.com/repos/AMD-Lightning-Internal/llvm-project/statuses/{TARGET_SHA}' | ||
| headers = { | ||
| 'Authorization': f'token {GITHUB_TOKEN}', | ||
| 'Content-Type': 'application/json' | ||
| } | ||
| payload = { | ||
| 'state': 'pending', | ||
| 'context': 'buildbot', | ||
| 'description': 'Build is in queue' | ||
| } | ||
| response = requests.post(api_url, json=payload, headers=headers) | ||
| if response.status_code == 201: | ||
| print('Status set to pending successfully.') | ||
| else: | ||
| print(f'Failed to set status: {response.status_code} {response.text}') | ||
| \"" | ||
|
|
||
| - name: Poll Buildbot build status | ||
| run: | | ||
| python3 -c " | ||
| import os | ||
| import time | ||
| import requests | ||
| GITHUB_TOKEN = os.getenv('GITHUB_TOKEN') | ||
| BUILD_URL = 'http://${{ secrets.BUILDBOT_HOST }}:${{ secrets.BUILDBOT_MASTER_PORT }}/api/v2/builds' | ||
| TARGET_SHA = os.getenv('PR_SHA') | ||
| print('debug', TARGET_SHA) | ||
| MAX_RETRIES = 10 | ||
| RETRY_INTERVAL = 30 # seconds | ||
|
|
||
| def get_build_properties(build_id): | ||
| build_properties_url = f'http://${{ secrets.BUILDBOT_HOST }}:${{ secrets.BUILDBOT_MASTER_PORT }}/api/v2/builds/{build_id}/properties' | ||
| response = requests.get(build_properties_url, headers={'Accept': 'application/json', 'Authorization': f'token {GITHUB_TOKEN}'}) | ||
| return response.json() | ||
|
|
||
| for i in range(MAX_RETRIES): | ||
| response = requests.get(BUILD_URL, headers={'Accept': 'application/json'}) | ||
| response_json = response.json() | ||
| print(f'Attempt {i + 1}: Buildbot response:', response_json) | ||
|
|
||
| # Check if any build has the target SHA | ||
| builds = response_json.get('builds', []) | ||
| print (builds) | ||
| build_with_sha = None | ||
| for build in builds: | ||
| build_id = build['buildid'] | ||
| properties = get_build_properties(build_id) | ||
| #print(properties) | ||
| #prop = properties.get('revision', []) | ||
|
|
||
| if 'properties' in properties: | ||
| print (properties['properties']) | ||
| if 'revision' in properties['properties'][0]: | ||
| print(properties['properties'][0]) | ||
| if 'revision' in properties['properties'][0] and properties['properties'][0]['revision'] [0] == TARGET_SHA: | ||
| build_with_sha = build | ||
| break | ||
|
|
||
| if build_with_sha: | ||
| print('Build started successfully for SHA:', TARGET_SHA) | ||
| break | ||
| else: | ||
| print('Build for SHA not started yet, retrying in', RETRY_INTERVAL, 'seconds') | ||
| time.sleep(RETRY_INTERVAL) | ||
| else: | ||
| print('Build did not start for SHA:', TARGET_SHA, 'after maximum retries') | ||
| exit(1) | ||
| " | ||
|
|
||
| - name: Stop and remove container | ||
| if: always() | ||
| run: | | ||
| docker stop "${{env.CONTAINER_NAME}}" | ||
| docker rm "${{env.CONTAINER_NAME}}" | ||
|
Comment on lines
+11
to
+135
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: Trigger compute-rocm-dkms-afar job on push | ||
|
|
||
| on: | ||
| push: # This triggers the workflow on push events | ||
| branches: | ||
| - amd-staging | ||
| workflow_dispatch: # This allows manual triggering of the workflow | ||
|
|
||
| jobs: | ||
| trigger_jenkins: | ||
| runs-on: | ||
| group: compiler-generic-runners | ||
|
|
||
| steps: | ||
| - name: Set environment variable for container image | ||
| run: | | ||
| echo "CONTAINER_IMAGE=${{ secrets.JENKINS_TRIGGER_DOCKER_IMAGE }}" >> $GITHUB_ENV | ||
| echo "CONTAINER_NAME=my_container_${{ github.run_id }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Pull container image | ||
| run: docker pull "${{env.CONTAINER_IMAGE}}" | ||
|
|
||
| - name: Run container | ||
| run: | | ||
| docker run -d --name "${{env.CONTAINER_NAME}}" $CONTAINER_IMAGE sleep infinity | ||
| docker exec "${{env.CONTAINER_NAME}}" /bin/bash -c "echo 'Running commands inside the container'" | ||
|
|
||
| - name: Trigger compute-rocm-dkms-afar job | ||
| run: | | ||
| docker exec "${{env.CONTAINER_NAME}}" /bin/bash -c "python -c \" | ||
| import requests | ||
| import time | ||
| from requests.auth import HTTPBasicAuth | ||
|
|
||
| jenkins_user = '${{ secrets.CI_JENKINS_USER }}' | ||
| jenkins_token = '${{ secrets.ROCM_JENKINS_CI_TOKEN }}' | ||
| jenkins_host = '${{ secrets.ROCM_JENKINS_HOST }}' | ||
| jenkins_job = '${{ secrets.ROCM_JENKINS_OSDB_JOB }}' | ||
|
|
||
| jenkins_url = f'{jenkins_host}/job/{jenkins_job}/buildWithParameters' | ||
|
|
||
| response = requests.post(jenkins_url, auth=HTTPBasicAuth(jenkins_user, jenkins_token)) | ||
|
|
||
| if response.status_code == 201: | ||
| print('Jenkins job triggered successfully!') | ||
| queue_url = response.headers.get('Location') | ||
| if queue_url: | ||
| print(f'Queue URL: {queue_url}') | ||
| print(f'Getting build URL(max 5 attempts with 10seconds interval)...') | ||
| # Poll the queue item to get the build number, limited to 5 attempts | ||
| max_attempts = 5 | ||
| attempts = 0 | ||
| while attempts < max_attempts: | ||
| queue_response = requests.get(queue_url + 'api/json', auth=HTTPBasicAuth(jenkins_user, jenkins_token)) | ||
| queue_data = queue_response.json() | ||
| if 'executable' in queue_data: | ||
| build_number = queue_data['executable']['number'] | ||
| build_url = f'{jenkins_host}/job/{jenkins_job}/{build_number}/' | ||
| print(f'Build URL: {build_url}') | ||
| break | ||
| attempts += 1 | ||
| time.sleep(10) # Wait for 10 seconds before polling again | ||
| else: | ||
| print('Exceeded maximum attempts to get the build URL. The trigger happened, so not failing the workflow') | ||
| else: | ||
| print('Build URL not found in the response headers.') | ||
|
|
||
| elif response.status_code == 200: | ||
| print('Request was successful, but check the response content for details.') | ||
| print(response.text) | ||
| else: | ||
| print(f'Failed to trigger Jenkins job. Status code: {response.status_code}') | ||
| \"" | ||
|
|
||
| - name: Stop and remove container | ||
| if: always() | ||
| run: | | ||
| docker stop "${{env.CONTAINER_NAME}}" | ||
| docker rm "${{env.CONTAINER_NAME}}" | ||
|
Comment on lines
+11
to
+79
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium