Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Setup workflows to build all variants in the app (WPB-8644) #3014

Merged
merged 47 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d2bc84e
CI: Setup workflows to build all variants in the app
ohassine May 17, 2024
cdfdcd8
Merge remote-tracking branch 'origin/develop' into setup-workflow-bui…
ohassine May 21, 2024
a277a8d
ci: debug keystore
ohassine May 21, 2024
da7c551
Merge branch 'develop' into setup-workflow-build-app
ohassine May 22, 2024
632122b
chore: use ubuntu runner
ohassine May 22, 2024
8e257e6
chore: update env variables
ohassine May 22, 2024
7ce417f
chore: decode pre release keystore
ohassine May 22, 2024
8f4fd96
chore: rerun
ohassine May 23, 2024
c5e4e68
chore: use buildjet runner
ohassine May 23, 2024
c060721
chore: use ubuntu runner
ohassine May 23, 2024
8719d9f
chore: debug build
ohassine May 23, 2024
2127a33
chore: rebuild
ohassine May 23, 2024
c632e19
Merge remote-tracking branch 'origin/develop' into setup-workflow-bui…
ohassine May 23, 2024
a40ffa8
chore: conflicts
ohassine May 23, 2024
18292bd
chore: kalium reference
ohassine May 23, 2024
6221310
chore: rebuild
ohassine May 23, 2024
43b9868
chore: re-run
ohassine May 23, 2024
7510e28
chore: re-run
ohassine May 23, 2024
cb4648d
chore: build beta build
ohassine May 23, 2024
c33d14e
chore: re-build beta
ohassine May 23, 2024
f85ece9
chore: re-build beta
ohassine May 23, 2024
159982b
chore: building prod build
ohassine May 23, 2024
a4c147c
chore: building rc build
ohassine May 23, 2024
a93ceec
chore: rebuild rc
ohassine May 24, 2024
5a00cdf
chore: clean up
ohassine May 24, 2024
5bc1983
chore: clean up
ohassine May 24, 2024
78551ec
chore: commenting some jenkins stages
ohassine May 24, 2024
c7058cd
chore: address comments
ohassine May 27, 2024
31a7983
Merge branch 'develop' into setup-workflow-build-app
ohassine May 27, 2024
49edf42
chore: cleanup
ohassine May 27, 2024
795eede
Merge remote-tracking branch 'origin/setup-workflow-build-app' into s…
ohassine May 27, 2024
b98112c
chore: keystore path
ohassine May 27, 2024
aa637e2
chore: test run
ohassine May 27, 2024
fb0b325
chore: use keystore path variable
ohassine May 27, 2024
91a02a9
chore: test run
ohassine May 27, 2024
f5409b1
chore: test run
ohassine May 27, 2024
259afa5
chore: test run
ohassine May 27, 2024
625b18a
chore: re-run
ohassine May 27, 2024
c63fa50
chore: re-run
ohassine May 27, 2024
3fc25b4
chore: address comments
ohassine May 27, 2024
feaae0b
Merge branch 'develop' into setup-workflow-build-app
ohassine May 27, 2024
0286c10
chore: test run
ohassine May 27, 2024
56990d8
Merge remote-tracking branch 'origin/setup-workflow-build-app' into s…
ohassine May 27, 2024
1b7c4d0
chore: test run
ohassine May 27, 2024
73fb85d
chore: test run
ohassine May 27, 2024
3e701bd
chore: clean up
ohassine May 27, 2024
f9970d5
Merge branch 'develop' into setup-workflow-build-app
ohassine May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/build-app.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/build-beta-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: "Beta build"

