Skip to content

Commit abbb667

Browse files
committed
ci: add vcpkg-ios job
1 parent 493b42c commit abbb667

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,62 @@ jobs:
622622
path: |
623623
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
624624
build/vcpkg/**/*.log
625+
##### vcpkg-ios #####
626+
vcpkg-ios:
627+
runs-on: macos-latest
628+
strategy:
629+
fail-fast: false
630+
matrix:
631+
config:
632+
- Debug
633+
- Release
634+
steps:
635+
- name: workaround python2 and python3 issue when upgrading python
636+
run : |
637+
rm -rf /usr/local/bin/2to3*
638+
rm -rf /usr/local/bin/idle3*
639+
rm -rf /usr/local/bin/pydoc3*
640+
rm -rf /usr/local/bin/python3
641+
rm -rf /usr/local/bin/python3-config
642+
rm -rf /usr/local/bin/python3*
643+
rm -rf /usr/local/bin/python3*-config
644+
- name: git clone
645+
uses: myci-actions/checkout@main
646+
with:
647+
submodules: true # non-recursive, no remote
648+
- name: install vcpkg
649+
run: |
650+
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
651+
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
652+
- name: set VCPKG_ROOT
653+
uses: myci-actions/export-env-var@main
654+
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
655+
- name: add VCPKG_ROOT to PATH
656+
uses: myci-actions/export-env-var@main
657+
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
658+
- name: add cppfw tap
659+
run: |
660+
brew tap cppfw/tap
661+
brew update
662+
- name: install ci tools
663+
run: brew install myci cmake
664+
- name: prepare vcpkg port
665+
run: |
666+
myci-vcpkg-prepare.sh --git-ref ${{ github.sha }}
667+
- name: test vcpkg port
668+
run: |
669+
cd build/vcpkg/test
670+
cmake -G Xcode -D CMAKE_SYSTEM_NAME=iOS -D VCPKG_TARGET_TRIPLET=arm64-ios-simulator .
671+
cmake --build . --parallel --config ${{ matrix.config }} -- -sdk iphonesimulator -arch arm64
672+
# ./test
673+
- name: upload vcpkg logs to artifacts
674+
if: always() # even if previous steps fail, this one needs to be run
675+
uses: actions/upload-artifact@v4
676+
with:
677+
name: vcpkg_ios_${{ matrix.config }}_logs
678+
path: |
679+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
680+
build/vcpkg/**/*.log
625681
##### conan - linux #####
626682
conan-linux:
627683
strategy:

0 commit comments

Comments
 (0)