-
Notifications
You must be signed in to change notification settings - Fork 34
86 lines (83 loc) · 2.47 KB
/
continuous_integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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 .