forked from mycelium-com/wallet-android
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (70 loc) · 2.43 KB
/
ci.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
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
jobs:
build:
if: '!contains(github.event.head_commit.message, ''#skip-ci'')
'
runs-on: self-hosted
steps:
- continue-on-error: true
uses: maxim-lobanov/setup-android-tools@v1
with:
packages: cmdline-tools;latest
- continue-on-error: true
name: Install deps
run: sudo apt-get install -y unzip diffutils
- continue-on-error: true
name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: '11'
- continue-on-error: true
uses: actions/checkout@v3
with:
submodules: recursive
- continue-on-error: true
run: ./gradlew clean test mbw::assembleProdnetDebug mbw::assembleBtctestnetDebug
mbw::assembleBtctestnetRelease
- continue-on-error: true
uses: actions/upload-artifact@v3
with:
path: mbw/build/outputs/apk/
- continue-on-error: true
name: Check Target SDK
run: 'target_sdk=$(/usr/local/lib/android/sdk/cmdline-tools/latest/bin/apkanalyzer
manifest target-sdk mbw/build/outputs/apk/btctestnet/release/mbw-btctestnet-release.apk)
echo "$target_sdk" | grep "^33$"
'
- continue-on-error: true
run: mv mbw/build/outputs/apk /tmp/buildA
- continue-on-error: true
name: Reproduce build
run: 'git reset --hard HEAD
git clean -dfx
cd fiosdk_kotlin
git reset --hard HEAD
git clean -dfx
cd ../wallet-android-modularization-tools
git reset --hard HEAD
git clean -dfx
cd ..
./gradlew clean mbw::assembleBtctestnetRelease
'
- continue-on-error: true
name: Unzip buildA
run: unzip -d buildA -qq /tmp/buildA/btctestnet/release/mbw-btctestnet-release.apk
- continue-on-error: true
name: Unzip buildB
run: unzip -d buildB -qq mbw/build/outputs/apk/btctestnet/release/mbw-btctestnet-release.apk
- continue-on-error: true
name: Compare builds
run: "set -x;\ndiffResult=$( diff --brief --recursive buildA buildB ) && diffExactlyTheSame=true;\n\
diffCount=$( echo \"$diffResult\" | grep -vcE \"(META-INF|^$)\" ) && diffSignificant=true;\n\
if ((diffCount != 0)); then\n exit 1;\nfi\n"
name: CI
on:
repository_dispatch:
types: trigger-ga___ci.yml