1- stages :
2- - prepare
3- - test
4-
5- fetch-github-pr :
6- stage : prepare
7- tags : [hpsf]
8- image : ubuntu:24.04
9- variables :
10- GIT_STRATEGY : fetch
11- rules :
12- - if : ' $GITHUB_PR_NUMBER' # GITHUB_PR_NUMBER is provided by a GitHub Action
13- when : always
14- - when : never # For non-github-pr job, the script part will be skipped.
15- script :
16- - apt-get update && apt-get install -y git
17- - echo "GITHUB_PR_NUMBER=$GITHUB_PR_NUMBER"
18- - MERGE_REF="refs/pull/${GITHUB_PR_NUMBER}/merge"
19- - echo "Fetching GitHub PR merge ref $MERGE_REF"
20- - git fetch origin +${MERGE_REF}:refs/remotes/origin/pr-${GITHUB_PR_NUMBER}
21- - git checkout pr-${GITHUB_PR_NUMBER}
1+ .dependency-n-fetch-pr :
2+ stage : test
3+ before_script :
4+ - apt-get update && apt-get install -y git cmake python3 libopenmpi-dev openmpi-bin
5+ - |
6+ if [ -n "$GITHUB_PR_NUMBER" ]; then
7+ echo "GITHUB_PR_NUMBER=$GITHUB_PR_NUMBER"
8+ echo "GITHUB_MERGE_REF=$GITHUB_MERGE_REF"
9+ echo "GITHUB_TRIGGER_ACTOR=$GITHUB_TRIGGER_ACTOR"
10+ git remote add github https://github.com/amrex-codes/amrex.git
11+ git fetch --depth=1 github "${GITHUB_MERGE_REF}"
12+ git checkout FETCH_HEAD -b pr-${GITHUB_PR_NUMBER}
13+ fi
2214
2315Nvidia-H100-single-precision :
24- stage : test
16+ extends : .dependency-n-fetch-pr
2517 tags : [nvidia-h100]
2618 image : nvcr.io/nvidia/cuda:12.8.0-devel-ubuntu24.04
27- rules :
28- - when : always
29- dependencies :
30- - fetch-github-pr
3119 script :
32- - apt-get update && apt-get install -y cmake git python3 libopenmpi-dev openmpi-bin
3320 - |
3421 cmake -S . -B build \
3522 -DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -54,15 +41,10 @@ Nvidia-H100-single-precision:
5441 - ctest -j 2 --test-dir build --output-on-failure
5542
5643AMD-MI300A :
57- stage : test
44+ extends : .dependency-n-fetch-pr
5845 tags : [amd-mi300]
5946 image : rocm/dev-ubuntu-24.04:6.4.3-complete
60- rules :
61- - when : always
62- dependencies :
63- - fetch-github-pr
6447 script :
65- - apt-get update && apt-get install -y cmake git libopenmpi-dev openmpi-bin
6648 - export ROCM_PATH=/opt/rocm-6.4.3
6749 - export PATH=$ROCM_PATH/bin:$ROCM_PATH/llvm/bin:$PATH
6850 - export LD_LIBRARY_PATH=$ROCM_PATH/lib:$ROCM_PATH/lib64:$LD_LIBRARY_PATH
@@ -89,15 +71,10 @@ AMD-MI300A:
8971 - ctest -j 2 --test-dir build --output-on-failure
9072
9173# Intel-PVC:
92- # stage: test
74+ # extends: .dependency-n-fetch-pr
9375# tags: [intel-data-center-max-1100]
9476# image: intel/oneapi-basekit:2025.3.0-0-devel-ubuntu24.04
95- # rules:
96- # - when: always
97- # dependencies:
98- # - fetch-github-pr
9977# script:
100- # - apt-get update && apt-get install -y git
10178# - sycl-ls
10279# - export ONEAPI_DEVICE_SELECTOR=level_zero:gpu
10380# - |
@@ -116,3 +93,4 @@ AMD-MI300A:
11693# - cmake --build build -j 16
11794# - export AMREX_THE_ARENA_INIT_SIZE=1e9
11895# - ctest -j 4 --test-dir build --output-on-failure
96+
0 commit comments