Skip to content

Commit

Permalink
[ci] Add arm64 support to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk committed Jul 12, 2024
1 parent 528298e commit 7cae08a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Test MacOS
with:
haxe: ${{ matrix.haxe }}
arch: 64
arch: Arm64
sep: /
ext: .dylib
os: macos-latest
Expand Down Expand Up @@ -70,4 +70,4 @@ jobs:
arch: 64
sep: /
ext: .dso
os: ubuntu-latest
os: ubuntu-latest
29 changes: 16 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
required: true
type: string

env:
HXCPP_ARCH_FLAG: ${{ inputs.arch == "Arm64" && "HXCPP_ARM64" || "HXCPP_M${{ inputs.arch }}" }}

jobs:
haxe:
runs-on: ${{ inputs.os }}
Expand All @@ -33,7 +36,7 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml -D HXCPP_M${{ inputs.arch }}
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}TestMain

Expand All @@ -52,13 +55,13 @@ jobs:
haxe: ${{ inputs.haxe }}
- name: build project
working-directory: test/cffi/project
run: haxelib run hxcpp build.xml -Ddebug -DHXCPP_M${{ inputs.arch }}
run: haxelib run hxcpp build.xml -Ddebug -D${{ env.HXCPP_ARCH_FLAG }}
- name: build
run: haxe compile.hxml --debug -D HXCPP_M${{ inputs.arch }}
run: haxe compile.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
- name: build (utf8)
run: haxe compile-utf8.hxml --debug -D HXCPP_M${{ inputs.arch }}
run: haxe compile-utf8.hxml --debug -D ${{ env.HXCPP_ARCH_FLAG }}
- name: build (neko)
run: haxe compile-neko.hxml --debug -D HXCPP_M${{ inputs.arch }}
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
Expand Down Expand Up @@ -91,7 +94,7 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml ${{ matrix.suffix }} -D HXCPP_M${{ inputs.arch }}
run: haxe compile.hxml ${{ matrix.suffix }} -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}TestMain${{ matrix.suffix }}

Expand All @@ -109,10 +112,10 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml -D HXCPP_M${{ inputs.arch }}
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}App-debug

native:
runs-on: ${{ inputs.os }}
name: native
Expand All @@ -127,7 +130,7 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build
run: haxe compile.hxml -D HXCPP_M${{ inputs.arch }}
run: haxe compile.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}Native

Expand Down Expand Up @@ -190,9 +193,9 @@ jobs:
with:
haxe: ${{ inputs.haxe }}
- name: build host
run: haxe compile-host.hxml -D HXCPP_M${{ inputs.arch }}
run: haxe compile-host.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: build client
run: haxe compile-client.hxml -D HXCPP_M${{ inputs.arch }}
run: haxe compile-client.hxml -D ${{ env.HXCPP_ARCH_FLAG }}
- name: run
run: bin${{ inputs.sep }}CppiaHost bin${{ inputs.sep }}client.cppia ${{ matrix.suffix }}

Expand Down Expand Up @@ -225,6 +228,6 @@ jobs:
- name: install haxe libs
run: haxelib install compile-cpp.hxml --always
- name: build
run: haxe compile-cpp.hxml -D HXCPP_M${{ inputs.arch }} -D no_http
run: haxe compile-cpp.hxml -D ${{ env.HXCPP_ARCH_FLAG }} -D no_http
- name: run
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug
run: bin${{ inputs.sep }}cpp${{ inputs.sep }}TestMain-debug
5 changes: 5 additions & 0 deletions test/std/compileArm64.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-main Test
-cpp cppArm64
-D HXCPP_ARM64
-cp ../unit
-lib hx4compat

0 comments on commit 7cae08a

Please sign in to comment.