-
Notifications
You must be signed in to change notification settings - Fork 11
241 lines (227 loc) · 8.45 KB
/
main.yml
File metadata and controls
241 lines (227 loc) · 8.45 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
name: CI
on: [push, pull_request]
jobs:
linux-test:
runs-on: ubuntu-22.04
permissions:
packages: write
env:
FORCE_COLOR: 1
PLATFORM: linux64
TEST: ${{matrix.target}}
RUNNER_TEMP: /tmp
strategy:
fail-fast: false
matrix:
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
target: [macro, js, hl, cpp, jvm, php, python, lua, flash, neko]
include:
- haxe_latest_dist: linux64/haxe_latest.tar.gz
# - target: lua
# APT_PACKAGES: ncurses-dev
# haxe_latest_dist: linux64/haxe_latest.tar.gz
- target: flash
APT_PACKAGES: libglib2.0-0 libgtk2.0-0 libfreetype6 xvfb
haxe_latest_dist: linux64/haxe_latest.tar.gz
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Install Neko from S3
shell: bash
run: |
set -ex
curl -sSL https://build.haxe.org/builds/neko/${{ env.PLATFORM }}/neko_latest.tar.gz -o ${{ env.RUNNER_TEMP }}/neko_latest.tar.gz
tar xzvf ${{ env.RUNNER_TEMP }}/neko_latest.tar.gz -C /tmp/
NEKOPATH=`echo ${{ env.RUNNER_TEMP }}/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/neko /usr/local/bin/
sudo ln -s $NEKOPATH/nekoc /usr/local/bin/
sudo ln -s $NEKOPATH/nekoml /usr/local/bin/
sudo ln -s $NEKOPATH/nekotools /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "$NEKOPATH" >> $GITHUB_PATH
echo "/usr/local/lib/" >> $GITHUB_PATH
echo "/usr/local/lib/neko/" >> $GITHUB_PATH
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/local/lib/" >> $GITHUB_ENV
- name: Print Neko version
run: neko -version 2>&1
- name: Setup Haxe
shell: bash
run: |
set -eux
download_url="https://build.haxe.org/builds/haxe/${{ matrix.haxe_latest_dist }}"
echo "Downloading [$download_url]..."
mkdir /tmp/haxe
curl -fsSL --retry 3 --retry-delay 5 "$download_url" -o /tmp/haxe.tar.gz
tar xzvf /tmp/haxe.tar.gz -C /tmp/haxe --strip-components=1
echo "/tmp/haxe/" >> $GITHUB_PATH
echo "HAXE_STD_PATH=/tmp/haxe/std" >> $GITHUB_ENV
- name: Print Haxe version
shell: bash
run: haxe -version
- name: "Print Python 3 version"
shell: bash
run: |
set -eux
python3 -V
- name: Install wget
if: matrix.target == 'flash'
shell: bash
run: |
wget --version
- name: Setup haxelib
shell: bash
run: |
haxelib setup ~/haxelib
- name: Install apt packages
if: matrix.APT_PACKAGES
run: |
set -ex
sudo apt update -qqy
sudo apt install -qqy ${{matrix.APT_PACKAGES}}
- name: Flash setup
if: matrix.target == 'flash'
run: export DISPLAY=:99.0
- name: Update Linux packages
run: |
set -ex
sudo apt update -qqy
sudo apt install -qqy
- name: Test
shell: bash
run: haxe RunCi.hxml -D include_legacy
working-directory: ${{github.workspace}}/tests
windows64-test:
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
PLATFORM: windows64
TEST: ${{matrix.target}}
HXCPP_COMPILE_CACHE: ~/hxcache
ARCH: 64
strategy:
fail-fast: false
matrix:
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
target: [macro, js, hl, cpp, jvm, php, python, flash, neko]
include:
- haxe_latest_dist: windows64/haxe_latest.zip
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Install Neko from S3
shell: pwsh
run: |
Invoke-WebRequest https://build.haxe.org/builds/neko/$env:PLATFORM/neko_latest.zip -OutFile $env:RUNNER_TEMP/neko_latest.zip
Expand-Archive $env:RUNNER_TEMP/neko_latest.zip -DestinationPath $env:RUNNER_TEMP
$NEKOPATH = Get-ChildItem $env:RUNNER_TEMP/neko-*-*
echo "$NEKOPATH" >> $env:GITHUB_PATH
echo "NEKOPATH=$NEKOPATH" >> $env:GITHUB_ENV
- name: Print Neko version
run: neko -version 2>&1
# - name: Quick test
# shell: pwsh
# run: |
# $DOWNLOADDIR="./win$($env:ARCH)Binaries"
# new-item -Name $DOWNLOADDIR -ItemType directory
# Invoke-WebRequest https://build.haxe.org/builds/haxe/$env:PLATFORM/haxe_latest.zip -OutFile $DOWNLOADDIR/haxe_bin.zip
- name: Setup Haxe
shell: pwsh
run: |
Set-Variable -Name download_url -Value "https://build.haxe.org/builds/haxe/${{ matrix.haxe_latest_dist }}"
echo "Downloading [$download_url]..."
curl -fsSL --retry 3 --retry-delay 5 "$download_url" -o $env:TEMP/haxe.zip
7z x $env:TEMP/haxe.zip "-o$env:TEMP"
mv -v $env:TEMP/haxe_* $env:TEMP/haxe
echo "$env:TEMP/haxe/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "HAXE_STD_PATH=$env:TEMP/haxe/std/" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Print Haxe version
shell: pwsh
run: haxe -version
- name: "Make Python 3 be available as python3 in the cmdline"
shell: pwsh
run: |
Set-PSDebug -Trace 1
$pypath = python -c "import sys; print(sys.executable)"
$py3path = $pypath.replace("python.exe","python3.exe")
cmd /c mklink $py3path $pypath
python3 -V
- name: Install hererocks
if: matrix.target == 'lua'
shell: cmd
run: |
pip install hererocks
hererocks lua53 -l5.3 -rlatest
call lua53/bin/activate
- name: Install wget
if: matrix.target == 'flash'
shell: cmd
run: |
choco install wget
wget --version
- name: Setup haxelib
shell: pwsh
run: |
haxelib setup ~/haxelib
haxelib version
haxelib config
- name: Test
shell: pwsh
run: haxe RunCi.hxml
working-directory: ${{github.workspace}}/tests
mac-test:
runs-on: macos-latest
env:
PLATFORM: mac-arm64
TEST: ${{matrix.target}}
HXCPP_COMPILE_CACHE: ~/hxcache
HAXE_STD_PATH: /usr/local/share/haxe/std
strategy:
fail-fast: false
matrix:
target: [macro, js, cpp, jvm, php, python, lua, flash, neko, hl]
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Install Neko from S3
run: |
set -ex
curl -sSL https://build.haxe.org/builds/neko/$PLATFORM/neko_latest.tar.gz -o ${RUNNER_TEMP}/neko_latest.tar.gz
tar -xf ${RUNNER_TEMP}/neko_latest.tar.gz -C ${RUNNER_TEMP}
NEKOPATH=`echo ${RUNNER_TEMP}/neko-*-*`
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/lib/neko
sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/
sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/
sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/
echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV
- name: Print Neko version
run: neko -version 2>&1
- name: Setup Haxe
run: |
set -ex
download_url="https://build.haxe.org/builds/haxe/mac/haxe_latest.tar.gz"
echo "Downloading [$download_url]..."
mkdir /tmp/haxe
curl -fsSL --retry 3 --retry-delay 5 "$download_url" -o /tmp/haxe.tar.gz
tar xzvf /tmp/haxe.tar.gz -C /tmp/haxe --strip-components=1
echo "/tmp/haxe/" >> $GITHUB_PATH
echo "HAXE_STD_PATH=/tmp/haxe/std" >> $GITHUB_ENV
- name: Print Haxe version
run: haxe -version
- name: Setup haxelib
run: |
set -ex
mkdir ~/haxelib
haxelib setup ~/haxelib
- name: Test
run: |
haxe RunCi.hxml -D include_legacy
working-directory: ${{github.workspace}}/tests
timeout-minutes: 60