Skip to content

Commit d205180

Browse files
author
R. van Elst
committed
No separate test job, run test after build
Fix tr: Illegal byte sequence on OS X
1 parent 2aaac62 commit d205180

File tree

2 files changed

+19
-47
lines changed

2 files changed

+19
-47
lines changed

.github/workflows/build-test-and-artifact.yml

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ on: [push, pull_request]
44

55
jobs:
66

7-
test-linux:
7+
linux-clang:
88
runs-on: "ubuntu-20.04"
9+
910
steps:
1011
- uses: actions/checkout@v2
1112

@@ -14,18 +15,15 @@ jobs:
1415
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H%M')"
1516

1617
- name: Install build dependencies
17-
run: sudo apt -y update && sudo apt -y install ncat libpcap-dev libsdl-dev
18-
19-
- name: Install test dependencies
20-
run: sudo apt -y update && sudo apt -y install ncat
18+
run: sudo apt -y update && sudo apt -y install libpcap-dev libsdl-dev netcat-openbsd
2119

2220
- name: Create build environment
2321
run: cmake -E make_directory ${{runner.workspace}}/build
2422

2523
- name: Configure CMake
2624
shell: bash
2725
working-directory: ${{runner.workspace}}/build
28-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall"
26+
run: cmake $GITHUB_WORKSPACE -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall"
2927

3028
- name: Build
3129
working-directory: ${{runner.workspace}}/build
@@ -39,42 +37,6 @@ jobs:
3937
shell: bash
4038
run: ${{runner.workspace}}/axpbox/test/run
4139

42-
- name: Upload AXPbox artifact
43-
uses: actions/upload-artifact@v1
44-
with:
45-
name: AXPbox-linux-test-${{ env.BUILD_DATE }}
46-
path: ${{runner.workspace}}/build/axpbox
47-
env:
48-
BUILD_DATE: ${{ steps.date.outputs.date }}
49-
50-
build-linux-clang:
51-
runs-on: "ubuntu-20.04"
52-
53-
steps:
54-
- uses: actions/checkout@v2
55-
56-
- name: Get current date
57-
id: date
58-
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H%M')"
59-
60-
- name: Install build dependencies
61-
run: sudo apt -y update && sudo apt -y install libpcap-dev libsdl-dev
62-
63-
- name: Create build environment
64-
run: cmake -E make_directory ${{runner.workspace}}/build
65-
66-
- name: Configure CMake
67-
shell: bash
68-
working-directory: ${{runner.workspace}}/build
69-
run: cmake $GITHUB_WORKSPACE -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall"
70-
71-
- name: Build
72-
working-directory: ${{runner.workspace}}/build
73-
shell: bash
74-
run: cmake --build . --config Release
75-
env:
76-
MAKEFLAGS: "-j2"
77-
7840
- name: Upload AXPbox binary
7941
uses: actions/upload-artifact@v1
8042
with:
@@ -83,7 +45,7 @@ jobs:
8345
env:
8446
BUILD_DATE: ${{ steps.date.outputs.date }}
8547

86-
build-linux-gcc:
48+
linux-gcc:
8749
runs-on: "ubuntu-20.04"
8850

8951
steps:
@@ -94,7 +56,7 @@ jobs:
9456
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H%M')"
9557

9658
- name: Install build dependencies
97-
run: sudo apt -y update && sudo apt -y install libpcap-dev libsdl-dev
59+
run: sudo apt -y update && sudo apt -y install libpcap-dev libsdl-dev netcat-openbsd
9860

9961
- name: Create build environment
10062
run: cmake -E make_directory ${{runner.workspace}}/build
@@ -111,6 +73,11 @@ jobs:
11173
env:
11274
MAKEFLAGS: "-j2"
11375

76+
- name: Run test scripts
77+
working-directory: ${{runner.workspace}}/axpbox
78+
shell: bash
79+
run: ${{runner.workspace}}/axpbox/test/run
80+
11481
- name: Upload AXPbox binary
11582
uses: actions/upload-artifact@v1
11683
with:
@@ -119,7 +86,7 @@ jobs:
11986
env:
12087
BUILD_DATE: ${{ steps.date.outputs.date }}
12188

122-
build-windows-msvc:
89+
windows-msvc:
12390
runs-on: windows-2019
12491
continue-on-error: true
12592
steps:
@@ -152,7 +119,7 @@ jobs:
152119
env:
153120
BUILD_DATE: ${{ steps.date.outputs.date }}
154121

155-
build-osx-appleclang:
122+
osx-appleclang:
156123
runs-on: "macos-10.15"
157124
continue-on-error: true
158125

@@ -184,6 +151,11 @@ jobs:
184151
env:
185152
MAKEFLAGS: "-j2"
186153

154+
- name: Run test scripts
155+
working-directory: ${{runner.workspace}}/axpbox
156+
shell: bash
157+
run: ${{runner.workspace}}/axpbox/test/run
158+
187159
- name: Upload AXPbox Binary
188160
uses: actions/upload-artifact@v1
189161
with:

test/rom/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ do
3232
exit 1
3333
fi
3434

35-
if [ "$(tail -n 1 axp.log | tr -d '\0')" == "P00>>>" ]
35+
if [ "$(tail -n 1 axp.log | LC_ALL=C tr -d '\0')" == "P00>>>" ]
3636
then
3737
echo
3838
break

0 commit comments

Comments
 (0)