Skip to content

Commit 19e49ec

Browse files
climbfujiMinsukJi-NOAAbinli2337BrianCurtis-NOAADeniseWorthen
authored
Rename CCPP branches from master to main, several small changes in ccpp-physics (#572)
* Change CI triggering method #558: CI runs when run-ci label is created * Remove FMS remnant from compile.sh * Move load cmake call to after hpc-stack on wcoss_dell_p3 * CDEPS updates Co-authored-by: MinsukJi-NOAA <minsuk.ji@noaa.gov> Co-authored-by: Bin Li <bin.li@noaa.gov> Co-authored-by: Brian Curtis <brian.curtis@noaa.gov> Co-authored-by: denise.worthen <Denise.Worthen@noaa.gov>
1 parent 9350745 commit 19e49ec

26 files changed

+7833
-8449
lines changed

.github/workflows/aux.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ jobs:
2626
path: ~/id_file
2727
key: helperid-${{ github.event.workflow_run.id }}
2828

29+
- name: Delete run-ci label
30+
run: |
31+
head_sha=${{ github.event.workflow_run.head_sha }}
32+
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
33+
pr_number=$(curl -sS -H $app $url/pulls \
34+
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
35+
echo "pr_number is $pr_number"
36+
curl -sS -X DELETE -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
37+
$url/issues/$pr_number/labels/run-ci
38+
2939
3040
repocheck:
3141
name: Repo check
@@ -34,28 +44,20 @@ jobs:
3444
steps:
3545
- name: Check up-to-dateness and post comment
3646
run: |
37-
if [[ ${{ github.event.workflow_run.event }} == push ]]; then
38-
echo "This is a push event. No need to check."
39-
comment=''
40-
elif [[ ${{ github.event.workflow_run.event }} == pull_request ]]; then
41-
echo "This is a pull_request event. Check."
42-
head_sha=${{ github.event.workflow_run.head_sha }}
43-
echo "head_sha is $head_sha"
44-
45-
git clone -q ${{ github.event.workflow_run.head_repository.html_url }} .
46-
git checkout -q $head_sha
47-
git submodule -q update --init --recursive
48-
49-
cd ${{ github.workspace }}/tests/ci
50-
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
51-
pr_number=$(curl -sS -H $app $url/pulls \
52-
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
53-
echo "pr_number is $pr_number"
54-
pr_uid=${{ github.event.workflow_run.head_repository.owner.login }}
55-
echo "pr_uid is $pr_uid"
56-
comment="$(./repo_check.sh $pr_uid 2>/dev/null)"
57-
echo "comment is $comment"
58-
fi
47+
head_sha=${{ github.event.workflow_run.head_sha }}
48+
git clone -q ${{ github.event.workflow_run.head_repository.html_url }} .
49+
git checkout -q $head_sha
50+
git submodule -q update --init --recursive
51+
52+
cd ${{ github.workspace }}/tests/ci
53+
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
54+
pr_number=$(curl -sS -H $app $url/pulls \
55+
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
56+
echo "pr_number is $pr_number"
57+
pr_uid=${{ github.event.workflow_run.head_repository.owner.login }}
58+
echo "pr_uid is $pr_uid"
59+
comment="$(./repo_check.sh $pr_uid 2>/dev/null)"
60+
echo "comment is $comment"
5961
6062
if [[ -n $comment ]]; then
6163
curl -sS -X POST -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
@@ -86,7 +88,7 @@ jobs:
8688
run: |
8789
cd ${{ github.workspace }}/tests/ci
8890
eval url=$base_url/${{ github.event.workflow_run.id }}/jobs
89-
b_r=$(echo -n $url | ./check_status.py build $(./setup.py no_builds))
91+
b_r=$(echo -n $url | ./check_status.py build)
9092
if [ $b_r == 'success' ]; then
9193
echo "::set-output name=check::pass"
9294
elif [ $b_r == 'failure' ]; then

.github/workflows/build_test.yml

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Pull Request Tests
22
on:
3-
push:
4-
branches: ['develop']
53
pull_request:
64
branches: ['develop']
5+
types: ['labeled']
76
env:
87
app: Accept:application/vnd.github.v3+json
98

@@ -53,41 +52,11 @@ jobs:
5352
fi
5453
5554
56-
runcheck:
57-
name: Check if run-ci is requested
58-
runs-on: ubuntu-20.04
59-
60-
outputs:
61-
cirun: ${{ steps.check.outputs.cirun }}
62-
63-
steps:
64-
- name: Check
65-
id: check
66-
run: |
67-
if [[ ${{github.event_name}} == pull_request ]]; then
68-
sha=${{github.event.pull_request.head.sha}}
69-
url=$(echo ${{github.event.pull_request.head.repo.git_commits_url}} \
70-
| sed "s:{/sha}:/$sha:")
71-
elif [[ ${{github.event_name}} == push ]]; then
72-
sha=${{github.event.after}}
73-
url=$(echo ${{github.event.repository.git_commits_url}} | sed "s:{/sha}:/$sha:")
74-
fi
75-
76-
message="$(curl -sS -H "$app" $url | jq '.message')"
77-
echo $message | grep run-ci >/dev/null 2>&1 && d=$? || d=$?
78-
if [[ $d -eq 0 ]]; then
79-
echo "::set-output name=cirun::yes"
80-
elif [[ $d -eq 1 ]]; then
81-
echo "::set-output name=cirun::no"
82-
fi
83-
printf "Commit message is %s\n" "$message"
84-
85-
8655
setup:
8756
name: Configure cases to run
88-
needs: [repocheck,runcheck]
57+
needs: [repocheck]
8958
runs-on: ubuntu-20.04
90-
if: needs.repocheck.outputs.current == 'yes' && needs.runcheck.outputs.cirun == 'yes'
59+
if: needs.repocheck.outputs.current == 'yes' && github.event.label.name == 'run-ci'
9160

9261
outputs:
9362
bld: ${{ steps.parse.outputs.bld }}
@@ -101,7 +70,7 @@ jobs:
10170
id: parse
10271
run: |
10372
cd ${{ github.workspace }}/tests/ci
104-
IFS='|'; parsed_output=( $(./setup.py cases) )
73+
IFS='|'; parsed_output=( $(./setup.py) )
10574
bld_=${parsed_output[0]}
10675
test_=${parsed_output[1]}
10776
img_=ci-test-weather
@@ -113,9 +82,7 @@ jobs:
11382
echo "build set : $bld_"
11483
echo "test set : $test_"
11584
echo "image name: $img_"
116-
11785
echo "repocheck: ${{needs.repocheck.outputs.current}}"
118-
echo "runcheck: ${{needs.runcheck.outputs.cirun}}"
11986
12087
12188
build:

FV3

Submodule FV3 updated from 0215d0f to 4279a1f

modulefiles/ufs_wcoss_dell_p3

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ module load python/3.6.3
1313

1414
module use /usrx/local/nceplibs/dev/hpc-stack/libs/hpc-stack/modulefiles/stack
1515

16-
module load cmake/3.20.0
17-
1816
module load hpc/1.1.0
17+
module load cmake/3.20.0
1918
module load hpc-ips/18.0.1.163
2019
module load hpc-impi/18.0.1
2120

modulefiles/ufs_wcoss_dell_p3_debug

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ module load python/3.6.3
1313

1414
module use /usrx/local/nceplibs/dev/hpc-stack/libs/hpc-stack/modulefiles/stack
1515

16-
module load cmake/3.20.0
17-
1816
module load hpc/1.1.0
17+
module load cmake/3.20.0
1918
module load hpc-ips/18.0.1.163
2019
module load hpc-impi/18.0.1
2120

0 commit comments

Comments
 (0)