Skip to content

Commit b143e28

Browse files
committed
ci: add vcpkg-ios job
1 parent d47874e commit b143e28

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,63 @@ jobs:
408408
path: |
409409
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
410410
build/vcpkg/**/*.log
411+
##### vcpkg-ios #####
412+
vcpkg-ios:
413+
runs-on: macos-latest
414+
strategy:
415+
fail-fast: false
416+
matrix:
417+
config:
418+
- Debug
419+
- Release
420+
name: vcpkg - ios | ${{ matrix.config }}
421+
steps:
422+
- name: workaround python2 and python3 issue when upgrading python
423+
run : |
424+
rm -rf /usr/local/bin/2to3*
425+
rm -rf /usr/local/bin/idle3*
426+
rm -rf /usr/local/bin/pydoc3*
427+
rm -rf /usr/local/bin/python3
428+
rm -rf /usr/local/bin/python3-config
429+
rm -rf /usr/local/bin/python3*
430+
rm -rf /usr/local/bin/python3*-config
431+
- name: git clone
432+
uses: myci-actions/checkout@main
433+
with:
434+
submodules: true # non-recursive, no remote
435+
- name: install vcpkg
436+
run: |
437+
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
438+
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
439+
- name: set VCPKG_ROOT
440+
uses: myci-actions/export-env-var@main
441+
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
442+
- name: add VCPKG_ROOT to PATH
443+
uses: myci-actions/export-env-var@main
444+
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
445+
- name: add cppfw tap
446+
run: |
447+
brew tap cppfw/tap
448+
brew update
449+
- name: install ci tools
450+
run: brew install myci cmake
451+
- name: prepare vcpkg port
452+
run: |
453+
myci-vcpkg-prepare.sh --git-ref ${{ github.sha }}
454+
- name: test vcpkg port
455+
run: |
456+
cd build/vcpkg/test
457+
cmake -G Xcode -D CMAKE_SYSTEM_NAME=iOS -D VCPKG_TARGET_TRIPLET=arm64-ios-simulator .
458+
cmake --build . --parallel --config ${{ matrix.config }} -- -sdk iphonesimulator -arch arm64
459+
# ./test
460+
- name: upload vcpkg logs to artifacts
461+
if: always() # even if previous steps fail, this one needs to be run
462+
uses: actions/upload-artifact@v4
463+
with:
464+
name: vcpkg_ios_${{ matrix.config }}_logs
465+
path: |
466+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
467+
build/vcpkg/**/*.log
411468
##### conan - linux #####
412469
# conan-linux:
413470
# strategy:

build/vcpkg/test/vcpkg-configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
"kind": "git",
1010
"repository": "https://github.com/cppfw/vcpkg-repo/",
11-
"baseline": "ba96f67f3644424b96df93a912c4208b924109b3",
11+
"baseline": "fd1701bf8c2726d08959904a83c65d2ae3f67da9",
1212
"reference": "main",
1313
"packages": [
1414
"myci",

0 commit comments

Comments
 (0)