-
Notifications
You must be signed in to change notification settings - Fork 94
152 lines (152 loc) · 5.68 KB
/
xcode-local-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Build OsmAndMaps (self hosted)
# 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/r4.6
path: ios
clean: false
- name: Checkout android
uses: actions/checkout@v3
with:
ref: refs/heads/r4.6
repository: osmandapp/OsmAnd
path: android
clean: false
- name: Checkout build
uses: actions/checkout@v3
with:
ref: refs/heads/r4.6
repository: osmandapp/OsmAnd-build
path: build
clean: false
- name: Checkout core legacy
uses: actions/checkout@v3
with:
ref: refs/heads/r4.6
repository: osmandapp/OsmAnd-core-legacy
path: core-legacy
clean: false
- name: Checkout core
uses: actions/checkout@v3
with:
ref: refs/heads/r4.6
repository: osmandapp/OsmAnd-core
path: core
clean: false
- name: Checkout help
uses: actions/checkout@v3
with:
ref: refs/heads/r4.6
repository: osmandapp/osmandapp.github.io
path: help
clean: false
- name: Checkout resources
uses: actions/checkout@v3
with:
ref: refs/heads/r4.6
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 keychain
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 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'