update README #20
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: Docker | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
docker-build-and-test: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
name: Build and Test - ${{ matrix.dockerfile }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
dockerfile: | |
- Dockerfile | |
- Dockerfile.coverage | |
- Dockerfile.llvm | |
- Dockerfile.memcheck | |
- Dockerfile.no_json | |
- Dockerfile.nvhpc | |
- Dockerfile.openmp | |
# - Dockerfile.intel # intel image is too large for GH action | |
# - Dockerfile.mpi | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build Docker image | |
run: docker build -t micm -f docker/${{ matrix.dockerfile }} . | |
- name: Run tests in container | |
if: matrix.dockerfile != 'Dockerfile.coverage' | |
run: docker run --name test-container -t micm bash -c 'make test ARGS="--rerun-failed --output-on-failure -j8"' | |
- name: Run coverage tests in container | |
if: matrix.dockerfile == 'Dockerfile.coverage' | |
run: docker run --name test-container -t micm bash -c 'make coverage ARGS="--rerun-failed --output-on-failure -j8"' | |
- name: Copy coverage from container | |
if: matrix.dockerfile == 'Dockerfile.coverage' | |
run: docker cp test-container:build/coverage.info . | |
- name: Upload coverage report | |
if: matrix.dockerfile == 'Dockerfile.coverage' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.info |