Try autodesktop #7244
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: π iOS | |
on: | |
push: | |
branches: | |
- master | |
- release-** | |
- autodesktop | |
pull_request: | |
release: | |
types: ['published'] | |
jobs: | |
build: | |
name: build (ios) | |
runs-on: macos-12 | |
env: | |
DEPLOYMENT_TARGET: '14.0' | |
BUILD_TYPE: 'Release' | |
TRIPLET: 'arm64-ios' | |
steps: | |
- name: π£ Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: πΎ Prepare variables | |
id: vars | |
shell: bash | |
run: | | |
./scripts/ci/env_gh.sh | |
echo "INSTALL_QT_VERSION=6.6.0" >> $GITHUB_ENV | |
- uses: Apple-Actions/import-codesign-certs@v2 | |
with: | |
p12-file-base64: ${{ env.CI_USE_IOS_DIST_CERT && secrets.APPLE_CODESIGN_CERT_BASE64_DIST || secrets.APPLE_CODESIGN_CERT_BASE64_DEV }} | |
p12-password: ${{ env.CI_USE_IOS_DIST_CERT && secrets.APPLE_CODESIGN_CERT_PASS_DIST || secrets.APPLE_CODESIGN_CERT_PASS_DEV }} | |
- uses: Apple-Actions/download-provisioning-profiles@v1 | |
with: | |
bundle-id: ch.opengis.qfield | |
issuer-id: ${{ secrets.IOS_APPSTORE_ISSUER_ID }} | |
api-key-id: ${{ secrets.IOS_APPSTORE_KEY_ID }} | |
api-private-key: ${{ secrets.IOS_APPSTORE_PRIVATE_KEY }} | |
- name: π Install Qt | |
uses: jurplel/install-qt-action@not-ready-v4-not-ready | |
with: | |
version: ${{ env.INSTALL_QT_VERSION }} | |
modules: 'qt5compat qtcharts qtpositioning qtconnectivity qtimageformats qtmultimedia qtwebview qtsensors' | |
target: ios | |
cache: true | |
- name: Prepare ios build env | |
run: | | |
brew install automake bison flex gnu-sed s3cmd gettext | |
echo $(brew --prefix bison)/bin >> $GITHUB_PATH | |
echo $(brew --prefix flex)/bin >> $GITHUB_PATH | |
echo $(brew --prefix s3cmd)/bin >> $GITHUB_PATH | |
echo $(brew --prefix gettext)/bin >> $GITHUB_PATH | |
- uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: latest-stable | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ccache-ios | |
max-size: 200M | |
- name: π± Install dependencies and generate project files | |
run: | | |
source ./scripts/version_number.sh | |
source ./scripts/ci/generate-version-details.sh | |
mkdir -p build | |
cmake -S "${{ github.workspace }}" \ | |
-B "/Users/runner/builddir" \ | |
-G "Xcode" \ | |
-D CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
-D SYSTEM_QT=ON \ | |
-D VCPKG_TARGET_TRIPLET="${{ env.TRIPLET }}" \ | |
-D WITH_VCPKG=ON \ | |
-D WITH_SPIX=OFF \ | |
-D CMAKE_PREFIX_PATH=${Qt6_DIR} \ | |
-D WITH_BLUETOOTH=OFF \ | |
-D WITH_SERIALPORT=OFF \ | |
-D APP_VERSION="${APP_VERSION}" \ | |
-D APK_VERSION_CODE="${APK_VERSION_CODE}" \ | |
-D APP_VERSION_STR="${APP_VERSION_STR}" \ | |
-D APP_PACKAGE_NAME="${APP_PACKAGE_NAME}" \ | |
-D APP_NAME="${APP_NAME}" \ | |
-D NUGET_USERNAME=opengisch \ | |
-D NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }} \ | |
-D SENTRY_DSN=${{ secrets.SENTRY_DSN }} \ | |
-D SENTRY_ENV="${APP_ENV}" \ | |
-D ENABLE_BITCODE=OFF \ | |
-D ENABLE_ARC=ON \ | |
-D QT_IOS_TEAM_ID="${{ secrets.IOS_TEAM_ID }}" \ | |
-D QT_IOS_CODE_SIGN_IDENTITY="${{env.CI_USE_IOS_DIST_CERT && 'Apple Distribution' || 'Apple Development' }}" \ | |
-D QT_IOS_PROVISIONING_PROFILE_SPECIFIER="${{env.CI_USE_IOS_DIST_CERT && secrets.IOS_PROVISIONING_PROFILE_SPECIFIER || secrets.IOS_PROVISIONING_PROFILE_SPECIFIER_DEV }}" \ | |
-D QT_IOS_EXPORT_METHOD="${{env.CI_USE_IOS_DIST_CERT && 'app-store' || 'development' }}" \ | |
-D CMAKE_SYSTEM_NAME=iOS \ | |
-D CMAKE_SYSTEM_PROCESSOR=aarch64 \ | |
-D CMAKE_OSX_DEPLOYMENT_TARGET=${{ env.DEPLOYMENT_TARGET }} \ | |
-D QT_HOST_PATH=${{ github.workspace }}/../Qt/${{ env.INSTALL_QT_VERSION }}/macos \ | |
-D QT_HOST_PATH_CMAKE_DIR:PATH=${{ github.workspace }}/../Qt/${{ env.INSTALL_QT_VERSION }}/macos \ | |
-D ENABLE_TESTS=OFF \ | |
-D CMAKE_CXX_VISIBILITY_PRESET=hidden \ | |
-D WITH_CCACHE=ON | |
- name: π Upload Dep Build Logs | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: build-logs-${{ env.TRIPLET }} | |
path: | | |
/Users/runner/builddir/**/*.log | |
# Not required, packaging does it all | |
# - name: π Build | |
# run: | | |
# cmake --build /Users/runner/builddir --config ${{ env.BUILD_TYPE }} # --target qfield | |
- name: Package | |
run: | | |
cmake --build /Users/runner/builddir --target bundle --config Release | |
- name: πΊ Deploy | |
env: | |
PLIST_URL: https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.pList | |
IPA_URL: https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa | |
run: | | |
mv /Users/runner/builddir/qfieldIpa/qfield.ipa qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa | |
if [[ -n "${{ secrets.S3CFG }}" ]] | |
then | |
echo "${{ secrets.S3CFG }}" > ~/.s3cfg | |
envsubst < ${{ github.workspace }}/platform/ios/installation-template.html > qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.html | |
envsubst < ${{ github.workspace }}/platform/ios/installation-template.plist > qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.plist | |
s3cmd put --acl-public -m 'text/html' qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.html s3://qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.html | |
s3cmd put --acl-public -m 'application/xml' qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.pList s3://qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.pList | |
s3cmd put --acl-public qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa s3://qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa | |
echo "Install the ipa from https://sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.html" | |
rm ~/.s3cfg | |
fi | |
- name: π¦ Upload qfield Ipa | |
uses: actions/upload-artifact@v3 | |
with: | |
name: qfield-${{ env.TRIPLET }}-${{ env.DEPLOYMENT_TARGET }}.ipa | |
path: qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa | |
- name: π Release to TestFlight | |
uses: Apple-Actions/upload-testflight-build@v1 | |
if: ${{ env.CI_USE_IOS_DIST_CERT }} | |
with: | |
app-path: qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa | |
issuer-id: ${{ secrets.IOS_APPSTORE_ISSUER_ID }} | |
api-key-id: ${{ secrets.IOS_APPSTORE_KEY_ID }} | |
api-private-key: ${{ secrets.IOS_APPSTORE_PRIVATE_KEY }} | |
# Disabled: Is not able to resolve the id of the build at the moment | |
# | |
# - name: Enable public testers | |
# if:env.CI_USE_IOS_DIST_CERT | |
# run: | | |
# source ./scripts/version_number.sh | |
# source ./scripts/ci/generate-version-details.sh | |
# # Enable public testers | |
# pip install PyJWT cryptography | |
# | |
# # retry a couple of times, appstore needs some time | |
# for i in {1..100}; | |
# do | |
# build_id=$(./scripts/ci/appstore_connect.py --key_id ${{ secrets.IOS_APPSTORE_KEY_ID }} --issuer_id ${{ secrets.IOS_APPSTORE_ISSUER_ID }} --private_key "${{ secrets.IOS_APPSTORE_PRIVATE_KEY }}" build_id_by_version ${APK_VERSION_CODE}) && | |
# break || | |
# sleep 15; | |
# done | |
# public_testers_id="7bca90ae-e44b-4d20-bf71-17a8dced5a01" | |
# ./scripts/ci/appstore_connect.py --key_id ${{ secrets.IOS_APPSTORE_KEY_ID }} --issuer_id ${{ secrets.IOS_APPSTORE_ISSUER_ID }} --private_key "${{ secrets.IOS_APPSTORE_PRIVATE_KEY }}" add_to_beta_group ${public_testers_id} ${build_id} | |
- name: π Upload Release Asset | |
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}.ipa | |
asset_name: qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-${{ env.TRIPLET }}-${{ env.DEPLOYMENT_TARGET }}.ipa | |
asset_content_type: application/zip | |
- name: Upload debug symbols | |
# if: release or labeled PR | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: | | |
curl -sL https://sentry.io/get-cli/ | bash | |
sentry-cli upload-dif -o opengisch -p qfield /Users/runner/builddir |