-
Notifications
You must be signed in to change notification settings - Fork 68
56 lines (49 loc) · 1.82 KB
/
ci-build.yml
File metadata and controls
56 lines (49 loc) · 1.82 KB
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
name: CI Build
on: [pull_request]
jobs:
ROOT5:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10000000
- name: Build with Docker
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=ghcr.io/star-bnl/star-sw-root5-base@sha256:4bed8a8b729fa9e6c8e92b2bdecd6b73869e67a07bfbde969936f921123d4c3e
push: false
tags: ghcr.io/star-bnl/star-sw-root5-build
file: docker/Dockerfile.root5
outputs: type=docker,dest=/tmp/star-sw-root5-build.tar
- name: Save built image for test jobs
uses: actions/upload-artifact@v2
with:
name: star-sw-root5-build
path: /tmp/star-sw-root5-build.tar
ROOT5_test_setup:
runs-on: ubuntu-latest
needs: ROOT5
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- run: echo "::set-output name=matrix::" $(cat tests/joblist_ci.json)
id: set-matrix
ROOT5_test:
runs-on: ubuntu-latest
needs: ROOT5_test_setup
strategy:
matrix:
test_id: ${{ fromJSON(needs.ROOT5_test_setup.outputs.matrix) }}
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: star-sw-root5-build
path: /tmp
- run: docker load --input /tmp/star-sw-root5-build.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v2
- run: |
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-root5-build star-sw/tests/executest.py -c ${{ matrix.test_id }})
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-root5-build sh -c "$TEST_CMD"