Skip to content

Commit

Permalink
modify ctest to print info on test failures
Browse files Browse the repository at this point in the history
split test suite to shave a few minutes from CI
  • Loading branch information
rfiorella authored and ecoon committed Oct 8, 2024
1 parent c1abf2a commit 74d4e2e
Showing 1 changed file with 51 additions and 6 deletions.
57 changes: 51 additions & 6 deletions .github/workflows/ats-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:
- ats-*

jobs:
build_test:
build:
runs-on: ubuntu-latest
name: Build and test with Docker
name: Build Docker
steps:
- name: Check out the Amanzi repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
echo "ATS_BRANCH_TAG=$(echo ${{env.ATS_BRANCH}} | sed -e 's/\//--/g')" >> $GITHUB_ENV
- name: Get TPLs version
id: version
id: version
working-directory: Docker
run: |
echo "AMANZI_TPLS_VER=$(./get_tpls_version.sh)" >> $GITHUB_ENV
Expand All @@ -67,14 +67,59 @@ jobs:
id: docker
working-directory: Docker
run:
docker build --build-arg amanzi_branch=${{env.AMANZI_BRANCH}} --build-arg ats_branch=${{env.ATS_BRANCH}} --build-arg ats_tests_branch=${{env.ATS_TESTS_BRANCH}} --build-arg amanzi_tpls_ver=${{env.AMANZI_TPLS_VER}} -t metsi/ats:${{env.ATS_BRANCH_TAG}}-latest -f Dockerfile-ATS-build .
docker build --build-arg amanzi_branch=${{env.AMANZI_BRANCH}} --build-arg ats_branch=${{env.ATS_BRANCH}} --build-arg ats_tests_branch=${{env.ATS_TESTS_BRANCH}} --build-arg amanzi_tpls_ver=${{env.AMANZI_TPLS_VER}} -t metsi/ats:${{env.ATS_BRANCH_TAG}}-latest -f Dockerfile-ATS-build .
- name: Docker push
working-directory: Docker
run:
docker push ${{secrets.DOCKERHUB_USERNAME}}/ats:${{env.ATS_BRANCH_TAG}}-latest
serial-reg15-tests:
runs-on: ubuntu-latest
name: serial and regression 1-5 series tests
needs: build
steps:
- name: Check out the Amanzi repo
uses: actions/checkout@v4
with:
repository: amanzi/amanzi
ref: master
submodules: recursive
- name: Extract the ATS branch name
id: branch
working-directory: Docker
run: |
echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV
- name: Filter the branch name to generate a tag for Docker
id: tag
run: |
echo "ATS_BRANCH_TAG=$(echo ${{env.ATS_BRANCH}} | sed -e 's/\//--/g')" >> $GITHUB_ENV
- name: Run tests
id: tests
working-directory: Docker
run:
docker run --rm ${{secrets.DOCKERHUB_USERNAME}}/ats:${{env.ATS_BRANCH_TAG}}-latest /bin/bash -c "cd ~/amanzi_builddir/ats; ctest"

docker run --rm ${{secrets.DOCKERHUB_USERNAME}}/ats:${{env.ATS_BRANCH_TAG}}-latest /bin/bash -c "cd ~/amanzi_builddir/ats; ctest --output-on-failure -LE PARALLEL -E 'ats_regression_test-[1-9][0-9]|ats_regression_test-0[6-9]'"
parallel-tests:
runs-on: ubuntu-latest
name: parallel and regression 6-10 series tests
needs: build
steps:
- name: Check out the Amanzi repo
uses: actions/checkout@v4
with:
repository: amanzi/amanzi
ref: master
submodules: recursive
- name: Extract the ATS branch name
id: branch
working-directory: Docker
run: |
echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV
- name: Filter the branch name to generate a tag for Docker
id: tag
run: |
echo "ATS_BRANCH_TAG=$(echo ${{env.ATS_BRANCH}} | sed -e 's/\//--/g')" >> $GITHUB_ENV
- name: Run tests
id: tests
working-directory: Docker
run:
docker run --rm ${{secrets.DOCKERHUB_USERNAME}}/ats:${{env.ATS_BRANCH_TAG}}-latest /bin/bash -c "cd ~/amanzi_builddir/ats; ctest --output-on-failure -L PARALLEL; ctest --output-on-failure -R 'ats_regression_test-0[6-9]|ats_regression_test-[1-9][0-9]'"

0 comments on commit 74d4e2e

Please sign in to comment.