on:
push:
branches:
- main
merge_group:
pull_request:
branches:
- main
types: [ opened, synchronize ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
code-analysis:
uses: ./.github/workflows/code-analysis.yml
ui-tests:
uses: ./.github/workflows/gradle-run-ui-tests.yml
unit-tests:
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ code-analysis, ui-tests, unit-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_PRE_RELEASE }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/the.keystore
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build beta flavour APK
run:
./gradlew app:assembleBetaRelease
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PRE_RELEASE }}
KEYPWD_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PRE_RELEASE }}
KEYSTOREPWD_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PRE_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Build beta flavour Bundle
run:
./gradlew app:bundleBetaRelease
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PRE_RELEASE }}
KEYPWD_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PRE_RELEASE }}
KEYSTOREPWD_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PRE_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Upload
if: success()
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: app/build/outputs/
79 changes: 79 additions & 0 deletions .github/workflows/build-develop-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Develop build"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
types: [ opened, synchronize ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
code-analysis:
uses: ./.github/workflows/code-analysis.yml
ui-tests:
uses: ./.github/workflows/gradle-run-ui-tests.yml
unit-tests:
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ code-analysis, ui-tests, unit-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Decode debug Keystore
env:
ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_DEBUG }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/the.keystore
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: build dev flavour
run:
./gradlew app:assembleDevDebug
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_DEBUG: ${{ secrets.SIGNING_KEY_ALIAS_DEBUG }}
KEYPWD_DEBUG: ${{ secrets.SIGNING_KEY_PASSWORD_DEBUG }}
KEYSTOREPWD_DEBUG: ${{ secrets.SIGNING_STORE_PASSWORD_DEBUG }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Decode release Keystore
env:
ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_PRE_RELEASE }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/the.keystore
- name: build staging flavour
run:
./gradlew app:assembleStagingRelease
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PRE_RELEASE }}
KEYPWD_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PRE_RELEASE }}
KEYSTOREPWD_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PRE_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Upload
if: success()
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: app/build/outputs/
72 changes: 72 additions & 0 deletions .github/workflows/build-prod-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: "Prod build"

on:
push:
tags:
- 'v*'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
code-analysis:
uses: ./.github/workflows/code-analysis.yml
ui-tests:
uses: ./.github/workflows/gradle-run-ui-tests.yml
unit-tests:
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ code-analysis, ui-tests, unit-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_PUBLIC_RELEASE }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/the.keystore
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: build prod flavour APK
run:
./gradlew app:assembleProdCompatRelease
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PUBLIC_RELEASE }}
KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }}
KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: build prod flavour bundle
run:
./gradlew app:bundleProdCompatRelease
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PUBLIC_RELEASE }}
KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }}
KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Upload
if: success()
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: app/build/outputs/
88 changes: 88 additions & 0 deletions .github/workflows/build-rc-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: "Release candidate build"

on:
push:
branches:
- release/candidate
merge_group:
pull_request:
branches:
- release/candidate
types: [ opened, synchronize ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
code-analysis:
uses: ./.github/workflows/code-analysis.yml
ui-tests:
uses: ./.github/workflows/gradle-run-ui-tests.yml
unit-tests:
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ code-analysis, ui-tests, unit-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_INTERNAL_RELEASE }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/the.keystore
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build internal flavour APK
run:
./gradlew app:assembleInternalCompat
env:
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_COMPAT: ${{ secrets.SIGNING_KEY_ALIAS_INTERNAL_RELEASE }}
KEYPWD_COMPAT: ${{ secrets.SIGNING_KEY_PASSWORD_INTERNAL_RELEASE }}
KEYSTOREPWD_COMPAT: ${{ secrets.SIGNING_STORE_PASSWORD_INTERNAL_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Build internal flavour bundle
run:
./gradlew app:bundleInternalCompat
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
WIRE_KEYSTORE_PATH: ${{ vars.WIRE_KEYSTORE_PATH }}
KEYSTORE_KEY_NAME_COMPAT: ${{ secrets.SIGNING_KEY_ALIAS_INTERNAL_RELEASE }}
KEYPWD_COMPAT: ${{ secrets.SIGNING_KEY_PASSWORD_INTERNAL_RELEASE }}
KEYSTOREPWD_COMPAT: ${{ secrets.SIGNING_STORE_PASSWORD_INTERNAL_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Build Staging flavour
run:
./gradlew app:assembleStagingCompat
env:
KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }}
KEYSTORE_KEY_NAME_COMPAT: ${{ secrets.SIGNING_KEY_ALIAS_INTERNAL_RELEASE }}
KEYPWD_COMPAT: ${{ secrets.SIGNING_KEY_PASSWORD_INTERNAL_RELEASE }}
KEYSTOREPWD_COMPAT: ${{ secrets.SIGNING_STORE_PASSWORD_INTERNAL_RELEASE }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Upload
if: success()
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: app/build/outputs/
23 changes: 5 additions & 18 deletions .github/workflows/gradle-run-ui-tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
name: "Run UI Tests"

on:
merge_group:
push:
branches:
- develop
- release/candidate
- prod
- internal
- main
pull_request:
types: [ opened, synchronize ] # Don't rerun on `edited` to save time
branches:
- develop
- release/candidate
- prod
- internal
- main
workflow_call:

on: [ workflow_call ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
Expand Down
Loading
Loading