From d3e33b096f252eac3e075ffa1ff6035bb137487f Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Thu, 11 Aug 2022 13:14:02 +0300 Subject: [PATCH] prepare CI for iOS --- .github/workflows/github.yml | 8 ++++++++ CI/ios/before_install.sh | 7 +++++++ CI/ios/post_pack.sh | 3 +++ CMakePresets.json | 6 +++--- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100755 CI/ios/before_install.sh create mode 100755 CI/ios/post_pack.sh diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 2220e982e..0a29cdcef 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -90,6 +90,12 @@ jobs: preset: macos-arm-conan-ninja-release conan_profile: macos-arm artifact_platform: arm + - platform: ios + os: macos-12 + test: 0 + pack: 1 + extension: ipa + preset: ios-release - platform: mxe os: ubuntu-20.04 mxe: i686-w64-mingw32.shared @@ -189,6 +195,8 @@ jobs: cd '${{github.workspace}}/out/build/${{matrix.preset}}' CPACK_PATH=`which -a cpack | grep -m1 -v -i chocolatey` "$CPACK_PATH" -C ${{env.BUILD_TYPE}} ${{ matrix.cpack_args }} + test -f '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' \ + && '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' '${{github.workspace}}' "$(ls '${{ env.VCMI_PACKAGE_FILE_NAME }}'.*)" rm -rf _CPack_Packages - name: Additional logs diff --git a/CI/ios/before_install.sh b/CI/ios/before_install.sh new file mode 100755 index 000000000..137b3063f --- /dev/null +++ b/CI/ios/before_install.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +echo DEVELOPER_DIR=/Applications/Xcode_13.4.1.app >> $GITHUB_ENV + +curl -L 'https://github.com/kambala-decapitator/vcmi-ios-depends/releases/latest/download/vcmi-ios-depends-xc13.2.1.txz' \ + | tar -xf - +build/fix_install_paths.command diff --git a/CI/ios/post_pack.sh b/CI/ios/post_pack.sh new file mode 100755 index 000000000..8fc66bd3d --- /dev/null +++ b/CI/ios/post_pack.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +"$1/ios/zip2ipa.sh" "$2" diff --git a/CMakePresets.json b/CMakePresets.json index 8626fc6c1..14991651c 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -132,7 +132,7 @@ ], "cacheVariables": { "BUNDLE_IDENTIFIER_PREFIX": "eu.vcmi", - "CMAKE_PREFIX_PATH": "TODO" + "CMAKE_PREFIX_PATH": "${sourceDir}/build/iphoneos" } } ], @@ -187,11 +187,11 @@ "name": "ios-release", "configurePreset": "ios-release", "inherits": "default-release", + "configuration": "Release", "targets": ["vcmiclient"], "nativeToolOptions": [ "-quiet", - "CODE_SIGNING_ALLOWED_FOR_APPS=NO", - "GCC_OPTIMIZATION_LEVEL=3" + "CODE_SIGNING_ALLOWED_FOR_APPS=NO" ] } ],