Skip to content

Commit 3516fa1

Browse files
committed
[CI] Try to split the matrix
1 parent adf224a commit 3516fa1

2 files changed

Lines changed: 82 additions & 42 deletions

File tree

.github/workflows/main.yml

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,44 @@ concurrency:
66
cancel-in-progress: true
77

88
jobs:
9-
test:
9+
linux-tests:
10+
name: Linux
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
target: [eval, js, hl, cpp, jvm, php, python, neko]
15+
uses: ./.github/workflows/template.yml
16+
with:
17+
os: ubuntu-latest
18+
target: ${{ matrix.target }}
19+
secrets: inherit
20+
21+
macos-tests:
22+
name: MacOS
1023
strategy:
1124
fail-fast: false
1225
matrix:
13-
os: [macos-latest, ubuntu-latest, windows-latest]
1426
target: [eval, js, hl, cpp, jvm, php, python, neko]
1527
exclude:
1628
# no nightly binaries for darwin-arm64
17-
- os: macos-latest
18-
target: hl
29+
- target: hl
1930
# php is not available by default for macos runners, probably not worth bothering
20-
- os: macos-latest
21-
target: php
22-
runs-on: ${{ matrix.os }}
23-
steps:
24-
- uses: actions/checkout@v4
25-
- uses: krdlab/setup-haxe@v2
26-
with:
27-
haxe-version: "2025-09-16_kt_coro_ef572ed"
28-
29-
- uses: cedx/setup-hashlink@v6
30-
if: matrix.target == 'hl' && matrix.os == 'windows-latest'
31+
- target: php
32+
uses: ./.github/workflows/template.yml
33+
with:
34+
os: macos-latest
35+
target: ${{ matrix.target }}
36+
secrets: inherit
3137

32-
- name: Setup linux hashlink
33-
if: matrix.target == 'hl' && matrix.os == 'ubuntu-latest'
34-
env:
35-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
36-
run: |
37-
gh release download -R HaxeFoundation/hashlink -p '*-linux-amd64*' latest
38-
tar -xvf hashlink-*-linux-*.tar.gz
39-
cd hashlink-*-linux-amd64
40-
sudo mv hl /usr/bin/
41-
sudo mv *.hdll /usr/lib/
42-
sudo mv *.so /usr/lib/
43-
sudo mv include /usr/lib/
44-
hl || true
45-
46-
- name: Setup haxelib
47-
run: |
48-
haxelib newrepo
49-
${{ matrix.target == 'jvm' }} && haxelib install hxjava || true
50-
${{ matrix.target == 'cpp' }} && haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git && cd .haxelib/hxcpp/git/tools/hxcpp && haxe compile.hxml || true
51-
haxelib git utest https://github.com/Aidan63/utest.git coro
52-
haxelib list
53-
haxe -version
54-
neko -version
38+
windows-tests:
39+
name: Windows
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
target: [eval, js, hl, cpp, jvm, php, python, neko]
44+
uses: ./.github/workflows/template.yml
45+
with:
46+
os: windows-latest
47+
target: ${{ matrix.target }}
48+
secrets: inherit
5549

56-
- name: Run tests
57-
run: |
58-
cd tests
59-
haxe build-${{ matrix.target }}.hxml

.github/workflows/template.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test suite
2+
3+
inputs:
4+
os:
5+
required: true
6+
type: string
7+
target:
8+
required: true
9+
type: string
10+
11+
runs:
12+
using: 'composite'
13+
runs-on: ${{ inputs.os }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: krdlab/setup-haxe@v2
17+
with:
18+
haxe-version: "2025-09-16_kt_coro_ef572ed"
19+
20+
- uses: cedx/setup-hashlink@v6
21+
if: inputs.target == 'hl' && inputs.os == 'windows-latest'
22+
23+
- name: Setup linux hashlink
24+
if: inputs.target == 'hl' && inputs.os == 'ubuntu-latest'
25+
env:
26+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
27+
run: |
28+
gh release download -R HaxeFoundation/hashlink -p '*-linux-amd64*' latest
29+
tar -xvf hashlink-*-linux-*.tar.gz
30+
cd hashlink-*-linux-amd64
31+
sudo mv hl /usr/bin/
32+
sudo mv *.hdll /usr/lib/
33+
sudo mv *.so /usr/lib/
34+
sudo mv include /usr/lib/
35+
hl || true
36+
37+
- name: Setup haxelib
38+
run: |
39+
haxelib newrepo
40+
${{ inputs.target == 'jvm' }} && haxelib install hxjava || true
41+
${{ inputs.target == 'cpp' }} && haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git && cd .haxelib/hxcpp/git/tools/hxcpp && haxe compile.hxml || true
42+
haxelib git utest https://github.com/Aidan63/utest.git coro
43+
haxelib list
44+
haxe -version
45+
neko -version
46+
47+
- name: Run tests
48+
run: |
49+
cd tests
50+
haxe build-${{ inputs.target }}.hxml

0 commit comments

Comments
 (0)