Skip to content

Commit

Permalink
Update utest and ci (#603)
Browse files Browse the repository at this point in the history
* Update utest script: Handle global, regional, and coupled tests
* Update CI workflow: Instead of saving the docker image (~730 MB) as an artifact, only save the executable (~77 MB)
* Add regional thread and decomposition tests to CI
* Add coupled restart test to CI
* Fix to run threads on its own core in ec2 for thread tests
* Use a slightly different ubuntu-hpc image to match the uid and gid within ec2 instances
* Exclude L127 control test temporarily
  • Loading branch information
MinsukJi-NOAA authored Jun 3, 2021
1 parent b474679 commit 2c882f0
Show file tree
Hide file tree
Showing 28 changed files with 2,418 additions and 2,081 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,10 @@ jobs:
sudo docker rmi $(sudo docker image ls | grep -E -m1 '<none>' | awk '{ print $3 }')
sudo docker rmi $(sudo docker image ls | awk '/ubuntu-hpc/ { print $3 }')
- name: Prepare artifacts
run: |
cd tests/ci
sudo docker save ${{ needs.setup.outputs.img }} \
| gzip >${{ needs.setup.outputs.img }}.tar.gz
tar cvjf artifact.tar.bz2 ${{ needs.setup.outputs.img }}.tar.gz ci.sh ci.test
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.bld_set }}.artifact.tar.bz2
path: tests/ci/artifact.tar.bz2
name: ${{ matrix.bld_set }}.artifact
path: ~/fv3.tar.gz


wait:
Expand Down Expand Up @@ -162,24 +155,24 @@ jobs:
steps:
- name: Clean up in case of left-over files
run: |
rm -f artifact.tar.bz2 ${{ needs.setup.outputs.img }}.tar.gz
rm -rf ${{ github.workspace }} && mkdir -p ${{ github.workspace }}
docker ps -a --filter "name=my-container" | grep my-container >/dev/null 2>&1 \
&& docker rm my-container >/dev/null 2>&1 && d=$? || d=$?
docker image ls | grep ${{ needs.setup.outputs.img }} >/dev/null 2>&1 \
&& docker rmi ${{ needs.setup.outputs.img }} >/dev/null 2>&1 && d=$? || d=$?
- uses: actions/download-artifact@v2
- uses: actions/checkout@v2
with:
name: ${{ matrix.artifact }}.artifact.tar.bz2
submodules: recursive

- name: Prepare artifacts
run: |
tar xvjf artifact.tar.bz2 && rm -f artifact.tar.bz2
docker load --input ${{ needs.setup.outputs.img }}.tar.gz \
&& rm -f ${{ needs.setup.outputs.img }}.tar.gz
- uses: actions/download-artifact@v2
with:
name: ${{ matrix.artifact }}.artifact
path: ${{ github.workspace}}/tests

- name: Run utest
run: ./ci.sh -n ${{ matrix.name }} -r ${{ matrix.case }}
run: |
cd ${{ github.workspace }}/tests && tar -xvzf fv3.tar.gz && rm -f fv3.tar.gz
cd ${{ github.workspace }}/tests/ci
./ci.sh -n ${{ matrix.name }} -r ${{ matrix.case }}
- uses: actions/upload-artifact@v2
if: ${{ always() }}
Expand All @@ -190,8 +183,5 @@ jobs:
- name: Clean up
if: ${{ always() }}
run: |
rm -f ci.sh ci.test
docker stop my-container && docker rm my-container \
&& docker rmi ${{ needs.setup.outputs.img }}:latest
docker stop my-container && docker rm my-container
docker volume rm DataVolume
rm -f memory_stat
Loading

0 comments on commit 2c882f0

Please sign in to comment.