-
Notifications
You must be signed in to change notification settings - Fork 6
190 lines (177 loc) · 6.18 KB
/
CI.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: CI
on:
push:
branches: [ master, dev ]
pull_request:
branches:
- '**'
jobs:
docker-build:
name: Docker Build
runs-on: ubuntu-20.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0 # fetch all history for all branches and tags
- name: Push to GitHub Container Registry
uses: docker/build-push-action@v1
with:
push: true
tags: "GITHUB_ACTION_${{github.run_number}}"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
repository: mmore500/signalgp-lite
registry: ghcr.io
add_git_labels: true
misc:
runs-on: ubuntu-20.04
name: Docs, Miscellaneous
needs:
- docker-build
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite && ./ci/test_tidy.sh && python3 ci/test_readme_snippets.py && make docs"
unit-clang-debug:
runs-on: ubuntu-20.04
name: Unit Tests (clang, debug mode)
needs:
- docker-build
env:
CXX: clang++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_ADMIN -e CXX=$CXX -i ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "set -x && cd /opt/signalgp-lite/tests && make"
unit-gcc-debug:
runs-on: ubuntu-20.04
name: Unit Tests (gcc, debug mode)
needs:
- docker-build
env:
CXX: g++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_ADMIN -e CXX=$CXX -i ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "set -x && cd /opt/signalgp-lite/tests && make"
unit-clang-opt:
runs-on: ubuntu-20.04
name: Unit Tests (clang, opt mode)
needs:
- docker-build
env:
CXX: clang++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_ADMIN -e CXX=$CXX -i ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "set -x && cd /opt/signalgp-lite/tests && make opt"
unit-gcc-opt:
runs-on: ubuntu-20.04
name: Unit Tests (gcc, opt mode)
needs:
- docker-build
env:
CXX: g++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_ADMIN -e CXX=$CXX -i ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "set -x && cd /opt/signalgp-lite/tests && make opt"
coverage:
runs-on: ubuntu-20.04
name: Coverage
needs:
- docker-build
env:
CXX: clang++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: ci_env=`bash <(curl -s https://codecov.io/env)`
- run: sudo docker run $ci_env -e CXX=$CXX ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite && make coverage && bash <(curl -s https://codecov.io/bash)"
fuzzing:
runs-on: ubuntu-20.04
name: Fuzzing
needs:
- docker-build
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -e CXX=$CXX -e CONTEXT=travis ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite/fuzzing && make && make opt"
microbenchmarks:
runs-on: ubuntu-20.04
name: Microbenchmarks
needs:
- docker-build
env:
CXX: clang++
OSF_TOKEN: ${{ secrets.OSF_TOKEN }}
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run -e CXX=$CXX -e OSF_TOKEN=$OSF_TOKEN -e CONTEXT=travis ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite/microbenchmarks && make"
source-clang:
runs-on: ubuntu-20.04
name: Source (clang)
needs:
- docker-build
env:
CXX: clang++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_ADMIN ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite && make test"
source-gcc:
runs-on: ubuntu-20.04
name: Source (gcc)
needs:
- docker-build
env:
CXX: g++
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: sudo docker run --cap-add=SYS_ADMIN ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite && make test"
deploy-github-pages:
runs-on: ubuntu-20.04
name: Deploy to GitHub Pages
needs:
- misc
- unit-clang-debug
- unit-gcc-debug
- unit-clang-opt
- unit-gcc-opt
- coverage
- fuzzing
- microbenchmarks
- source-clang
- source-gcc
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: docker-practice/actions-setup-docker@v1
- run: docker run -e GH_TOKEN=$GH_TOKEN -e GITHUB_RUN_ID ghcr.io/mmore500/signalgp-lite:GITHUB_ACTION_${{github.run_number}} /bin/bash -c "cd /opt/signalgp-lite && source third-party/emsdk/emsdk_env.sh && make web && make badges && ./ci/deploy_gh_pages.sh"
deploy-container:
runs-on: ubuntu-20.04
name: Deploy Container to ghcr.io
needs:
- misc
- unit-clang-debug
- unit-gcc-debug
- unit-clang-opt
- unit-gcc-opt
- coverage
- fuzzing
- microbenchmarks
- source-clang
- source-gcc
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0 # fetch all history for all branches and tags
- name: Push to DockerHub
uses: docker/build-push-action@v1
with:
push: true
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
repository: mmore500/signalgp-lite
registry: ghcr.io
tag_with_ref: true
tag_with_sha: true
add_git_labels: true