-
Notifications
You must be signed in to change notification settings - Fork 324
76 lines (61 loc) · 2.14 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
name: CI
on:
pull_request:
branches: ['**']
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
if: >
!contains(github.event.head_commit.message, '#skip-ci')
runs-on: ubuntu-latest
steps:
- name: Install deps
run: sudo apt-get install -y unzip diffutils
- name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
#need for java 11, latest version work only with jav 17
cmdline-tools-version: 8512546
- run: ./gradlew clean test mbw::assembleProdnetDebug mbw::assembleBtctestnetDebug mbw::assembleBtctestnetRelease
- uses: actions/upload-artifact@v3
with:
path: mbw/build/outputs/apk/
- 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$"
- run: mv mbw/build/outputs/apk /tmp/buildA
- 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
- name: Unzip buildA
run: unzip -d buildA -qq /tmp/buildA/btctestnet/release/mbw-btctestnet-release.apk
- name: Unzip buildB
run: unzip -d buildB -qq mbw/build/outputs/apk/btctestnet/release/mbw-btctestnet-release.apk
- name: Compare builds
run: |
set -x;
diffResult=$( diff --brief --recursive buildA buildB ) && diffExactlyTheSame=true;
diffCount=$( echo "$diffResult" | grep -vcE "(META-INF|^$)" ) && diffSignificant=true;
if ((diffCount != 0)); then
exit 1;
fi