cicd: add github configuration to run continuous integration #15
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: Continuous integration | |
on: | |
workflow_dispatch: | |
inputs: | |
pull_request: | |
branches: [ "master" ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
setup: | |
runs-on: ubuntu | |
name: Setup | |
steps: | |
- name: Checkout build environment information | |
uses: actions/checkout@v3 | |
with: | |
path: bitpit | |
sparse-checkout: | | |
environments | |
- name: Build environment | |
shell: bash | |
run: | | |
DOCKER_BUILDKIT=1 docker buildx build \ | |
--builder=container \ | |
--cache-from type=local,src=/home/bob/products/bitpit/ubuntu-cache \ | |
--cache-to type=local,dest=/home/bob/products/bitpit/ubuntu-cache \ | |
--rm \ | |
--target bitpit-environment \ | |
-f bitpit/environments/ubuntu/Dockerfile . | |
- name: Cleanup build environment information | |
run: | | |
rm -rf bitpit | |
tests: | |
runs-on: ubuntu | |
needs: setup | |
name: (${{ matrix.compiler }}) MPI ${{ matrix.mpi }} - Debug ${{ matrix.debug }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- compiler: gcc | |
mpi: ON | |
debug: ON | |
- compiler: gcc | |
mpi: ON | |
debug: OFF | |
- compiler: gcc | |
mpi: OFF | |
debug: ON | |
- compiler: gcc | |
mpi: OFF | |
debug: OFF | |
- compiler: clang | |
mpi: ON | |
debug: OFF | |
steps: | |
- name: Checkout bitpit | |
uses: actions/checkout@v3 | |
- name: Build bitpit | |
shell: bash | |
run: | | |
DOCKER_BUILDKIT=1 docker buildx build \ | |
--builder=container \ | |
--cache-from type=local,src=/home/bob/products/bitpit/ubuntu-cache \ | |
--rm \ | |
--build-arg COMPILER=${{ matrix.compiler }} \ | |
--build-arg MPI=${{ matrix.mpi }} \ | |
--build-arg DEBUG=${{ matrix.debug }} \ | |
--target bitpit-build \ | |
-f environments/ubuntu/Dockerfile . | |
- name: Run bitpit tests | |
shell: bash | |
run: | | |
DOCKER_BUILDKIT=1 docker buildx build \ | |
--builder=container \ | |
--cache-from type=local,src=/home/bob/products/bitpit/ubuntu-cache \ | |
--rm \ | |
--build-arg COMPILER=${{ matrix.compiler }} \ | |
--build-arg MPI=${{ matrix.mpi }} \ | |
--build-arg DEBUG=${{ matrix.debug }} \ | |
--target bitpit-test \ | |
-f environments/ubuntu/Dockerfile . |