-
Notifications
You must be signed in to change notification settings - Fork 36
128 lines (106 loc) · 3.2 KB
/
main.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
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: CI
on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths-ignore:
- '**/*.md'
- '.github/*.yml'
pull_request:
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
haxe-version:
- nightly
- haxerc # use the version specified in .haxerc
os:
- ubuntu-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup [node]
uses: actions/setup-node@v3 # https://github.com/marketplace/actions/setup-node-js-environment
with:
node-version: 18
- run: npm install
- name: Run unit tests
run: npx haxe tests.hxml
- name: Test generation of XML files
run: npx haxe xml.hxml
- name: Test cli [eval]
run: npx haxe -D eval-stack runBase.hxml --run dox.Dox --help
- name: Test cli [neko]
run: |
set -eux
npx haxe runBase.hxml -neko run.n
npx neko run.n --help
- name: Setup [python]
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
with:
python-version: 3.11
- name: Test cli [python]
run: |
set -eux
npx haxe runBase.hxml -python bin/dox.py
python bin/dox.py --help
- name: Setup [php]
uses: shivammathur/setup-php@v2 # https://github.com/marketplace/actions/setup-php-action
env:
runner: ${{ env.ACT && 'self-hosted' || 'github' }}
with:
php-version: 7.4
extensions: mbstring, xml
- name: Test cli [php]
run: |
set -eux
npx haxe runBase.hxml -php bin/dox
php bin/dox/index.php --help
- name: Setup [java]
uses: actions/setup-java@v3 # https://github.com/marketplace/actions/setup-java-jdk
with:
distribution: 'temurin'
java-version: 11
- name: Test cli [java]
run: |
set -eux
npx haxe runBase.hxml -java bin/java
java -jar bin/java/Dox.jar
- name: Test cli [jvm]
run: |
set -eux
npx haxe runBase.hxml -java bin/jvm
java -jar bin/jvm/Dox.jar
- name: Test cli [node]
run: |
set -eux
npx haxe runBase.hxml -lib hxnodejs -js bin/dox.js
node bin/dox.js
- name: Install hxcpp development version
if: matrix.haxe-version == 'nightly'
run: |
set -eux
npx lix install haxe nightly
#npx lix install https://github.com/HaxeFoundation/hxcpp
#echo y | npx lix run hxcpp
#--> does not work, so we do instead:
npx haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
pushd $(npx haxelib config)/hxcpp/git/tools/hxcpp
echo y | npx haxe compile.hxml
popd
npx lix dev hxcpp $(npx haxelib config)/hxcpp/git
- name: Test cli [cpp]
run: |
set -eux
npx haxe runBase.hxml -cpp bin/cpp -D HXCPP_SILENT
bin/cpp/Dox