Skip to content

Commit 3b9dc50

Browse files
committed
Merge branch 'release/1.6.0' into main
2 parents 8dcb5f7 + 8d6d102 commit 3b9dc50

File tree

583 files changed

+26881
-15274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

583 files changed

+26881
-15274
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/snapshots/**/*.png filter=lfs diff=lfs merge=lfs -text
22
**/src/androidTest/assets/*.realm filter=lfs diff=lfs merge=lfs -text
3+
**/matrix-rust-sdk-crypto.aar filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
3535
- name: Assemble ${{ matrix.target }} debug apk
36-
run: ./gradlew assemble${{ matrix.target }}Debug $CI_GRADLE_ARG_PROPERTIES
36+
run: ./gradlew assemble${{ matrix.target }}RustCryptoDebug $CI_GRADLE_ARG_PROPERTIES
3737
- name: Upload ${{ matrix.target }} debug APKs
3838
uses: actions/upload-artifact@v3
3939
with:
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
5959
- name: Assemble GPlay unsigned apk
60-
run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES
60+
run: ./gradlew clean assembleGplayRustCryptoRelease $CI_GRADLE_ARG_PROPERTIES
6161
- name: Upload Gplay unsigned APKs
6262
uses: actions/upload-artifact@v3
6363
with:
@@ -79,7 +79,7 @@ jobs:
7979
- name: Execute exodus-standalone
8080
uses: docker://exodusprivacy/exodus-standalone:latest
8181
with:
82-
args: /github/workspace/gplay/release/vector-gplay-universal-release-unsigned.apk -j -o /github/workspace/exodus.json
82+
args: /github/workspace/gplayRustCrypto/release/vector-gplay-rustCrypto-universal-release-unsigned.apk -j -o /github/workspace/exodus.json
8383
- name: Upload exodus json report
8484
uses: actions/upload-artifact@v3
8585
with:

.github/workflows/elementr.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ER APK Build
2+
3+
on:
4+
pull_request: { }
5+
push:
6+
branches: [ develop ]
7+
8+
# Enrich gradle.properties for CI/CD
9+
env:
10+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
11+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
12+
13+
jobs:
14+
debug:
15+
name: Build debug APKs ER
16+
runs-on: ubuntu-latest
17+
if: github.ref != 'refs/heads/main'
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
target: [ Gplay, Fdroid ]
22+
# Allow all jobs on develop. Just one per PR.
23+
concurrency:
24+
group: ${{ github.ref == 'refs/heads/develop' && format('elementr-{0}-{1}', matrix.target, github.sha) || format('build-er-debug-{0}-{1}', matrix.target, github.ref) }}
25+
cancel-in-progress: true
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: actions/cache@v3
29+
with:
30+
path: |
31+
~/.gradle/caches
32+
~/.gradle/wrapper
33+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
34+
restore-keys: |
35+
${{ runner.os }}-gradle-
36+
- name: Assemble ${{ matrix.target }} debug apk
37+
run: ./gradlew assemble${{ matrix.target }}RustCryptoDebug $CI_GRADLE_ARG_PROPERTIES

.github/workflows/nightly.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build and release nightly APK
22

33
on:
4+
workflow_dispatch:
45
schedule:
56
# Every nights at 4
67
- cron: "0 4 * * *"
@@ -34,7 +35,7 @@ jobs:
3435
yes n | towncrier build --version nightly
3536
- name: Build and upload Gplay Nightly APK
3637
run: |
37-
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES
38+
./gradlew assembleGplayRustCryptoNightly appDistributionUploadGplayRustCryptoNightly $CI_GRADLE_ARG_PROPERTIES
3839
env:
3940
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
4041
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}

.github/workflows/nightly_er.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and release Element R nightly APK
2+
3+
on:
4+
schedule:
5+
# Every nights at 4
6+
- cron: "0 4 * * *"
7+
8+
env:
9+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
10+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
11+
12+
jobs:
13+
nightly:
14+
name: Build and publish ER nightly Gplay APK to Firebase
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python 3.8
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: 3.8
22+
- uses: actions/cache@v3
23+
with:
24+
path: |
25+
~/.gradle/caches
26+
~/.gradle/wrapper
27+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
28+
restore-keys: |
29+
${{ runner.os }}-gradle-
30+
- name: Install towncrier
31+
run: |
32+
python3 -m pip install towncrier
33+
- name: Prepare changelog file
34+
run: |
35+
mv towncrier.toml towncrier.toml.bak
36+
sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml
37+
rm towncrier.toml.bak
38+
yes n | towncrier build --version nightly
39+
- name: Build and upload Gplay Nightly ER APK
40+
run: |
41+
./gradlew assembleGplayRustCryptoNightly appDistributionUploadGplayRustCryptoNightly $CI_GRADLE_ARG_PROPERTIES
42+
env:
43+
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
44+
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}
45+
ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD }}
46+
FIREBASE_TOKEN: ${{ secrets.ELEMENT_R_NIGHTLY_FIREBASE_TOKEN }}

