Skip to content

Commit 6c9decf

Browse files
committed
Cleanup actions workflow the sequel.
1 parent 542e1f0 commit 6c9decf

File tree

1 file changed

+30
-34
lines changed

1 file changed

+30
-34
lines changed

.github/workflows/make.yml

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ on:
99
- master
1010

1111
env:
12+
AUTOTESTER_LIBS_GROUP: ${{github.workspace}}/toolchain/clibs.8xg
13+
AUTOTESTER_PATH: ${{github.workspace}}/CEmu/tests/autotester
14+
AUTOTESTER_ROM: ${{github.workspace}}/secrets/84pce_515_53.rom
15+
CEDEV: ${{github.workspace}}/CEdev
16+
CEDEV_BIN: ${{github.workspace}}/CEdev/bin
17+
CEDEV_EXAMPLES: ${{github.workspace}}/CEdev/examples
1218
CEMU_PATH: ${{github.workspace}}/CEmu
1319
FASMG_DOMAIN: https://flatassembler.net
20+
FASMG_PATH: ${{github.workspace}}/fasmg
1421
HOST_DOMAIN: https://jacobly.com
15-
INSTALL_PATH: ${{github.workspace}}/CEdev
16-
ROM_FILE: 84pce_515_53.rom
1722
SECRETS_PATH: ${{github.workspace}}/secrets
1823
TOOLCHAIN_PATH: ${{github.workspace}}/toolchain
24+
1925
jobs:
2026
build:
2127
strategy:
@@ -33,7 +39,7 @@ jobs:
3339
runs-on: ${{matrix.runs-on}}-latest
3440
steps:
3541
- name: Prepare Build Environment
36-
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.INSTALL_PATH}}/bin
42+
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.CEDEV_BIN}}
3743

3844
- name: Download ez80-clang
3945
id: ez80-clang
@@ -44,7 +50,7 @@ jobs:
4450
uses: DuckSoft/extract-7z-action@v1.0
4551
with:
4652
pathSource: ${{steps.ez80-clang.outputs.file-path}}
47-
pathTarget: ${{env.INSTALL_PATH}}/bin
53+
pathTarget: ${{env.CEDEV_BIN}}
4854

4955
- name: Download Fasmg Download Page
5056
id: fasmg-download
@@ -68,13 +74,13 @@ jobs:
6874
uses: DuckSoft/extract-7z-action@v1.0
6975
with:
7076
pathSource: ${{steps.fasmg.outputs.file-path}}
71-
pathTarget: ${{github.workspace}}/fasmg
77+
pathTarget: ${{env.FASMG_PATH}}
7278
- name: Setup Fasmg
73-
run: cmake -E copy fasmg${{matrix.fasmg}}/fasmg${{matrix.exe}} ${{env.INSTALL_PATH}}/bin
79+
run: cmake -E copy fasmg${{matrix.fasmg}}/fasmg${{matrix.exe}} ${{env.CEDEV_BIN}}
7480

