Skip to content

Commit 97ffb05

Browse files
committed
Fix
1 parent f0b6d3c commit 97ffb05

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ jobs:
109109
matrix:
110110
haxe: [ 4.3.7, latest ]
111111
uses: ./.github/workflows/test.yml
112-
name: Test Linux (32bit)
112+
name: Test Android (x86_64)
113113
with:
114114
haxe: ${{ matrix.haxe }}
115115
arch: 64
116116
sep: /
117117
ext: .dso
118118
os: ubuntu-latest
119-
haxe_flags: -D android
119+
target_flag: android
120120
execute: false
121121

122122
AndroidArm64:
@@ -125,12 +125,12 @@ jobs:
125125
matrix:
126126
haxe: [ 4.3.7, latest ]
127127
uses: ./.github/workflows/test.yml
128-
name: Test Linux (64bit)
128+
name: Test Android (Arm64)
129129
with:
130130
haxe: ${{ matrix.haxe }}
131131
arch: Arm64
132132
sep: /
133133
ext: .dso
134134
os: ubuntu-latest
135-
haxe_flags: -D android
135+
target_flag: android
136136
execute: false

.github/workflows/test.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
os:
1818
required: true
1919
type: string
20-
haxe_flags:
20+
target_flag:
2121
type: string
2222
default: ''
2323
execute:
@@ -26,6 +26,8 @@ on:
2626

2727
env:
2828
HXCPP_ARCH_FLAG: ${{ inputs.arch == 'Arm64' && 'HXCPP_ARM64' || format('HXCPP_M{0}', inputs.arch) }}
29+
HAXE_TARGET_FLAG: ${{ inputs.target_flag == '' && format('-D {0}', inputs.target_flag) || '' }}
30+
HXCPP_TARGET_FLAG: ${{ inputs.target_flag == '' && format('-D{0}', inputs.target_flag) || '' }}
2931

3032
jobs:
3133
haxe:
@@ -42,7 +44,7 @@ jobs:
4244
with:
4345
haxe: ${{ inputs.haxe }}
4446
- name: build
45-
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
47+
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
4648
- name: run
4749
if: inputs.execute
4850
run: bin${{ inputs.sep }}TestMain
@@ -62,13 +64,13 @@ jobs:
6264
haxe: ${{ inputs.haxe }}
6365
- name: build project
6466
working-directory: test/cffi/project
65-
run: haxelib run hxcpp build.xml -Ddebug -D${{ env.HXCPP_ARCH_FLAG }} ${{ replace(inputs.haxe_flags, ' ', '') }}
67+
run: haxelib run hxcpp build.xml -Ddebug -D${{ env.HXCPP_ARCH_FLAG }} ${{ env.HXCPP_TARGET_FLAG }}
6668
- name: build
67-
run: haxe compile.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
69+
run: haxe compile.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
6870
- name: build (utf8)
69-
run: haxe compile-utf8.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
71+
run: haxe compile-utf8.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
7072
- name: build (neko)
71-
run: haxe compile-neko.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
73+
run: haxe compile-neko.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
7274
- name: copy
7375
if: inputs.execute
7476
run: cp project/ndll/*/prime${{ inputs.ext }} bin/neko/prime.ndll
@@ -104,7 +106,7 @@ jobs:
104106
with:
105107
haxe: ${{ inputs.haxe }}
106108
- name: build
107-
run: haxe compile.hxml ${{ matrix.suffix }} -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
109+
run: haxe compile.hxml ${{ matrix.suffix }} -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
108110
- name: run
109111
if: inputs.execute
110112
run: bin${{ inputs.sep }}TestMain${{ matrix.suffix }}
@@ -123,7 +125,7 @@ jobs:
123125
with:
124126
haxe: ${{ inputs.haxe }}
125127
- name: build
126-
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
128+
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
127129
- name: run
128130
if: inputs.execute
129131
run: bin${{ inputs.sep }}App-debug
@@ -142,7 +144,7 @@ jobs:
142144
with:
143145
haxe: ${{ inputs.haxe }}
144146
- name: build
145-
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
147+
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
146148
- name: run
147149
if: inputs.execute
148150
run: bin${{ inputs.sep }}Native
@@ -169,7 +171,7 @@ jobs:
169171
sudo systemctl start mariadb
170172
sudo mariadb -u root -e "create database hxcpp; grant all privileges on hxcpp.* to hxcpp@localhost identified by 'hxcpp'; flush privileges;"
171173
- name: build
172-
run: haxe compile${{ inputs.arch }}.hxml ${{ inputs.haxe_flags }}
174+
run: haxe compile${{ inputs.arch }}.hxml ${{ env.HAXE_TARGET_FLAG }}
173175
- name: run
174176
if: inputs.execute
175177
run: ${{ inputs.arch == 'Arm64' && 'arm64' || format('cpp{0}', inputs.arch) }}${{ inputs.sep }}Test
@@ -195,9 +197,9 @@ jobs:
195197
with:
196198
haxe: ${{ inputs.haxe }}
197199
- name: build host
198-
run: haxe compile-host.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
200+
run: haxe compile-host.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
199201
- name: build client
200-
run: haxe compile-client.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ inputs.haxe_flags }}
202+
run: haxe compile-client.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
201203
- name: run
202204
if: inputs.execute
203205
run: bin${{ inputs.sep }}CppiaHost bin${{ inputs.sep }}client.cppia ${{ matrix.suffix }}
@@ -233,7 +235,7 @@ jobs:
233235
# haxe 4 tests don't build with latest utest
234236
if: inputs.haxe != 'latest'
235237
- name: build
236-
run: haxe compile-cpp.hxml -D ${{ env.HXCPP_ARCH_FLAG }} -D no_http ${{ inputs.haxe_flags }}
238+
run: haxe compile-cpp.hxml -D ${{ env.HXCPP_ARCH_FLAG }} -D no_http ${{ env.HAXE_TARGET_FLAG }}
237239
- name: run
238240
if: inputs.execute
239241
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug
@@ -252,6 +254,6 @@ jobs:
252254
shell: bash
253255
run: |
254256
for xml in *.xml; do
255-
haxelib run hxcpp $xml ${{ replace(inputs.haxe_flags, ' ', '') }}
257+
haxelib run hxcpp $xml ${{ env.HXCPP_TARGET_FLAG }}
256258
haxelib run hxcpp $xml clean
257259
done

0 commit comments

Comments
 (0)