Skip to content

Build OsmAndMaps (self hosted test) #2

Build OsmAndMaps (self hosted test)

Build OsmAndMaps (self hosted test) #2

name: Build OsmAndMaps (self hosted test)
# 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.6.2'
jobs:
build:
runs-on: self-hosted
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/master
path: ios
clean: false
- name: Checkout android
uses: actions/checkout@v3
with:
ref: refs/heads/master
repository: osmandapp/OsmAnd
path: android
clean: false
- name: Checkout build
uses: actions/checkout@v3
with:
ref: refs/heads/master
repository: osmandapp/OsmAnd-build
path: build
clean: false
- name: Checkout core legacy
uses: actions/checkout@v3
with:
ref: refs/heads/master
repository: osmandapp/OsmAnd-core-legacy
path: core-legacy
clean: false
- name: Checkout core
uses: actions/checkout@v3
with:
ref: refs/heads/master
repository: osmandapp/OsmAnd-core
path: core
clean: false
- name: Checkout help
uses: actions/checkout@v3
with:
ref: refs/heads/master
repository: osmandapp/osmandapp.github.io
path: help
clean: false
- name: Checkout resources
uses: actions/checkout@v3
with:
ref: refs/heads/master
repository: osmandapp/OsmAnd-resources
path: resources
clean: false
#- name: Select XCode 15.0.1
# run: sudo xcode-select -switch /Applications/Xcode_15.0.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: Setup provisioning profile
env:
USER_KEY: ${{ secrets.USER_KEY }}
run: 'security unlock-keychain -p ${USER_KEY} ~/Library/Keychains/login.keychain-db'
- name: Build QtCore & prepare build
run: exec ios/prepare.sh #--sync_translations
- 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 Release
CURRENT_PROJECT_VERSION="${RELEASE_IOS_VERSION}.${BUILD_IOS_VERSION}"
MARKETING_VERSION="${RELEASE_IOS_VERSION}"
CODE_SIGN_IDENTITY="iPhone Distribution"
PROVISIONING_PROFILE_SPECIFIER="Github Build" | 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: 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'