Skip to content

Commit dd4c052

Browse files
committed
ci: add vcpkg-ios job
1 parent fb484b0 commit dd4c052

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
@@ -524,6 +524,62 @@ jobs:
524524
path: |
525525
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
526526
build/vcpkg/**/*.log
527+
##### vcpkg-ios #####
528+
vcpkg-ios:
529+
runs-on: macos-latest
530+
strategy:
531+
fail-fast: false
532+
matrix:
533+
config:
534+
- Debug
535+
- Release
536+
steps:
537+
- name: workaround python2 and python3 issue when upgrading python
538+
run : |
539+
rm -rf /usr/local/bin/2to3*
540+
rm -rf /usr/local/bin/idle3*
541+
rm -rf /usr/local/bin/pydoc3*
542+
rm -rf /usr/local/bin/python3
543+
rm -rf /usr/local/bin/python3-config
544+
rm -rf /usr/local/bin/python3*
545+
rm -rf /usr/local/bin/python3*-config
546+
- name: git clone
547+
uses: myci-actions/checkout@main
548+
with:
549+
submodules: true # non-recursive, no remote
550+
- name: install vcpkg
551+
run: |
552+
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
553+
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
554+
- name: set VCPKG_ROOT
555+
uses: myci-actions/export-env-var@main
556+
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
557+
- name: add VCPKG_ROOT to PATH
558+
uses: myci-actions/export-env-var@main
559+
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
560+
- name: add cppfw tap
561+
run: |
562+
brew tap cppfw/tap
563+
brew update
564+
- name: install ci tools
565+
run: brew install myci cmake
566+
- name: prepare vcpkg port
567+
run: |
568+
myci-vcpkg-prepare.sh --git-ref ${{ github.sha }}
569+
- name: test vcpkg port
570+
run: |
571+
cd build/vcpkg/test
572+
cmake -G Xcode -D CMAKE_SYSTEM_NAME=iOS -D VCPKG_TARGET_TRIPLET=arm64-ios-simulator .
573+
cmake --build . --parallel --config ${{ matrix.config }} -- -sdk iphonesimulator -arch arm64
574+
# ./test
575+
- name: upload vcpkg logs to artifacts
576+
if: always() # even if previous steps fail, this one needs to be run
577+
uses: actions/upload-artifact@v4
578+
with:
579+
name: vcpkg_ios_logs
580+
path: |
581+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
582+
build/vcpkg/**/*.log
527583
##### conan - linux #####
528584
conan-linux:
529585
strategy:

0 commit comments

Comments
 (0)