-
Notifications
You must be signed in to change notification settings - Fork 1
181 lines (181 loc) · 5.65 KB
/
ci.yml
File metadata and controls
181 lines (181 loc) · 5.65 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
name: ci
on:
push: {branches-ignore: [latest], tags: ['*']}
pull_request:
jobs:
##### deb linux #####
deb:
strategy:
fail-fast: false
matrix:
config:
- rel
- dbg
linux_image:
- arm64v8/debian:trixie
- debian:trixie
runs-on: ${{ (startsWith(matrix.linux_image, 'arm') && 'ubuntu-24.04-arm') || 'ubuntu-latest' }}
container: ${{ matrix.linux_image }}
name: linux - ${{ matrix.linux_image }} | ${{ matrix.config }}
steps:
- name: install build tools
run: |
apt --quiet update --yes
apt --quiet install --yes build-essential cmake pkg-config git curl zip unzip tar
- name: install build deps
run: |
apt --quiet install --yes libxmu-dev libxi-dev libgl-dev libgles-dev libgtk-4-dev
- name: git clone
uses: myci-actions/checkout@main
with:
submodules: true # non-recursive, no remote
- name: install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
- name: set VCPKG_ROOT
uses: myci-actions/export-env-var@main
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
- name: add VCPKG_ROOT to PATH
uses: myci-actions/export-env-var@main
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
- name: generate cmake build files
run: |
cmake build/cmake --preset native
- name: build
run: |
cd build/cmake
cmake --build --preset ${{ matrix.config }}
- name: test
run: |
cd build/cmake
cmake --build --preset ${{ matrix.config }} --target test
##### macosx #####
macosx:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
config:
- rel
- dbg
steps:
- name: workaround python2 and python3 issue when upgrading python
run : |
rm -rf /usr/local/bin/2to3*
rm -rf /usr/local/bin/idle3*
rm -rf /usr/local/bin/pydoc3*
rm -rf /usr/local/bin/python3
rm -rf /usr/local/bin/python3-config
rm -rf /usr/local/bin/python3*
rm -rf /usr/local/bin/python3*-config
- name: git clone
uses: myci-actions/checkout@main
with:
submodules: true # non-recursive, no remote
- name: install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
- name: set VCPKG_ROOT
uses: myci-actions/export-env-var@main
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
- name: add VCPKG_ROOT to PATH
uses: myci-actions/export-env-var@main
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
- name: install ci tools
run: brew install cmake
- name: generate cmake build files
run: |
cmake build/cmake --preset native
- name: build
run: |
cd build/cmake
cmake --build --preset ${{ matrix.config }}
- name: test
run: |
cd build/cmake
cmake --build --preset ${{ matrix.config }} --target test
##### windows #####
windows:
runs-on: windows-latest
defaults:
run:
shell: powershell
strategy:
fail-fast: false
matrix:
config:
- rel
- dbg
arch:
- Win32
- x64
name: windows
steps:
- name: git clone
uses: actions/checkout@v4
with:
submodules: true # non-recursive, no remote
- name: set VCPKG_ROOT
uses: myci-actions/export-env-var-powershell@main
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
# but on practice it is not set, so specify vcpkg root path explicitly
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
- name: generate cmake build files
run: |
cmake build/cmake --preset native -A ${{ matrix.arch }}
- name: build
run: |
cd build/cmake
cmake --build --preset ${{ matrix.config }}
- name: test
run: |
cd build/cmake
cmake --build --preset ${{ matrix.config }} --target test
##### ios #####
ios:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
config:
- rel
- dbg
steps:
- name: workaround python2 and python3 issue when upgrading python
run : |
rm -rf /usr/local/bin/2to3*
rm -rf /usr/local/bin/idle3*
rm -rf /usr/local/bin/pydoc3*
rm -rf /usr/local/bin/python3
rm -rf /usr/local/bin/python3-config
rm -rf /usr/local/bin/python3*
rm -rf /usr/local/bin/python3*-config
- name: git clone
uses: myci-actions/checkout@main
with:
submodules: true # non-recursive, no remote
- name: install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
- name: set VCPKG_ROOT
uses: myci-actions/export-env-var@main
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
- name: add VCPKG_ROOT to PATH
uses: myci-actions/export-env-var@main
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
- name: install ci tools
run: brew install cmake
- name: generate cmake build files
run: |
cmake build/cmake --preset ios
- name: build
run: |
cd build/cmake
cmake --build --preset ios-${{ matrix.config }}
# - name: test
# run: |
# cd build/cmake
# cmake --build --preset ios-${{ matrix.config }} --target test