-
Notifications
You must be signed in to change notification settings - Fork 8
104 lines (84 loc) · 2.54 KB
/
ubuntu.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build and Test
on:
push:
branches:
- pablo_dev3
- master
- magma_dev
- linfeng_dev
- geraldine_dev
- phreeqc_link
- geraldine_dev_new
- vinicius_dev
- meissam_dev_new
- hayley_dev
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: [ "Build Bionic", "Build Focal" ]
include:
- name: "Build Bionic"
release: bionic
- name: "Build Focal"
release: focal
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: docker/actions/Dockerfile.actions.${{ matrix.release }}
push: true
tags: icferst/actions:${{ matrix.release }}-${{ github.sha }}
testing:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs: build
if: always()
strategy:
fail-fast: false
matrix:
name: [ "Bionic", "Focal"]
include:
- name: "Bionic"
release: bionic
command: "make THREADS=2 serialtest-mp-xml"
output: "multiphase_test_results.xml"
- name: "Focal"
release: focal
command: "make THREADS=2 serialtest-mp-xml"
output: "multiphase_test_results.xml"
steps:
- name: ${{ matrix.name }}
run: |
chmod 777 .
docker pull icferst/actions:${{ matrix.release }}-${{ github.sha }}
docker run -v $PWD:/host icferst/actions:${{ matrix.release }}-${{ github.sha }} /bin/bash -c "${{ matrix.command }} && cp -v ICFERST/tests/${{ matrix.output }} /host/${{ matrix.release }}-${{ matrix.output}}"
- uses: actions/upload-artifact@v3
with:
path: ${{ matrix.release }}-${{ matrix.output }}
Report:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
if: always()
needs: testing
steps:
- uses: actions/download-artifact@v3
- name: ${{ matrix.name }}
uses: mikepenz/action-junit-report@v2
with:
report_paths: './artifact/*-multiphase_test_results.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: Test report ${{ matrix.release }}
fail_on_failure: true