mirror of
https://github.com/element-hq/element-android
synced 2024-09-06 17:05:20 +00:00
Use matrix.target to fix build group. Use env vars to clean up.
This commit is contained in:
parent
edb92f85c5
commit
43c125ed32
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
|
@ -10,15 +10,16 @@ env:
|
|||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx2g
|
||||
-Porg.gradle.parallel=false
|
||||
|
||||
CI_ANY_MAIN: ${{ github.ref == 'refs/heads/main' && format('main-{0}', github.sha) }}
|
||||
CI_ANY_DEVELOP: ${{ github.ref == 'refs/heads/develop' && format('develop-{0}', github.sha) }}
|
||||
CI_ONE_PR: ${{ format('build-debug-{0}-{1}', matrix.target, github.ref) }}
|
||||
CI_GROUP_SUFFIX: ${{ CI_ANY_MAIN || CI_ANY_DEVELOP || CI_ONE_PR }}
|
||||
jobs:
|
||||
debug:
|
||||
name: Build debug APKs (${{ matrix.target }})
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('build-debug-develop-{0}', github.sha) || format('build-debug-{0}', github.ref) }}
|
||||
group: ${{ format('build-debug-{0}-{1}', matrix.target, CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
if: github.ref != 'refs/heads/main'
|
||||
strategy:
|
||||
|
@ -48,9 +49,7 @@ jobs:
|
|||
name: Build unsigned GPlay APKs
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('build-release-develop-{0}', github.sha) || format('build-release-{0}', github.ref) }}
|
||||
group: ${{ format('build-release-{0}-{1}', matrix.target, CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
|
|
17
.github/workflows/integration_tests.yml
vendored
17
.github/workflows/integration_tests.yml
vendored
|
@ -1,4 +1,3 @@
|
|||
# no-op
|
||||
name: Integration Tests
|
||||
|
||||
on:
|
||||
|
@ -11,6 +10,10 @@ env:
|
|||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx2g
|
||||
-Porg.gradle.parallel=false
|
||||
CI_ANY_MAIN: ${{ github.ref == 'refs/heads/main' && format('main-{0}', github.sha) }}
|
||||
CI_ANY_DEVELOP: ${{ github.ref == 'refs/heads/develop' && format('develop-{0}', github.sha) }}
|
||||
CI_ONE_PR: ${{ format('build-debug-{0}-{1}', matrix.target, github.ref) }}
|
||||
CI_GROUP_SUFFIX: ${{ CI_ANY_MAIN || CI_ANY_DEVELOP || CI_ONE_PR }}
|
||||
|
||||
jobs:
|
||||
# Build Android Tests [Matrix SDK]
|
||||
|
@ -18,9 +21,7 @@ jobs:
|
|||
name: Matrix SDK - Build Android Tests
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('test-matrix-sdk-develop-{0}', github.sha) || format('test-matrix-sdk-{0}', github.ref) }}
|
||||
group: ${{ format('test-matrix-sdk-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -40,9 +41,7 @@ jobs:
|
|||
name: App - Build Android Tests
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('test-app-develop-{0}', github.sha) || format('test-app-{0}', github.ref) }}
|
||||
group: ${{ format('test-app-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -62,9 +61,7 @@ jobs:
|
|||
name: Matrix SDK - Running Integration Tests
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('integration-tests-develop-{0}', github.sha) || format('integration-tests-{0}', github.ref) }}
|
||||
group: ${{ format('integration-tests-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
18
.github/workflows/quality.yml
vendored
18
.github/workflows/quality.yml
vendored
|
@ -5,6 +5,12 @@ on:
|
|||
push:
|
||||
branches: [ main, develop ]
|
||||
|
||||
env:
|
||||
CI_ANY_MAIN: ${{ github.ref == 'refs/heads/main' && format('main-{0}', github.sha) }}
|
||||
CI_ANY_DEVELOP: ${{ github.ref == 'refs/heads/develop' && format('develop-{0}', github.sha) }}
|
||||
CI_ONE_PR: ${{ format('build-debug-{0}-{1}', matrix.target, github.ref) }}
|
||||
CI_GROUP_SUFFIX: ${{ CI_ANY_MAIN || CI_ANY_DEVELOP || CI_ONE_PR }}
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Project Check Suite
|
||||
|
@ -19,9 +25,7 @@ jobs:
|
|||
name: Kotlin Linter
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('ktlint-develop-{0}', github.sha) || format('ktlint-{0}', github.ref) }}
|
||||
group: ${{ format('klint-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -93,9 +97,7 @@ jobs:
|
|||
name: Android Linter
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('android-lint-develop-{0}', github.sha) || format('android-lint-{0}', github.ref) }}
|
||||
group: ${{ format('android-lint-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -122,9 +124,7 @@ jobs:
|
|||
name: Lint APK (${{ matrix.target }})
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('apk-lint-develop-{0}', github.sha) || format('apk-lint-{0}', github.ref) }}
|
||||
group: ${{ format('apk-lint-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
if: github.ref != 'refs/heads/main'
|
||||
strategy:
|
||||
|
|
9
.github/workflows/tests.yml
vendored
9
.github/workflows/tests.yml
vendored
|
@ -10,15 +10,16 @@ env:
|
|||
CI_GRADLE_ARG_PROPERTIES: >
|
||||
-Porg.gradle.jvmargs=-Xmx2g
|
||||
-Porg.gradle.parallel=false
|
||||
|
||||
CI_ANY_MAIN: ${{ github.ref == 'refs/heads/main' && format('main-{0}', github.sha) }}
|
||||
CI_ANY_DEVELOP: ${{ github.ref == 'refs/heads/develop' && format('develop-{0}', github.sha) }}
|
||||
CI_ONE_PR: ${{ format('build-debug-{0}-{1}', matrix.target, github.ref) }}
|
||||
CI_GROUP_SUFFIX: ${{ CI_ANY_MAIN || CI_ANY_DEVELOP || CI_ONE_PR }}
|
||||
jobs:
|
||||
unit-tests:
|
||||
name: Run Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||
group: ${{ github.ref == 'refs/heads/develop' && format('test-unit-develop-{0}', github.sha) || format('test-unit-{0}', github.ref) }}
|
||||
group: ${{ format('unit-tests-{0}', CI_GROUP_SUFFIX) }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
Loading…
Reference in a new issue