-
Notifications
You must be signed in to change notification settings - Fork 12
163 lines (134 loc) · 4.57 KB
/
build.yaml
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
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths-ignore:
- '**/*.md'
- '.github/*.yml'
- .travis.yml
- provision.sh
- Vagrantfile
pull_request:
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
env:
# https://docs.brew.sh/Manpage#environment
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
haxe:
- 4.2.5
- 4.1.5
- 4.0.5
- 3.4.7
steps:
- name: Show environment variables
shell: bash
run: env | sort
- name: Git Checkout
uses: actions/checkout@v3 #https://github.com/actions/checkout
- name: "Cache Haxe and Haxelibs"
uses: actions/cache@v3 # https://github.com/actions/cache
with:
path: |
~/haxe
~/AppData/Roaming/haxe
key: ${{ runner.os }}-haxe-${{ matrix.haxe }}-${{ hashFiles('haxelib.json') }}
restore-keys: |
${{ runner.os }}-haxe-${{ matrix.haxe }}-
- name: Update brew formulas
if: runner.os == 'macOS'
run: |
echo "::group::brew update" && brew update && echo "::endgroup::"
echo "::group::brew config" && brew config && echo "::endgroup::"
echo "::group::brew list" && brew list --version && echo "::endgroup::"
# workaround to prevent "Error: The `brew link` step did not complete successfully" during "brew install mono"
rm -f \
/usr/local/share/man/man1/* \
/usr/local/share/man/man5/* \
/usr/local/bin/idle3 \
/usr/local/bin/2to3 \
/usr/local/bin/2to3 \
/usr/local/bin/idle3 \
/usr/local/bin/pydoc3 \
/usr/local/bin/python3 \
/usr/local/bin/python3-config
- name: Set up Python 3
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
with:
python-version: "3.10"
- name: Configure Python 3 on Windows
if: runner.os == 'Windows'
shell: cmd
# workaround for https://github.com/actions/setup-python/issues/123
run:
if not exist "%pythonLocation%\python.exe" (
mklink "%pythonLocation%\python3.exe" "%pythonLocation%\python.exe"
)
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 12
- name: Setup lix
run: npm i -g lix
- name: Setup Haxe ${{ matrix.haxe }}
run: lix install haxe ${{ matrix.haxe }}
- name: Install haxe libs
run: lix download
- name: Build Travix
shell: bash
run: |
if [[ "${{ matrix.haxe }}" == 3.* ]]; then
haxe build-neko.hxml
else
haxe build-neko.hxml --lib hx3compat
echo "HAXE_LIBS=--lib hx3compat" >> $GITHUB_ENV
fi
- name: Test Travix with [cs]
run: lix run travix cs ${HAXE_LIBS:-}
- name: Test Travix with [cpp]
run: lix run travix cpp ${HAXE_LIBS:-}
- name: Test [eval]
run: lix run travix interp -D eval-stack ${HAXE_LIBS:-}
- name: Test Travix with [flash]
continue-on-error: true # fails with "Flash execution failed too many times, build failure." but test is actually ok
run: lix run travix flash ${HAXE_LIBS:-}
- name: Test Travix with [hl]
if: matrix.haxe != '3.4.7' && runner.os != 'Linux'
run: lix run travix hl ${HAXE_LIBS:-}
- name: Test Travix with [interp]
run: lix run travix interp ${HAXE_LIBS:-}
- name: Test Travix with [java]
run: lix run travix java ${HAXE_LIBS:-}
- name: Test Travix with [jvm]
if: matrix.haxe != '3.4.7'
run: lix run travix java -D jvm ${HAXE_LIBS:-}
- name: Test Travix with [lua]
continue-on-error: ${{ runner.os != 'Linux' }}
run: lix run travix lua ${HAXE_LIBS:-}
- name: Test Travix with [neko]
run: lix run travix neko ${HAXE_LIBS:-}
- name: Test Travix with [node]
run: lix run travix node ${HAXE_LIBS:-}
- name: Test Travix with [php]
run: lix run travix php ${HAXE_LIBS:-}
- name: Test Travix with [php7]
if: matrix.haxe != '3.4.7'
run: lix run travix php7 ${HAXE_LIBS:-}
- name: Test Travix with [python]
run: lix run travix python ${HAXE_LIBS:-}