7581
- name: Make Binaries Executable
7682
if: runner.os != 'Windows'
77-
run: chmod +x ${{env.INSTALL_PATH}}/bin/*
83+
run: chmod +x ${{env.CEDEV_BIN}}/*
7884
- name: Test Build Dependencies
7985
run: |
8086
ez80-clang --version
@@ -97,12 +103,12 @@ jobs:
97103
uses: actions/upload-artifact@v2
98104
with:
99105
name: CEdev-${{runner.os}}
100-
path: ${{env.INSTALL_PATH}}
106+
path: ${{env.CEDEV}}
101107
- name: Upload Libraries
102108
uses: actions/upload-artifact@v2
103109
with:
104110
name: clibs
105-
path: ${{env.TOOLCHAIN_PATH}}/clibs.8xg
111+
path: ${{env.AUTOTESTER_LIBS_GROUP}}
106112
- name: Upload Windows Installer
107113
if: runner.os == 'Windows'
108114
uses: actions/upload-artifact@v2
@@ -129,45 +135,40 @@ jobs:
129135
runs-on: ${{matrix.runs-on}}-latest
130136
steps:
131137
- name: Prepare Test Environment
132-
run: |
133-
cmake -E echo >> $${{matrix.env}}GITHUB_ENV CEDEV=${{env.INSTALL_PATH}}
134-
cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.INSTALL_PATH}}/bin
135-
cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.CEMU_PATH}}/tests/autotester
138+
run: cmake -E echo >> $${{matrix.env}}GITHUB_PATH ${{env.CEDEV_BIN}}
136139

137140
- name: Download CEdev
138141
uses: actions/download-artifact@v2
139142
with:
140143
name: ${{matrix.installer}}-${{runner.os}}
141-
path: ${{env.INSTALL_PATH}}
144+
path: ${{env.CEDEV}}
142145
- name: Install CEdev
143146
if: matrix.installer == 'installer'
144-
run: ${{env.INSTALL_PATH}}/CEdev.exe /DIR=${{env.INSTALL_PATH}} /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
147+
run: ${{env.CEDEV}}/CEdev.exe /DIR=${{env.CEDEV}} /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
145148

146149
- name: Make Binaries Executable
147150
if: runner.os != 'Windows'
148-
run: chmod +x ${{env.INSTALL_PATH}}/bin/*
151+
run: chmod +x ${{env.CEDEV_BIN}}/*
149152
- name: Build Examples
150-
env:
151-
CEDEV: ${{env.INSTALL_PATH}}
152-
run: make -j4 -C ${{env.INSTALL_PATH}}/examples V=1
153+
run: make -j4 -C ${{env.CEDEV_EXAMPLES}} V=1
153154

154155
- name: Checkout CEmu
155156
uses: actions/checkout@v2.3.4
156157
with:
157-
repository: CE-Programming/CEmu
158+
repository: ${{github.repository_owner}}/CEmu
158159
ref: latest-stable
159160
path: ${{env.CEMU_PATH}}
160161
persist-credentials: false
161162
- name: Build CEmu
162163
run: make -j4 -C ${{env.CEMU_PATH}}/core
163164
- name: Build Autotester CLI
164-
run: make -j4 -C ${{env.CEMU_PATH}}/tests/autotester
165+
run: make -j4 -C ${{env.AUTOTESTER_PATH}}
165166

166167
- name: Download Secrets
167168
id: download-secrets
168169
uses: carlosperate/download-file-action@v1.0.3
169170
with:
170-
file-url: ${{env.HOST_DOMAIN}}/CE-Programming/secrets
171+
file-url: ${{env.HOST_DOMAIN}}/${{github.repository_owner}}/secrets
171172
location: ${{env.SECRETS_PATH}}
172173
- name: Decrypt Secrets
173174
env:
@@ -183,33 +184,28 @@ jobs:
183184
uses: actions/download-artifact@v2
184185
with:
185186
name: clibs
187+
path: ${{env.TOOLCHAIN_PATH}}
186188
- name: Test Examples
187189
if: runner.os != 'Windows'
188-
env:
189-
AUTOTESTER_LIBS_GROUP: ${{github.workspace}}/clibs.8xg
190-
AUTOTESTER_ROM: ${{env.SECRETS_PATH}}/${{env.ROM_FILE}}
191-
CEDEV: ${{env.INSTALL_PATH}}
192190
run: |
193191
failed=0
194-
find ${{env.INSTALL_PATH}}/examples -name autotest.json -print0 | while read -d '' test; do
192+
find ${{env.CEDEV_EXAMPLES}} -name autotest.json -print0 | while read -d '' test; do
195193
cmake -E echo "Launching autotester on $test"
196-
autotester "$test"
194+
${{env.AUTOTESTER_PATH}}/autotester "$test"
197195
cmake -E true $((failed += $?))
198196
done
197+
cmake -E echo "$failed tests failed"
199198
exit $failed
200199
- name: Test Examples
201200
if: runner.os == 'Windows'
202-
env:
203-
AUTOTESTER_LIBS_GROUP: ${{github.workspace}}\clibs.8xg
204-
AUTOTESTER_ROM: ${{env.SECRETS_PATH}}\${{env.ROM_FILE}}
205-
CEDEV: ${{env.INSTALL_PATH}}
206201
run: |
207202
$failed = 0
208-
foreach ($test in get-childitem "${{env.INSTALL_PATH}}\examples" -recurse -include autotest.json) {
203+
foreach ($test in get-childitem "${{env.CEDEV_EXAMPLES}}" -recurse -include autotest.json) {
209204
cmake -E echo "Launching autotester on $test"
210-
autotester "$test"
205+
${{env.AUTOTESTER_PATH}}\autotester.exe "$test"
211206
$failed += $lastexitcode
212207
}
208+
cmake -E echo "$failed tests failed"
213209
exit $failed
214210
215211
- name: Remove Secrets

0 commit comments

Comments
 (0)