try #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ios | |
on: | |
push: | |
paths: | |
- 'vcpkg-test/**' | |
- 'vcpkg-overlay/**' | |
- '.github/workflows/ios.yml' | |
release: | |
types: | |
- published | |
concurrency: | |
group: ci-${{github.ref}}-ios | |
cancel-in-progress: true | |
jobs: | |
ios_build: | |
runs-on: macos-12 | |
env: | |
IOS_MIN_SDK_VERSION: '14.0' # iOS Deployment target | |
QT_VERSION: '6.5.2' | |
ARCH: 'arm64' | |
CACHE_VERSION: 0 | |
XC_VERSION: ${{ '14.2' }} | |
VCPKG_BASELINE: "2f6176ce98fee807a207dc9e8fec213f111c291b" # use scripts/update_vcpkg_base.bash to change | |
VCPKG_ROOT: "/Users/runner/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB) | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Select latest Xcode | |
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" | |
- uses: lukka/get-cmake@latest # cmake & ninja | |
- name: Install Qt (android) | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ env.QT_VERSION }} | |
setup-python: 'false' | |
modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools' | |
dir: ${{ github.workspace }} | |
target: ios | |
cache: true | |
cache-key-prefix: ${{ runner.os }}-QtCache-v2-${{ env.QT_VERSION }}-ios | |
- name: Install Qt (desktop) | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ env.QT_VERSION }} | |
setup-python: 'false' | |
modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools' | |
dir: ${{ github.workspace }} | |
target: desktop | |
cache: true | |
cache-key-prefix: ${{ runner.os }}-QtCache-v2-${{ env.QT_VERSION }}-desktop | |
- name: Restore cached vcpkg build folder | |
id: cache-vcpkg-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ env.VCPKG_ROOT }} | |
key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} | |
- name: Clone vcpkg | |
if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p "${{ env.VCPKG_ROOT }}" | |
cd "${{ env.VCPKG_ROOT }}" | |
git init | |
git remote add origin https://github.com/microsoft/vcpkg.git | |
git pull origin master | |
git checkout $VCPKG_BASELINE | |
- name: Build SDK ${{ env.ARCH }}-ios | |
run: | | |
mkdir -p ${{ github.workspace }}/build/${{ env.ARCH }} | |
cd ${{ github.workspace }}/build/${{ env.ARCH }} | |
cmake -B ${{ github.workspace }}/build/${{ env.ARCH }} \ | |
-S ${{ github.workspace }}/vcpkg-test \ | |
-DCMAKE_MODULE_PATH:PATH="${{ github.workspace }}/vcpkg-test/cmake" \ | |
-DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ | |
-G Ninja \ | |
-DVCPKG_TARGET_TRIPLET=${{ env.ARCH }}-ios \ | |
-DVCPKG_OVERLAY_TRIPLETS:PATH="${{ github.workspace }}/vcpkg-overlay/triplets" \ | |
-DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports" | |
- name: Upload build logs on deps failure | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: build-logs-${{ env.ARCH }}-ios | |
path: | | |
${{ env.VCPKG_ROOT }}/buildtrees/**/*.log | |
- name: Save cached vcpkg build folder | |
uses: actions/cache/save@v3 | |
if: always() | |
id: cache-vcpkg-save | |
with: | |
path: ${{ env.VCPKG_ROOT }} | |
key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} | |
- name: Build Test App | |
run: | | |
cd ${{ github.workspace }}/build/${{ env.ARCH }} | |
ninja | |
- name: Get TimeStamp | |
id: time | |
uses: nanzm/[email protected] | |
with: | |
timeZone: 8 | |
format: 'YYYYMMDD' | |
- name: Create package | |
run: | | |
SDK_TAR=input-sdk-qt-${{ env.QT_VERSION }}-ios-${{ steps.time.outputs.time }}-${{ github.run_number }}.tar.gz | |
echo "SDK_TAR=${SDK_TAR}" >> $GITHUB_ENV | |
cd "${{ github.workspace }}/build/stage" | |
tar -c -z --exclude=*.pyc -f ${{ github.workspace }}/${SDK_TAR} ./ | |
- name: Upload Sdk in Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
path: ${{ github.workspace }}/${{ env.SDK_TAR }} | |
- name: Create Release | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ios-${{ steps.time.outputs.time }}-${{ github.run_number }} | |
allowUpdates: true | |
artifacts: ${{ env.SDK_TAR }} | |
token: ${{ secrets.GITHUB_TOKEN }} |