reorganizes calls to debugger to get better info (making sure all are… #1292
Workflow file for this run
This file contains 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
name: ATS CI | |
on: | |
workflow_dispatch: | |
branches: | |
- '**' | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- ats-* | |
jobs: | |
build_test: | |
runs-on: ubuntu-latest | |
name: Build and test with Docker | |
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: Does Amanzi branch of the same name exist? | |
id: amanzi_branch | |
run: | | |
echo "AMANZI_BRANCH=$(git ls-remote --heads origin ${GITHUB_REF_NAME} | sed 's/.*refs\/heads\///')" >> $GITHUB_ENV | |
- name: If so, checkout Amanzi to get the right TPLs version | |
id: amanzi_branch_checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: amanzi/amanzi | |
ref: ${{env.AMANZI_BRANCH}} | |
submodules: recursive | |
- name: Does ats-regression-tests branch of the same name exist? | |
id: ats_tests_branch | |
working-directory: src/physics/ats/testing/ats-regression-tests | |
run: | | |
echo "ATS_TESTS_BRANCH=$(git ls-remote --heads origin ${GITHUB_REF_NAME} | sed 's/.*refs\/heads\///')" >> $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: Get TPLs version | |
id: version | |
working-directory: Docker | |
run: | | |
echo "AMANZI_TPLS_VER=$(./get_tpls_version.sh)" >> $GITHUB_ENV | |
- name: Print out environment | |
run: | | |
echo "Amanzi branch = ${{env.AMANZI_BRANCH}}"; | |
echo "ATS branch = ${{env.ATS_BRANCH}}"; | |
echo "ats-regression-tests branch = ${{env.ATS_TESTS_BRANCH}}"; | |
echo "Tag reference = ${{env.ATS_BRANCH_TAG}}" | |
echo "TPLs version = ${{env.AMANZI_TPLS_VER}}" | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{secrets.DOCKERHUB_PASSWORD}} | |
- name: Docker build | |
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 . | |
- name: Docker push | |
working-directory: Docker | |
run: | |
docker push ${{secrets.DOCKERHUB_USERNAME}}/ats:${{env.ATS_BRANCH_TAG}}-latest | |
- 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" | |