-
Notifications
You must be signed in to change notification settings - Fork 62
140 lines (127 loc) · 5.57 KB
/
build-pull-request.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Build Pull Request
on:
pull_request:
paths-ignore:
- '.github/**'
- 'docs/**'
- '!.github/workflows/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
starenv: [root5, root6]
compiler: [gcc485, gcc11]
env:
STARENV: ${{ matrix.starenv }}-${{ matrix.compiler }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10000000
- name: Build with Docker
uses: docker/build-push-action@v3
with:
build-args: |
starenv=${{ matrix.starenv }}
compiler=${{ matrix.compiler }}
tags: ghcr.io/star-bnl/star-sw-${{ env.STARENV }}
outputs: type=docker,dest=/tmp/star-sw-${{ env.STARENV }}.tar
- name: Save built image for test jobs
uses: actions/upload-artifact@v3
with:
name: star-sw-${{ env.STARENV }}
path: /tmp/star-sw-${{ env.STARENV }}.tar
ROOT5_test:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
test_id: [10, 11, 22, 23, 24, 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, 59, 60, 76, 77, 78, 90, 91, 92, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125]
compiler: [gcc485, gcc11]
env:
STARENV: root5-${{ matrix.compiler }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: star-sw-${{ env.STARENV }}
path: /tmp
- run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v7
- run: |
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py -c ${{ matrix.test_id }})
# Workaround https://sft.its.cern.ch/jira/browse/ROOT-7660 in ROOT 5 by checking the output log
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \
sh -c "set -e; MALLOC_CHECK_=3 $TEST_CMD 2>&1 | tee log; grep 'Run completed' log"
ROOT5_test_doEvents:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
test_id: [121, 122]
compiler: [gcc485, gcc11]
env:
STARENV: root5-${{ matrix.compiler }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: star-sw-${{ env.STARENV }}
path: /tmp
- run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v7
- run: |
TEST_FILE=$(echo "$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py ${{ matrix.test_id }} -a fullpath)" | sed -E 's/\.(daq|fzd)$/.event.root/')
TEST_CMD="root4star -b -q -l 'StRoot/macros/analysis/doEvents.C(100, \"$TEST_FILE\")'"
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \
sh -c "set -e; $TEST_CMD 2>&1 | tee log; grep '<StIOMaker::Finish> IO:' log"
ROOT5_test_find_vertex:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
test_id: [102, 121, 122]
compiler: [gcc485, gcc11]
env:
STARENV: root5-${{ matrix.compiler }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: star-sw-${{ env.STARENV }}
path: /tmp
- run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v7
- run: |
TEST_FILE=$(echo "$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py ${{ matrix.test_id }} -a fullpath)" | sed -E 's/\.(daq|fzd)$/.event.root/')
TEST_CMD="root4star -b -q -l 'StRoot/macros/analysis/find_vertex.C(\"$TEST_FILE\")'"
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \
sh -c "set -e; $TEST_CMD 2>&1 | tee log; grep '<StIOMaker::Finish> StIO:' log"
ROOT6_test:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
test_id: [10, 11, 22, 23, 24, 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, 59, 60, 76, 77, 78, 90, 91, 92, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125]
env:
STARENV: root6-gcc485
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: star-sw-${{ env.STARENV }}
path: /tmp
- run: docker load --input /tmp/star-sw-${{ env.STARENV }}.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v7
- run: |
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-${{ env.STARENV }} tests/executest.py -c ${{ matrix.test_id }})
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \
sh -l -c "module unload kfparticle-1.1-root-6.16.00; MALLOC_CHECK_=3 $TEST_CMD"