forked from KomodoPlatform/komodo-defi-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-ios-job.yml
49 lines (48 loc) · 1.73 KB
/
azure-pipelines-ios-job.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
parameters:
os: ''
jobs:
- job: MM2_iOS
timeoutInMinutes: 0 # 0 means infinite for self-hosted agent
pool:
name: Default
demands: agent.os -equals ${{ parameters.os }}
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: ${{ eq( variables['Build.Reason'], 'Schedule' ) }} # clean up only on Scheduled build
- bash: |
if [ $CLEANUP = "true" ]
then
git clean -ffdx
fi
displayName: Clean Up
failOnStderr: false
continueOnError: true
- bash: |
export TAG="$(git rev-parse --short=9 HEAD)"
echo "##vso[task.setvariable variable=COMMIT_HASH]${TAG}"
displayName: Setup ENV
- bash: |
VERSION=$(Build.BuildId)_$(Build.SourceBranchName)_$(COMMIT_HASH)_ios_aarch64_CI
if ! grep -q $VERSION MM_VERSION; then
echo $VERSION > MM_VERSION
fi
cat MM_VERSION
cargo rustc --target aarch64-apple-ios --lib --profile ci --package mm2_bin_lib --crate-type=staticlib
displayName: 'Build iOS lib'
env:
MANUAL_MM_VERSION: true
- bash: |
rm -rf upload
mkdir upload
mv target/aarch64-apple-ios/ci/libmm2lib.a upload/libmm2.a
zip upload/mm2-$(COMMIT_HASH)-ios-aarch64-CI upload/libmm2.a -j
rm upload/libmm2.a
displayName: 'Prepare upload'
- task: CopyFilesOverSSH@0
inputs:
sshEndpoint: nightly_build_server
sourceFolder: 'upload' # Optional
contents: "**"
targetFolder: "uploads/$(Build.SourceBranchName)" # Optional
overwrite: true
displayName: 'Upload nightly'