diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 95706e2ff..eae26d3a0 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -102,3 +102,35 @@ jobs:
sep: /
ext: .dso
os: ubuntu-latest
+
+ AndroidX86_64:
+ strategy:
+ fail-fast: false
+ matrix:
+ haxe: [ 4.3.7, latest ]
+ uses: ./.github/workflows/test.yml
+ name: Test Android (x86_64)
+ with:
+ haxe: ${{ matrix.haxe }}
+ arch: 64
+ sep: /
+ ext: .dso
+ os: ubuntu-latest
+ target_flag: android
+ execute: false
+
+ AndroidArm64:
+ strategy:
+ fail-fast: false
+ matrix:
+ haxe: [ 4.3.7, latest ]
+ uses: ./.github/workflows/test.yml
+ name: Test Android (Arm64)
+ with:
+ haxe: ${{ matrix.haxe }}
+ arch: Arm64
+ sep: /
+ ext: .dso
+ os: ubuntu-latest
+ target_flag: android
+ execute: false
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 315c0842a..a3629907d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,9 +17,20 @@ on:
os:
required: true
type: string
+ target_flag:
+ type: string
+ default: ''
+ execute:
+ type: boolean
+ default: true
env:
- HXCPP_ARCH_FLAG: ${{ inputs.arch == 'Arm64' && 'HXCPP_ARM64' || format('HXCPP_M{0}', inputs.arch) }}
+ HXCPP_ARCH_FLAG: ${{ inputs.arch == 'Arm64' && 'HXCPP_ARM64' ||
+ inputs.target_flag == 'android' && inputs.arch == 64 && 'HXCPP_X86_64'||
+ format('HXCPP_M{0}', inputs.arch)
+ }}
+ HAXE_TARGET_FLAG: ${{ inputs.target_flag && format('-D {0}', inputs.target_flag) || '' }}
+ HXCPP_TARGET_FLAG: ${{ inputs.target_flag && format('-D{0}', inputs.target_flag) || '' }}
jobs:
haxe:
@@ -36,8 +47,9 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
- run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}TestMain
cffi:
@@ -55,21 +67,24 @@ jobs:
haxe: ${{ inputs.haxe }}
- name: build project
working-directory: test/cffi/project
- run: haxelib run hxcpp build.xml -Ddebug -D${{ env.HXCPP_ARCH_FLAG }}
+ run: haxelib run hxcpp build.xml -Ddebug -D${{ env.HXCPP_ARCH_FLAG }} ${{ env.HXCPP_TARGET_FLAG }}
- name: build
- run: haxe compile.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: build (utf8)
- run: haxe compile-utf8.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile-utf8.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: build (neko)
- run: haxe compile-neko.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile-neko.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: copy
+ if: inputs.execute
run: cp project/ndll/*/prime${{ inputs.ext }} bin/neko/prime.ndll
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug
- name: run (utf8)
+ if: inputs.execute
run: bin${{ inputs.sep }}cpp-utf8${{ inputs.sep }}TestMain-debug
- name: run (neko)
- if: inputs.arch == '64'
+ if: inputs.execute && inputs.arch == '64'
working-directory: test/cffi/bin/neko
run: neko TestMain.n
@@ -94,8 +109,9 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
- run: haxe compile.hxml ${{ matrix.suffix }} -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile.hxml ${{ matrix.suffix }} -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}TestMain${{ matrix.suffix }}
debugger:
@@ -112,8 +128,9 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
- run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}App-debug
native:
@@ -130,8 +147,9 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
- run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}Native
std:
@@ -148,7 +166,7 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: setup mariadb
- if: runner.os == 'Linux'
+ if: runner.os == 'Linux' && inputs.execute
run: |
set -ex
sudo apt-get update -qqy
@@ -156,9 +174,10 @@ jobs:
sudo systemctl start mariadb
sudo mariadb -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
+ run: haxe compile-generic.hxml --cpp bin -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: run
- run: ${{ inputs.arch == 'Arm64' && 'arm64' || format('cpp{0}', inputs.arch) }}${{ inputs.sep }}Test
+ if: inputs.execute
+ run: bin${{ inputs.sep }}Test
cppia:
strategy:
@@ -181,10 +200,11 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build host
- run: haxe compile-host.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile-host.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: build client
- run: haxe compile-client.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
+ run: haxe compile-client.hxml -D ${{ env.HXCPP_ARCH_FLAG }} ${{ env.HAXE_TARGET_FLAG }}
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}CppiaHost bin${{ inputs.sep }}client.cppia ${{ matrix.suffix }}
suite:
@@ -218,8 +238,9 @@ jobs:
# haxe 4 tests don't build with latest utest
if: inputs.haxe != 'latest'
- name: build
- run: haxe compile-cpp.hxml -D ${{ env.HXCPP_ARCH_FLAG }} -D no_http
+ run: haxe compile-cpp.hxml -D ${{ env.HXCPP_ARCH_FLAG }} -D no_http ${{ env.HAXE_TARGET_FLAG }}
- name: run
+ if: inputs.execute
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug
build_tool:
runs-on: ${{ inputs.os }}
@@ -236,6 +257,6 @@ jobs:
shell: bash
run: |
for xml in *.xml; do
- haxelib run hxcpp $xml
+ haxelib run hxcpp $xml -D${{ env.HXCPP_ARCH_FLAG }} ${{ env.HXCPP_TARGET_FLAG }}
haxelib run hxcpp $xml clean
done
diff --git a/.gitignore b/.gitignore
index ae80f7d57..4ff620b27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,11 +29,6 @@ hxcpp.n
.vscode
-test/cxx_standard/main
-test/cxx_standard/main.hash
-test/cxx_standard/main.exe
-test/cxx_standard/main.exe.hash
-
# Created by https://www.toptal.com/developers/gitignore/api/visualstudio
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudio
diff --git a/test/cxx_standard/Build.xml b/test/cxx_standard/Build.xml
index 0198e3145..8b0663323 100644
--- a/test/cxx_standard/Build.xml
+++ b/test/cxx_standard/Build.xml
@@ -7,9 +7,8 @@
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/test/cxx_standard/Build_legacy.xml b/test/cxx_standard/Build_legacy.xml
index e9c4efa99..8a901be2f 100644
--- a/test/cxx_standard/Build_legacy.xml
+++ b/test/cxx_standard/Build_legacy.xml
@@ -6,7 +6,8 @@
-
+
+
diff --git a/test/cxx_standard/Build_section.xml b/test/cxx_standard/Build_section.xml
index af4ab0cdb..1afc5236e 100644
--- a/test/cxx_standard/Build_section.xml
+++ b/test/cxx_standard/Build_section.xml
@@ -6,7 +6,8 @@
-
+
+
diff --git a/test/std/compile-generic.hxml b/test/std/compile-generic.hxml
new file mode 100644
index 000000000..3f77fc482
--- /dev/null
+++ b/test/std/compile-generic.hxml
@@ -0,0 +1,4 @@
+-m Test
+-D HXCPP_DEBUGGER
+-L hx4compat
+-L utest
diff --git a/test/std/compile32.hxml b/test/std/compile32.hxml
index 692ed7581..692e3e321 100644
--- a/test/std/compile32.hxml
+++ b/test/std/compile32.hxml
@@ -1,6 +1,3 @@
--m Test
+compile-generic.hxml
-D HXCPP_M32
--D HXCPP_DEBUGGER
--L hx4compat
--L utest
---cpp cpp32
\ No newline at end of file
+--cpp cpp32
diff --git a/test/std/compile64.hxml b/test/std/compile64.hxml
index 2793e6bd3..6c484aef2 100644
--- a/test/std/compile64.hxml
+++ b/test/std/compile64.hxml
@@ -1,5 +1,3 @@
--m Test
+compile-generic.hxml
-D HXCPP_M64
--L hx4compat
--L utest
---cpp cpp64
\ No newline at end of file
+--cpp cpp64
diff --git a/test/std/compileArm64.hxml b/test/std/compileArm64.hxml
index 766081575..e0e3182c2 100644
--- a/test/std/compileArm64.hxml
+++ b/test/std/compileArm64.hxml
@@ -1,5 +1,3 @@
--m Test
+compile-generic.hxml
-D HXCPP_ARM64
--L hx4compat
--L utest
--cpp arm64