9
9
- master
10
10
11
11
jobs :
12
- build-and-test :
12
+ build :
13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
@@ -20,15 +20,10 @@ jobs:
20
20
if : runner.os == 'Windows'
21
21
run : " cmake -E echo >> $env:GITHUB_ENV ENV=env:"
22
22
- name : Prepare Build Environment
23
- run : |
24
- cmake -E echo >> $${{env.ENV}}GITHUB_ENV ROM=84pce_515_53.rom
25
- cmake -E echo >> $${{env.ENV}}GITHUB_ENV CEDEV=${{github.workspace}}/CEdev
26
- cmake -E echo >> $${{env.ENV}}GITHUB_PATH ${{github.workspace}}/CEdev/bin
27
- cmake -E echo >> $${{env.ENV}}GITHUB_PATH ${{github.workspace}}/CEmu/tests/autotester
23
+ run : cmake -E echo >> $${{env.ENV}}GITHUB_PATH ${{github.workspace}}/CEdev/bin
28
24
- name : Prepare Build Environment
29
25
if : runner.os == 'Windows'
30
- run : |
31
- cmake -E echo >> $${{env.ENV}}GITHUB_ENV EXE=.exe
26
+ run : cmake -E echo >> $${{env.ENV}}GITHUB_ENV EXE=.exe
32
27
33
28
- name : Install Build Dependencies
34
29
if : runner.os == 'Linux'
54
49
run : ez80-clang --version
55
50
56
51
- name : Checkout Toolchain
57
- uses : actions/checkout@v2
52
+ uses : actions/checkout@v2.3.4
58
53
with :
59
54
path : toolchain
60
55
submodules : recursive
@@ -97,47 +92,74 @@ jobs:
97
92
name : installer-${{runner.os}}
98
93
path : toolchain\release\CEdev${{env.EXE}}
99
94
95
+ test :
96
+ needs : build
97
+ if : github.event_name != 'pull_request'
98
+ strategy :
99
+ fail-fast : false
100
+ matrix :
101
+ runs-on : [ubuntu-latest, macos-latest, windows-latest]
102
+ runs-on : ${{matrix.runs-on}}
103
+ steps :
104
+ - name : Bootstrap Test Environment
105
+ if : runner.os == 'Windows'
106
+ run : " cmake -E echo >> $env:GITHUB_ENV ENV=env:"
107
+ - name : Prepare Test Environment
108
+ run : |
109
+ cmake -E echo >> $${{env.ENV}}GITHUB_ENV ROM=84pce_515_53.rom
110
+ cmake -E echo >> $${{env.ENV}}GITHUB_ENV CEDEV=${{github.workspace}}/CEdev
111
+ cmake -E echo >> $${{env.ENV}}GITHUB_PATH ${{github.workspace}}/CEdev/bin
112
+ cmake -E echo >> $${{env.ENV}}GITHUB_PATH ${{github.workspace}}/CEmu/tests/autotester
113
+
114
+ - name : Download CEdev
115
+ uses : actions/download-artifact@v2
116
+ with :
117
+ name : CEdev-${{runner.os}}
118
+ path : CEdev
119
+ - name : Download Libraries
120
+ uses : actions/download-artifact@v2
121
+ with :
122
+ name : clibs
123
+
124
+ - name : Make Binaries Executable
125
+ if : runner.os != 'Windows'
126
+ run : chmod +x ${{env.CEDEV}}/bin/*
127
+
100
128
- name : Build Examples
101
129
run : make -j4 -C ${{env.CEDEV}}/examples V=1
102
130
103
131
- name : Checkout CEmu
104
- if : github.event_name == 'push'
105
- uses : actions/checkout@v2
132
+ uses : actions/checkout@v2.3.4
106
133
with :
107
134
repository : CE-Programming/CEmu
108
135
ref : latest-stable
109
136
path : CEmu
110
137
111
138
- name : Build CEmu
112
- if : github.event_name == 'push'
113
139
run : make -j4 -C CEmu/core
114
140
- name : Build Autotester CLI
115
- if : github.event_name == 'push'
116
141
run : make -j4 -C CEmu/tests/autotester
117
142
118
143
- name : Download Secrets
119
- if : github.event_name == 'push'
120
144
id : download-secrets
121
145
uses : carlosperate/download-file-action@v1.0.3
122
146
with :
123
147
file-url : https://jacobly.com/CE-Programming/secrets
124
148
location : secrets
125
149
- name : Decrypt Secrets
126
- if : github.event_name == 'push'
127
150
env :
128
151
KEY : ${{secrets.SYMMETRIC_KEY_256}}
129
152
run : openssl enc -d -aes-256-cbc -iv d0583d991fcb6c3b05fb8eabc7421fb8 -K "$${{env.ENV}}KEY" -in ${{steps.download-secrets.outputs.file-path}} -out secrets/secrets.7z
130
153
- name : Extract Secrets
131
- if : github.event_name == 'push'
132
154
uses : DuckSoft/extract-7z-action@v1.0
133
155
with :
134
156
pathSource : secrets/secrets.7z
135
157
pathTarget : secrets
136
158
137
159
- name : Test examples
138
- if : github.event_name == 'push' && runner.os != 'Windows'
160
+ if : runner.os != 'Windows'
139
161
env :
140
- AUTOTESTER_LIBS_GROUP : ${{github.workspace}}/toolchain/ clibs.8xg
162
+ AUTOTESTER_LIBS_GROUP : ${{github.workspace}}/clibs.8xg
141
163
AUTOTESTER_ROM : ${{github.workspace}}/secrets/${{env.ROM}}
142
164
run : |
143
165
failed=0
@@ -148,9 +170,9 @@ jobs:
148
170
done
149
171
exit $failed
150
172
- name : Test examples
151
- if : github.event_name == 'push' && runner.os == 'Windows'
173
+ if : runner.os == 'Windows'
152
174
env :
153
- AUTOTESTER_LIBS_GROUP : ${{github.workspace}}\toolchain\ clibs.8xg
175
+ AUTOTESTER_LIBS_GROUP : ${{github.workspace}}\clibs.8xg
154
176
AUTOTESTER_ROM : ${{github.workspace}}\secrets\${{env.ROM}}
155
177
run : |
156
178
$failed = 0
@@ -168,15 +190,21 @@ jobs:
168
190
docs :
169
191
runs-on : ubuntu-latest
170
192
steps :
193
+ - name : Bootstrap Documentation Environment
194
+ if : runner.os == 'Windows'
195
+ run : " cmake -E echo >> $env:GITHUB_ENV ENV=env:"
196
+ - name : Prepare Documentation Environment
197
+ if : runner.os == 'Linux'
198
+ run : cmake -E echo >> $${{env.ENV}}GITHUB_PATH $HOME/.local/bin
171
199
172
- - name : Install Build Dependencies
200
+ - name : Install Documentation Dependencies
201
+ if : runner.os == 'Linux'
173
202
run : |
174
- cmake -E echo >> $${{env.ENV}}GITHUB_PATH $HOME/.local/bin
175
203
sudo apt-get install -y doxygen
176
204
pip install sphinx==3.2.1 sphinx_rtd_theme breathe
177
205
178
206
- name : Checkout Toolchain
179
- uses : actions/checkout@v2.3.1
207
+ uses : actions/checkout@v2.3.4
180
208
with :
181
209
persist-credentials : false
182
210
@@ -188,6 +216,7 @@ jobs:
188
216
touch .nojekyll
189
217
190
218
- name : Upload Website Documentation
219
+ if : github.ref == 'refs/heads/master'
191
220
uses : JamesIves/github-pages-deploy-action@3.7.1
192
221
with :
193
222
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments