-
Notifications
You must be signed in to change notification settings - Fork 51
84 lines (75 loc) · 2.6 KB
/
unittests.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
name: Unit Tests
on:
push:
branches:
- master
paths:
- "**.go"
- "**/go.mod"
- "src/**"
- "_ertgo"
pull_request:
paths:
- "**.go"
- "**/go.mod"
- "src/**"
- "_ertgo"
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/edgelesssys/edgelessrt-dev:ci
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ego
submodules: recursive
- name: Setup
run: mkdir build
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTIDY=ON ../ego
make -j`nproc`
working-directory: build
- name: Test
run: OE_SIMULATION=1 ctest --output-on-failure
working-directory: build
- name: CPack
run: cpack -G DEB
working-directory: build
- name: Build artifact
uses: actions/upload-artifact@v2
with:
name: ego
path: build/*.deb
- name: Deploy ego-dev:nightly
if: github.ref == 'refs/heads/master' &&
github.event_name == 'push'
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.CI_GITHUB_REPOSITORY }}" \
-d '{"event_type": "docker-build",
"client_payload":{"repository":"ego",
"sign":"nightly",
"imagename":"ego-dev",
"tag":"nightly",
"file": "dockerfiles/Dockerfile",
"args": "--build-arg erttag=master --build-arg egotag=master",
"target":"dev"}}' \
https://api.github.com/repos/edgelesssys/deployment/dispatches
- name: Deploy ego-deploy:nightly
if: github.ref == 'refs/heads/master' &&
github.event_name == 'push'
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.CI_GITHUB_REPOSITORY }}" \
-d '{"event_type": "docker-build",
"client_payload":{"repository":"ego",
"sign":"nightly",
"imagename":"ego-deploy",
"tag":"nightly",
"file": "dockerfiles/Dockerfile",
"args": "--build-arg erttag=master --build-arg egotag=master",
"target":"deploy"}}' \
https://api.github.com/repos/edgelesssys/deployment/dispatches