-
Notifications
You must be signed in to change notification settings - Fork 16
107 lines (87 loc) · 3.37 KB
/
ci-build.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Build and Test Images
on:
push:
branches:
- '**'
env:
REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
jobs:
build-and-test-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./scenarios/covid/ci/Dockerfile.index
name: preprocess-index
context: ./scenarios/covid/src
buildargs: |
- dockerfile: ./scenarios/covid/ci/Dockerfile.icmr
name: preprocess-icmr
context: ./scenarios/covid/src
buildargs: |
- dockerfile: ./scenarios/covid/ci/Dockerfile.cowin
name: preprocess-cowin
context: ./scenarios/covid/src
buildargs: |
- dockerfile: ./scenarios/covid/ci/Dockerfile.modelsave
name: ccr-model-save
context: ./scenarios/covid/src
buildargs: |
- dockerfile: ./ci/Dockerfile.encfs
name: depa-training-encfs
context: ./
buildargs: |
- dockerfile: ./ci/Dockerfile.train
name: depa-training
context: ./src
buildargs: |
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Update submodules
run: git submodule update --init --recursive
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.19.x'
- name: Install jq
run: sudo apt install -y jq
- name: Install make
run: sudo apt install make
- name: Install wheel
run: pip install wheel
- name: Build encrypted filesystem artifacts
run: cd ${{ github.workspace }}/external/confidential-sidecar-containers && ./buildall.sh
- name: Build contract ledger client library
run: cd ${{ github.workspace }}/external/contract-ledger/pyscitt && python3 setup.py bdist_wheel
- name: Build container images
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
build-args: ${{ matrix.buildargs }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build contract service container
run: cd ${{ github.workspace }}/external/contract-ledger && ./docker/build.sh
- name: Run pre-processing
run: cd ./scenarios/covid/deployment/docker && ./preprocess.sh
- name: Run model saving
run: cd ./scenarios/covid/deployment/docker && ./save-model.sh
- name: Run training
run: cd ./scenarios/covid/deployment/docker && ./train.sh
~