-
-
Notifications
You must be signed in to change notification settings - Fork 205
167 lines (163 loc) · 4.52 KB
/
build.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
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
name: build
on:
push:
branches: dev
paths-ignore:
- '**.md'
- '**/*.md.in'
- 'docs/**'
- '.github/workflows/publish.yml'
- 'tools/ci/make-pkg.ps1'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- '**/*.md.in'
- 'docs/**'
jobs:
win32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: |
.\tools\cmdline\axmol -p win32 -a x64
.\tools\cmdline\axmol run -p win32 -a x64 -xb '--target,unit-tests'
win32-dll:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: .\tools\cmdline\axmol -p win32 -a x64 -dll
winuwp:
# build uwp debug avoid github CI fail with memory issue
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: .\tools\cmdline\axmol -p winuwp -a x64 -O0
win32-clang:
runs-on: windows-latest
env:
# Test winsdk < 10.0.22000.0 (missing C11 standard stdalign.h), axmol will auto fallback to C99 for resolving compiling issue.
WINSDK_VER: '10.0.19041.0'
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: .\tools\cmdline\axmol -p win32 -a 'x64' -cc clang -sdk $env:WINSDK_VER
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: |
AX_ROOT=`pwd`
echo -e "y" | pwsh $AX_ROOT/setup.ps1
- name: Build
shell: pwsh
run: |
./tools/cmdline/axmol -p linux -a x64
./tools/cmdline/axmol -p linux -a x64 -xb '--target,lua-tests'
./tools/cmdline/axmol run -p linux -a x64 -xb '--target,unit-tests' -wait
osx-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: |
./tools/cmdline/axmol -p osx
./tools/cmdline/axmol run -p osx -xb '--target,unit-tests'
osx-x64:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: |
./tools/cmdline/axmol -p osx
./tools/cmdline/axmol run -p osx -xb '--target,unit-tests'
android:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- armv7
- arm64
- x86
- x64
env:
BUILD_ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: |
$AX_ROOT = $(Get-Location).Path
./tools/cmdline/axmol -p android -a $env:BUILD_ARCH
- uses: actions/upload-artifact@v4
with:
name: android_${{ matrix.arch }}
path: |
templates/**/*.apk
tests/**/*.apk
ios:
runs-on: macos-latest
strategy:
matrix:
target_os:
- ios
- tvos
env:
TARGET_OS: ${{ matrix.target_os }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: ./tools/cmdline/axmol -p $env:TARGET_OS -a 'x64'
wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: |
./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2
./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -xb '--target,fairygui-tests'
./tools/cmdline/axmol -p wasm -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -xb '--target,lua-tests'
- uses: actions/upload-artifact@v4
with:
name: wasm
path: build_wasm/bin/**/*
if-no-files-found: error
- name: Repository Dispatch
if: ${{ github.repository == 'axmolengine/axmol' && github.event_name != 'pull_request' }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.AX_TRIGGER_SITE_TOKEN }}
repository: axmolengine/axmolengine.github.io
event-type: forward-push