-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (114 loc) · 4.41 KB
/
Copy pathci.yml
File metadata and controls
127 lines (114 loc) · 4.41 KB
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
name: ci
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: core header / long-long lint gate
run: sh tools/lint_core.sh
- name: sources.list sync check
run: sh tools/check_sources.sh
linux:
runs-on: ubuntu-latest
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # zlib + libzip, for Expand-Archive
- name: configure (strict C89, -Werror)
run: cmake -S . -B build/ci -DCMAKE_C_COMPILER=${{ matrix.cc }}
- name: build
run: cmake --build build/ci
- name: test
run: ctest --test-dir build/ci --output-on-failure
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # zlib + libzip, for Expand-Archive
- name: configure
run: cmake -S . -B build/ci
- name: build
run: cmake --build build/ci --config Debug
- name: test
run: ctest --test-dir build/ci -C Debug --output-on-failure
watcom:
# The vintage (DOS + Windows 9x) targets, built with OpenWatcom cross-compiling
# on a Windows runner. The DOS binary is 16-bit real-mode, so it is
# compile-verified here; its runtime is checked under DOSBox out-of-band. The
# Win9x/Win32 binary runs the *same* interpreter core natively, and its golden
# corpus run gates every push. See docs/platform-support-matrix.md.
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # Watt-32, for the DOS networking build
- name: install OpenWatcom
uses: open-watcom/setup-watcom@v1
with:
version: "2.0"
- name: DOS target (16-bit, compile)
shell: pwsh
run: |
$env:INCLUDE = "$env:WATCOM\h"
wmake -f build\watcom\pico.mk
if ($LASTEXITCODE -ne 0) { exit 1 }
- name: clean objects
shell: pwsh
run: Remove-Item *.obj, *.exe -ErrorAction SilentlyContinue
- name: Win9x/Win32 target (compile)
shell: pwsh
run: |
$env:INCLUDE = "$env:WATCOM\h\nt;$env:WATCOM\h"
wmake -f build\watcom\pico_nt.mk
if ($LASTEXITCODE -ne 0) { exit 1 }
- name: clean objects
shell: pwsh
run: Remove-Item *.obj, *.exe -ErrorAction SilentlyContinue
- name: Win9x/Win32 golden corpus (native run)
shell: pwsh
run: |
$env:INCLUDE = "$env:WATCOM\h\nt;$env:WATCOM\h"
wmake -f build\watcom\runner_nt.mk
if ($LASTEXITCODE -ne 0) { exit 1 }
.\runner.exe tests\scripts
if ($LASTEXITCODE -ne 0) { exit 1 }
- name: clean objects
shell: pwsh
run: Remove-Item *.obj, *.exe -ErrorAction SilentlyContinue
- name: build Watt-32 library (16-bit large model)
shell: pwsh
run: |
# Enable the BSD sockets API for the large model (see the patch header).
# --ignore-whitespace guards against CRLF differences on the runner.
git -C third_party\Watt-32 apply --ignore-whitespace "$env:GITHUB_WORKSPACE\build\watcom\watt32-config.patch"
if ($LASTEXITCODE -ne 0) { exit 1 }
$env:WATT_ROOT = "$env:GITHUB_WORKSPACE\third_party\Watt-32"
$env:W32_BIN2C = "$env:WATT_ROOT\util\win32\bin2c.exe"
$env:W32_NASM = "$env:WATT_ROOT\util\win32\nasm.exe"
$env:INCLUDE = "$env:WATCOM\h"
$src = "$env:WATT_ROOT\src"
# configur.bat is invoked by full path with cwd set inside cmd -- a bare
# "cmd /c configur.bat" is unreliable at resolving the batch file.
cmd /c "cd /d `"$src`" && `"$src\configur.bat`" watcom"
if ($LASTEXITCODE -ne 0) { exit 1 }
Push-Location $src
wmake -f watcom_l.mak
if ($LASTEXITCODE -ne 0) { Pop-Location; exit 1 }
Pop-Location
if (-not (Test-Path third_party\Watt-32\lib\wattcpwl.lib)) {
Write-Error "wattcpwl.lib not produced"; exit 1
}
- name: DOS + Watt-32 networking target (compile + link)
shell: pwsh
run: |
$env:INCLUDE = "$env:WATCOM\h"
wmake -f build\watcom\pico_watt.mk
if ($LASTEXITCODE -ne 0) { exit 1 }
if (-not (Test-Path picoposh.exe)) { Write-Error "picoposh.exe not linked"; exit 1 }