Build OsmAndMaps #339
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 OsmAndMaps | |
# on: | |
# push: | |
# branches: [ master ] | |
# pull_request: | |
# branches: [ master ] | |
on: | |
workflow_dispatch: | |
inputs: | |
buildversion: | |
description: 'Consequent Build Number (Testflight)' | |
required: true | |
default: 'x' | |
releaseversion: | |
description: 'Release Version' | |
required: true | |
default: '4.5.0' | |
download_qt_ios_library: | |
description: 'Download prebuilt qt library (true) or build locally (false) - extra 2 h' | |
required: true | |
default: true | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
#- uses: maxim-lobanov/setup-xcode@v1 | |
# with: | |
# xcode-version: latest | |
# - name: Install xcode tools | |
# run: sudo xcode-select --install | |
# - name: Install brew | |
# run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# - name: Install svn | |
# run: brew install svn | |
# - name: Install cocoapods | |
# run: gem install cocoapods | |
### https://github.com/Kitware/CMake/releases/download/v3.11.2/cmake-3.11.2-Darwin-x86_64.dmg | |
# - name: Check cmake | |
# run: cmake --version | |
# - name: Check clang | |
# run: ls /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/ | |
# - name: Install gpg | |
# run: brew install gnupg | |
### Checks-out repository under $GITHUB_WORKSPACE, so job can access it | |
- name: Checkout ios | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
path: ios | |
- name: Checkout android | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
repository: osmandapp/OsmAnd | |
path: android | |
- name: Checkout build | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
repository: osmandapp/OsmAnd-build | |
path: build | |
- name: Checkout core legacy | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
repository: osmandapp/OsmAnd-core-legacy | |
path: core-legacy | |
- name: Checkout core | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
repository: osmandapp/OsmAnd-core | |
path: core | |
- name: Checkout help | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
repository: osmandapp/osmandapp.github.io | |
path: help | |
- name: Checkout resources | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/heads/r4.5 | |
repository: osmandapp/OsmAnd-resources | |
path: resources | |
- name: Select XCode 14.3.1 | |
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app | |
# - name: Patch __bsfd | |
# run: sudo patch /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/ia32intrin.h ios/.github/workflows/__bsfd.patch | |
- name: Setup provisioning profile | |
env: | |
IOS_KEYS: ${{ secrets.IOS_KEYS }} | |
PASSWORD_KEYCHAIN_EXPORT: ${{ secrets.PASSWORD_KEYCHAIN_EXPORT }} | |
run: .github/secrets/decrypt_secrets.sh | |
working-directory: ios | |
- name: Build QtCore & prepare build | |
env: | |
BUILT_QT_FILES_ZIPFILE: qt-ios-prebuilt.zip | |
DOWNLOAD_PREBUILT_QT_FILES: ${{ github.event.inputs.download_qt_ios_library }} | |
run: exec ios/prepare.sh #--sync_translations | |
- name: Upload qt-ios-prebuilt | |
uses: actions/upload-artifact@v2 | |
with: | |
name: qt-ios-prebuilt.zip | |
path: qt-ios-prebuilt.zip | |
- name: Configure iOS OsmAndCore | |
run: 'xcodebuild -project OsmAnd_projects.xcodeproj -target ZERO_CHECK -sdk iphoneos -configuration Release' | |
working-directory: baked/fat-ios-clang.xcode | |
- name: Build iOS OsmAndCore | |
run: 'xcodebuild -project OsmAnd_projects.xcodeproj -target OsmAndCore_static_standalone -sdk iphoneos -configuration Release' | |
working-directory: baked/fat-ios-clang.xcode | |
- name: Creating iOS archive | |
env: | |
BUILD_IOS_VERSION: ${{ github.event.inputs.buildversion }} | |
RELEASE_IOS_VERSION: ${{ github.event.inputs.releaseversion }} | |
run: 'xcodebuild | |
-workspace ios/OsmAnd.xcworkspace | |
-scheme "OsmAnd Maps Release" | |
-sdk iphoneos | |
-configuration AppStoreDistribution | |
-archivePath OsmAndMaps.xcarchive | |
CURRENT_PROJECT_VERSION="${RELEASE_IOS_VERSION}.${BUILD_IOS_VERSION}" | |
MARKETING_VERSION="${RELEASE_IOS_VERSION}" | |
CODE_SIGN_IDENTITY="iPhone Distribution" | |
PROVISIONING_PROFILE_SPECIFIER="Github Build" | |
archive | xcpretty' | |
- name: Zip iOS archive | |
run: 'zip -r OsmAndMaps.xcarchive.zip OsmAndMaps.xcarchive' | |
- name: Upload maps archive zip | |
uses: actions/upload-artifact@v2 | |
with: | |
name: OsmAndMaps-${{ github.event.inputs.releaseversion }}.${{ github.event.inputs.buildversion }}.xcarchive.zip | |
path: OsmAndMaps.xcarchive.zip | |
# - name: Download iOS archive | |
# run: 'wget "https://builder.osmand.net/binaries/ios/OsmAndMaps.xcarchive.zip" -O OsmAndMaps.xcarchive.zip' | |
# - name: Unzip iOS archive | |
# run: 'unzip OsmAndMaps.xcarchive.zip' | |
- name: Export iOS archive | |
run: 'xcodebuild -archivePath OsmAndMaps.xcarchive | |
-exportOptionsPlist ios/exportOptions.plist | |
-exportPath . | |
-allowProvisioningUpdates | |
-exportArchive' | |
- name: Upload maps archive | |
uses: actions/upload-artifact@v2 | |
with: | |
name: OsmAndMaps-${{ github.event.inputs.releaseversion }}.${{ github.event.inputs.buildversion }}.ipa | |
path: 'OsmAnd Maps.ipa' | |
- name: Publish TestFlight | |
env: | |
APPLEID_USERNAME: ${{ secrets.APPLEID_USERNAME }} | |
APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} | |
run: 'xcrun altool --upload-app -t ios -f "OsmAnd Maps.ipa" -u "$APPLEID_USERNAME" -p "$APPLEID_PASSWORD" --verbose' |