-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.47 KB
/
examples.yml
File metadata and controls
59 lines (48 loc) · 1.47 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
name: Example Compilation Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
env:
NODE_VERSION: '20'
HAXE_VERSION: '4.3.7'
jobs:
examples:
name: Compile-check examples (quick)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Cache Haxe toolchain (lix)
uses: actions/cache@v4
with:
path: |
~/haxe
key: ${{ runner.os }}-lix-haxe-${{ env.HAXE_VERSION }}-${{ hashFiles('.haxerc', 'haxe_libraries/*.hxml', 'package-lock.json') }}
restore-keys: |
${{ runner.os }}-lix-haxe-${{ env.HAXE_VERSION }}-
- name: Install npm dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Install Haxe (pinned via lix)
run: |
set -euo pipefail
npx lix download
npx lix download haxe "${{ env.HAXE_VERSION }}"
npx lix use haxe "${{ env.HAXE_VERSION }}"
echo "$(pwd)/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$(pwd)/node_modules/.bin:$PATH"
haxe -version
- name: Download Haxe libraries (lix)
run: npx lix download
- name: Compile-check examples
run: npm run test:examples