.github/workflows/quality.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ jobs:
4949
- name: Run lint
5050
# Not always, if ktlint or detekt fail, avoid running the long lint check.
5151
run: |
52-
./gradlew vector-app:lintGplayRelease $CI_GRADLE_ARG_PROPERTIES
53-
./gradlew vector-app:lintFdroidRelease $CI_GRADLE_ARG_PROPERTIES
52+
./gradlew vector-app:lintGplayKotlinCryptoRelease $CI_GRADLE_ARG_PROPERTIES
53+
./gradlew vector-app:lintFdroidKotlinCryptoRelease $CI_GRADLE_ARG_PROPERTIES
54+
./gradlew vector-app:lintGplayRustCryptoRelease $CI_GRADLE_ARG_PROPERTIES
55+
./gradlew vector-app:lintFdroidRustCryptoRelease $CI_GRADLE_ARG_PROPERTIES
5456
- name: Upload reports
5557
if: always()
5658
uses: actions/upload-artifact@v3

.github/workflows/tests-rust.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Test
2+
3+
on:
4+
pull_request: { }
5+
push:
6+
branches: [ main, develop ]
7+
paths-ignore:
8+
- '.github/**'
9+
10+
# Enrich gradle.properties for CI/CD
11+
env:
12+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
13+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 4 --no-daemon
14+
15+
jobs:
16+
tests:
17+
name: Runs all tests with rust crypto
18+
runs-on: buildjet-4vcpu-ubuntu-2204
19+
timeout-minutes: 90 # We might need to increase it if the time for tests grows
20+
strategy:
21+
matrix:
22+
api-level: [28]
23+
# Allow all jobs on main and develop. Just one per PR.
24+
concurrency:
25+
group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-rust-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-rust-{0}', github.sha) || format('unit-tests-rust-{0}', github.ref) }}
26+
cancel-in-progress: true
27+
steps:
28+
- uses: actions/checkout@v3
29+
with:
30+
lfs: true
31+
fetch-depth: 0
32+
- uses: actions/setup-java@v3
33+
with:
34+
distribution: 'adopt'
35+
java-version: '11'
36+
- uses: gradle/gradle-build-action@v2
37+
with:
38+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
39+
gradle-home-cache-cleanup: ${{ github.ref == 'refs/heads/develop' }}
40+
41+
# - name: Run screenshot tests
42+
# run: ./gradlew verifyScreenshots $CI_GRADLE_ARG_PROPERTIES
43+
44+
# - name: Archive Screenshot Results on Error
45+
# if: failure()
46+
# uses: actions/upload-artifact@v3
47+
# with:
48+
# name: screenshot-results
49+
# path: |
50+
# **/out/failures/
51+
# **/build/reports/tests/*UnitTest/
52+
53+
- uses: actions/setup-python@v4
54+
with:
55+
python-version: 3.8
56+
- uses: michaelkaye/setup-matrix-synapse@v1.0.4
57+
with:
58+
uploadLogs: true
59+
httpPort: 8080
60+
disableRateLimiting: true
61+
public_baseurl: "http://10.0.2.2:8080/"
62+
63+
- name: Run all the codecoverage tests at once
64+
uses: reactivecircus/android-emulator-runner@v2
65+
# continue-on-error: true
66+
with:
67+
api-level: ${{ matrix.api-level }}
68+
arch: x86
69+
profile: Nexus 5X
70+
target: playstore
71+
force-avd-creation: false
72+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
73+
disable-animations: true
74+
# emulator-build: 7425822
75+
script: |
76+
./gradlew gatherGplayRustCryptoDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
77+
./gradlew instrumentationTestsRustWithCoverage $CI_GRADLE_ARG_PROPERTIES
78+
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
79+
80+
- name: Upload Rust Integration Test Report Log
81+
uses: actions/upload-artifact@v3
82+
if: always()
83+
with:
84+
name: integration-test-rust-error-results
85+
path: |
86+
*/build/outputs/androidTest-results/connected/
87+
*/build/reports/androidTests/connected/
88+
89+
# For now ignore sonar
90+
# - name: Publish results to Sonar
91+
# env:
92+
# GITHUB_TOKEN: ${{ secrets.SONARQUBE_GITHUB_API_TOKEN }} # Needed to get PR information, if any
93+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
94+
# ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
95+
# if: ${{ always() && env.GITHUB_TOKEN != '' && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }}
96+
# run: ./gradlew sonar $CI_GRADLE_ARG_PROPERTIES
97+
98+
- name: Format unit test results
99+
if: always()
100+
run: python3 ./tools/ci/render_test_output.py unit ./**/build/test-results/**/*.xml
101+
102+

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
disable-animations: true
7474
# emulator-build: 7425822
7575
script: |
76-
./gradlew gatherGplayDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
76+
./gradlew gatherGplayKotlinCryptoDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
7777
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
7878
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
7979
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES

0 commit comments

Comments
 (0)