-
Notifications
You must be signed in to change notification settings - Fork 193
233 lines (224 loc) · 6.67 KB
/
test.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
name: test
on:
workflow_call:
inputs:
haxe:
required: true
type: string
arch:
required: true
type: string
sep:
required: true
type: string
ext:
required: true
type: string
os:
required: true
type: string
env:
HXCPP_ARCH_FLAG: ${{ inputs.arch == 'Arm64' && 'HXCPP_ARM64' || format('HXCPP_M{0}', inputs.arch) }}
jobs:
haxe:
runs-on: ${{ inputs.os }}
name: haxe
defaults:
run:
working-directory: test/haxe
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}TestMain
cffi:
runs-on: ${{ inputs.os }}
name: cffi
defaults:
run:
working-directory: test/cffi
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: build project
working-directory: test/cffi/project
run: haxelib run hxcpp build.xml -Ddebug -D${{ env.HXCPP_ARCH_FLAG }}
- name: build
run: haxe compile.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
- name: build (utf8)
run: haxe compile-utf8.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
- name: build (neko)
run: haxe compile-neko.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
- name: copy
run: cp project/ndll/*/prime${{ inputs.ext }} bin/neko/prime.ndll
- name: run
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug
- name: run (utf8)
run: bin${{ inputs.sep }}cpp-utf8${{ inputs.sep }}TestMain-debug
- name: run (neko)
if: inputs.arch == '64'
working-directory: test/cffi/bin/neko
run: neko TestMain.n
telemetry:
strategy:
fail-fast: false
matrix:
mode: [ debug, release ]
include:
- suffix: -debug
mode: debug
runs-on: ${{ inputs.os }}
name: telemetry (${{ matrix.mode }})
defaults:
run:
working-directory: test/telemetry
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml ${{ matrix.suffix }} -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}TestMain${{ matrix.suffix }}
debugger:
runs-on: ${{ inputs.os }}
name: debugger
defaults:
run:
working-directory: test/debugger
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}App-debug
native:
runs-on: ${{ inputs.os }}
name: native
defaults:
run:
working-directory: test/native
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}Native
std:
runs-on: ${{ inputs.os }}
name: std
defaults:
run:
working-directory: test/std
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: install mariadb
if: runner.os == 'Linux'
run: |
set -ex
sudo rm -R /var/lib/mysql/
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup > mariadb_repo_setup
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup.sha256 > mariadb_repo_setup.sha256
sha256sum --check mariadb_repo_setup.sha256
sudo bash mariadb_repo_setup
sudo apt-get update -qqy
sudo apt-get remove -qqy mysql-common
sudo apt-get autoremove -qqy
sudo apt-get install -qqy mariadb-server
- name: configure mariadb
if: runner.os == 'Linux'
run: |
set -ex
sudo systemctl unmask mysql.service
sudo systemctl start mysql
sudo mysql -u root -e "create database hxcpp; grant all privileges on hxcpp.* to hxcpp@localhost identified by 'hxcpp'; flush privileges;"
- name: build
run: haxe compile${{ inputs.arch }}.hxml
- name: run
run: ${{ inputs.arch == 'Arm64' && 'arm64' || format('cpp{0}', inputs.arch) }}${{ inputs.sep }}Test
cppia:
strategy:
fail-fast: false
matrix:
mode: [ interp, jit ]
include:
- suffix: -jit
mode: jit
runs-on: ${{ inputs.os }}
name: cppia (${{ matrix.mode }})
defaults:
run:
working-directory: test/cppia
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: build host
run: haxe compile-host.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: build client
run: haxe compile-client.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}CppiaHost bin${{ inputs.sep }}client.cppia ${{ matrix.suffix }}
suite:
runs-on: ${{ inputs.os }}
name: haxe test suite
defaults:
run:
working-directory: haxe/tests/unit
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout haxe (latest)
if: inputs.haxe == 'latest'
uses: actions/checkout@v4
with:
repository: HaxeFoundation/haxe
path: haxe
- name: checkout haxe (stable)
if: inputs.haxe != 'latest'
uses: actions/checkout@v4
with:
repository: HaxeFoundation/haxe
path: haxe
ref: ${{ inputs.haxe }}
- name: setup
uses: ./.github/workflows/setup
with:
haxe: ${{ inputs.haxe }}
- name: install haxe libs
run: haxelib install compile-cpp.hxml --always
- name: build
run: haxe compile-cpp.hxml -D ${{ env.HXCPP_ARCH_FLAG }} -D no_http
- name: run
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug