forked from mycelium-com/wallet-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2476d9
commit fb61e9b
Showing
2 changed files
with
82 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,86 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: ['**'] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
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: ubuntu-latest | ||
steps: | ||
if: '!contains(github.event.head_commit.message, ''#skip-ci'') | ||
|
||
- uses: maxim-lobanov/setup-android-tools@v1 | ||
' | ||
runs-on: self-hosted | ||
steps: | ||
- continue-on-error: true | ||
uses: maxim-lobanov/setup-android-tools@v1 | ||
with: | ||
packages: cmdline-tools;latest | ||
|
||
- name: Install deps | ||
- continue-on-error: true | ||
name: Install deps | ||
run: sudo apt-get install -y unzip diffutils | ||
|
||
- name: Set up JDK environment | ||
- continue-on-error: true | ||
name: Set up JDK environment | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
distribution: zulu | ||
java-version: '11' | ||
|
||
- uses: actions/checkout@v3 | ||
- continue-on-error: true | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- run: ./gradlew clean test mbw::assembleProdnetDebug mbw::assembleBtctestnetDebug mbw::assembleBtctestnetRelease | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- 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) | ||
|
||
- 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 | ||
' | ||
- continue-on-error: true | ||
run: mv mbw/build/outputs/apk /tmp/buildA | ||
- continue-on-error: true | ||
name: Reproduce build | ||
run: 'git reset --hard HEAD | ||
|
||
- 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 | ||
' | ||
- continue-on-error: true | ||
name: Unzip buildA | ||
run: unzip -d buildA -qq /tmp/buildA/btctestnet/release/mbw-btctestnet-release.apk | ||
|
||
- name: Unzip buildB | ||
- continue-on-error: true | ||
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 | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,46 @@ | ||
name: RC | ||
on: | ||
push: | ||
branches: [master, ci-build-rc] | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }} | ||
jobs: | ||
build: | ||
if: > | ||
!contains(github.event.head_commit.message, '#skip-ci') | ||
runs-on: ubuntu-latest | ||
steps: | ||
if: '!contains(github.event.head_commit.message, ''#skip-ci'') | ||
|
||
- uses: actions/checkout@v3 | ||
' | ||
runs-on: self-hosted | ||
steps: | ||
- continue-on-error: true | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: docker/build-push-action@v4 | ||
- continue-on-error: true | ||
uses: docker/build-push-action@v4 | ||
with: | ||
tags: mycelium_builder:latest | ||
push: false | ||
context: ${{ github.workspace }} | ||
|
||
- uses: addnab/docker-run-action@v3 | ||
push: false | ||
tags: mycelium_builder:latest | ||
- continue-on-error: true | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: mycelium_builder:latest | ||
options: > | ||
--volume ${{ github.workspace }}:/app/ | ||
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined | ||
run: | | ||
mkdir /project/ | ||
options: '--volume ${{ github.workspace }}:/app/ --device /dev/fuse --cap-add | ||
SYS_ADMIN --security-opt apparmor:unconfined | ||
|
||
' | ||
run: 'mkdir /project/ | ||
|
||
disorderfs --sort-dirents=yes --reverse-dirents=no /app/ /project/; | ||
|
||
cd /project/ | ||
./gradlew clean test mbw::assembleProdnetRelease mbw::assembleBtctestnetRelease mbw::assembleProdnetDebug mbw::assembleBtctestnetDebug | ||
|
||
- uses: actions/upload-artifact@v3 | ||
./gradlew clean test mbw::assembleProdnetRelease mbw::assembleBtctestnetRelease | ||
mbw::assembleProdnetDebug mbw::assembleBtctestnetDebug | ||
|
||
' | ||
- continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: mbw/build/outputs/ | ||
name: RC | ||
on: | ||
repository_dispatch: | ||
types: trigger-ga___rc.yml |