-
Notifications
You must be signed in to change notification settings - Fork 0
235 lines (198 loc) · 7.26 KB
/
xmake.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
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
name: XMake
on:
push:
branches: ["*"]
jobs:
linux-gcc-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [13]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt-get -y update
sudo apt-get -y install xmake
- name: Install Toolchains PPA
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
- name: Install GCC
run: sudo apt-get -y install gcc-${{matrix.version}} g++-${{matrix.version}}
- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=gcc-${{matrix.version}} --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake b
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -v
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=gcc-${{matrix.version}} "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=gcc-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
linux-clang-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt-get -y update
sudo apt-get -y install xmake
- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get -y install clang-tidy-${{matrix.version}}
- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f
- name: Configure
working-directory: ${{github.workspace}}
run: |
rm -rf build .xmake
xmake f -c -y --toolchain=clang-${{matrix.version}} --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b
xmake check clang.tidy
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -v
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=clang-${{matrix.version}} "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
windows-msvc-x64:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Setup scoop
uses: MinoruSekine/setup-scoop@v2
with:
buckets: extras
scoop_checkup: true
scoop_update: true
update_path: true
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: Install XMake
run: |
scoop install xmake
xmake update -sfy master
Start-Sleep -Seconds 2
xmake update -fy master
- name: Configure
working-directory: ${{github.workspace}}
run: |
xmake f -c -y --toolchain=msvc --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake b
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -v
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=msvc "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=msvc --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
macos-clang-x64:
runs-on: macos-13
strategy:
matrix:
version: [16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
brew update
brew install xmake
- name: Install LLVM
run: |
brew install llvm@${{matrix.version}}
echo "PATH=$(brew --prefix llvm@${{matrix.version}})/bin:$PATH" >> $GITHUB_ENV
echo "CC=$(brew --prefix llvm@${{matrix.version}})/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@${{matrix.version}})/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS='-L$(brew --prefix llvm@${{matrix.version}})/lib/c++ -Wl,-rpath,$(brew --prefix llvm@${{matrix.version}})/lib/c++'" >> $GITHUB_ENV
- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=clang --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b
xmake check clang.tidy
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -v
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=clang "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"