Skip to content

Commit ec59d48

Browse files
committed
ci: add ios job
1 parent 1178d8c commit ec59d48

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,51 @@ jobs:
139139
run: |
140140
cd out
141141
cmake --build . --config ${{ matrix.config }} --target test
142+
##### ios #####
143+
ios:
144+
runs-on: macos-latest
145+
strategy:
146+
fail-fast: false
147+
matrix:
148+
config:
149+
- Debug
150+
- Release
151+
steps:
152+
- name: workaround python2 and python3 issue when upgrading python
153+
run : |
154+
rm -rf /usr/local/bin/2to3*
155+
rm -rf /usr/local/bin/idle3*
156+
rm -rf /usr/local/bin/pydoc3*
157+
rm -rf /usr/local/bin/python3
158+
rm -rf /usr/local/bin/python3-config
159+
rm -rf /usr/local/bin/python3*
160+
rm -rf /usr/local/bin/python3*-config
161+
- name: git clone
162+
uses: myci-actions/checkout@main
163+
with:
164+
submodules: true # non-recursive, no remote
165+
- name: install vcpkg
166+
run: |
167+
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
168+
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
169+
- name: set VCPKG_ROOT
170+
uses: myci-actions/export-env-var@main
171+
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
172+
- name: add VCPKG_ROOT to PATH
173+
uses: myci-actions/export-env-var@main
174+
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
175+
- name: install ci tools
176+
run: brew install cmake
177+
- name: generate cmake build files
178+
run: |
179+
mkdir out
180+
cd out
181+
cmake -G Xcode -DCMAKE_SYSTEM_NAME=iOS ../build/cmake
182+
- name: build
183+
run: |
184+
cd out
185+
cmake --build . --parallel --config ${{ matrix.config }} -- -sdk iphonesimulator -arch arm64
186+
# - name: test
187+
# run: |
188+
# cd out
189+
# cmake --build . --parallel --config ${{ matrix.config }} --target test -- -sdk iphonesimulator -arch arm64

0 commit comments

Comments
 (0)