Skip to content

Commit b4e54fe

Browse files
authored
Revert "Reuse build workflow (#819)"
This reverts commit d9dd911.
1 parent f31efe6 commit b4e54fe

File tree

7 files changed

+431
-30
lines changed

7 files changed

+431
-30
lines changed

.github/workflows/Crane.yaml

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,72 @@ on:
1111
paths:
1212
- '.github/workflows/Crane.yaml'
1313
- 'Crane/**'
14-
workflow_dispatch:
14+
concurrency:
15+
group: crane-build-${{ github.ref }}
16+
cancel-in-progress: true
1517
env:
1618
SAMPLE_PATH: Crane
1719

1820
jobs:
1921
build:
20-
uses: android/compose-samples/.github/workflows/build-sample.yml@main
21-
with:
22-
name: Crane
23-
path: Crane
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Copy CI gradle.properties
30+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
31+
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: 11
36+
37+
- name: Generate cache key
38+
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
39+
40+
- uses: actions/cache@v2
41+
with:
42+
path: |
43+
~/.gradle/caches/modules-*
44+
~/.gradle/caches/jars-*
45+
~/.gradle/caches/build-cache-*
46+
key: gradle-${{ hashFiles('checksum.txt') }}
47+
48+
- name: Check spotless
49+
working-directory: ${{ env.SAMPLE_PATH }}
50+
run: ./gradlew spotlessCheck --stacktrace
51+
52+
- name: Check lint
53+
working-directory: ${{ env.SAMPLE_PATH }}
54+
run: ./gradlew lintDebug --stacktrace
55+
56+
- name: Build debug
57+
working-directory: ${{ env.SAMPLE_PATH }}
58+
run: ./gradlew assembleDebug --stacktrace
59+
60+
- name: Build release
61+
working-directory: ${{ env.SAMPLE_PATH }}
62+
run: ./gradlew assembleRelease --stacktrace
63+
64+
- name: Run local tests
65+
working-directory: ${{ env.SAMPLE_PATH }}
66+
run: ./gradlew testDebug --stacktrace
67+
68+
- name: Upload build outputs (APKs)
69+
uses: actions/upload-artifact@v2
70+
with:
71+
name: build-outputs
72+
path: ${{ env.SAMPLE_PATH }}/app/build/outputs
73+
74+
- name: Upload build reports
75+
if: always()
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: build-reports
79+
path: ${{ env.SAMPLE_PATH }}/app/build/reports
2480

2581
test:
2682
needs: build

.github/workflows/JetNews.yaml

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,72 @@ on:
1111
paths:
1212
- '.github/workflows/JetNews.yaml'
1313
- 'JetNews/**'
14+
concurrency:
15+
group: jetnews-build-${{ github.ref }}
16+
cancel-in-progress: true
1417
env:
1518
SAMPLE_PATH: JetNews
1619

1720
jobs:
1821
build:
1922
runs-on: ubuntu-latest
2023
timeout-minutes: 30
21-
uses: android/compose-samples/.github/workflows/build-sample.yml@main
22-
with:
23-
name: JetNews
24-
path: JetNews
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Copy CI gradle.properties
30+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
31+
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: 11
36+
37+
- name: Generate cache key
38+
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
39+
40+
- uses: actions/cache@v2
41+
with:
42+
path: |
43+
~/.gradle/caches/modules-*
44+
~/.gradle/caches/jars-*
45+
~/.gradle/caches/build-cache-*
46+
key: gradle-${{ hashFiles('checksum.txt') }}
47+
48+
- name: Check spotless
49+
working-directory: ${{ env.SAMPLE_PATH }}
50+
run: ./gradlew spotlessCheck --stacktrace
51+
52+
- name: Check lint
53+
working-directory: ${{ env.SAMPLE_PATH }}
54+
run: ./gradlew lintDebug --stacktrace
55+
56+
- name: Build debug
57+
working-directory: ${{ env.SAMPLE_PATH }}
58+
run: ./gradlew assembleDebug --stacktrace
59+
60+
- name: Build release
61+
working-directory: ${{ env.SAMPLE_PATH }}
62+
run: ./gradlew assembleRelease --stacktrace
63+
64+
- name: Run local tests
65+
working-directory: ${{ env.SAMPLE_PATH }}
66+
run: ./gradlew testDebug --stacktrace
67+
68+
- name: Upload build outputs (APKs)
69+
uses: actions/upload-artifact@v2
70+
with:
71+
name: build-outputs
72+
path: ${{ env.SAMPLE_PATH }}/app/build/outputs
73+
74+
- name: Upload build reports
75+
if: always()
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: build-reports
79+
path: ${{ env.SAMPLE_PATH }}/app/build/reports
2580

2681
androidTest:
2782
needs: build

.github/workflows/Jetcaster.yaml

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,69 @@ on:
1111
paths:
1212
- '.github/workflows/Jetcaster.yaml'
1313
- 'Jetcaster/**'
14-
workflow_dispatch:
14+
concurrency:
15+
group: jetcaster-build-${{ github.ref }}
16+
cancel-in-progress: true
17+
env:
18+
SAMPLE_PATH: Jetcaster
1519

1620
jobs:
1721
build:
18-
uses: android/compose-samples/.github/workflows/build-sample.yml@main
19-
with:
20-
name: Jetcaster
21-
path: Jetcaster
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Copy CI gradle.properties
30+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
31+
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: 11
36+
37+
- name: Generate cache key
38+
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
39+
40+
- uses: actions/cache@v2
41+
with:
42+
path: |
43+
~/.gradle/caches/modules-*
44+
~/.gradle/caches/jars-*
45+
~/.gradle/caches/build-cache-*
46+
key: gradle-${{ hashFiles('checksum.txt') }}
47+
48+
- name: Check spotless
49+
working-directory: ${{ env.SAMPLE_PATH }}
50+
run: ./gradlew spotlessCheck --stacktrace
51+
52+
- name: Check lint
53+
working-directory: ${{ env.SAMPLE_PATH }}
54+
run: ./gradlew lintDebug --stacktrace
55+
56+
- name: Build debug
57+
working-directory: ${{ env.SAMPLE_PATH }}
58+
run: ./gradlew assembleDebug --stacktrace
59+
60+
- name: Build release
61+
working-directory: ${{ env.SAMPLE_PATH }}
62+
run: ./gradlew assembleRelease --stacktrace
63+
64+
- name: Run local tests
65+
working-directory: ${{ env.SAMPLE_PATH }}
66+
run: ./gradlew testDebug --stacktrace
67+
68+
- name: Upload build outputs (APKs)
69+
uses: actions/upload-artifact@v2
70+
with:
71+
name: build-outputs
72+
path: ${{ env.SAMPLE_PATH }}/app/build/outputs
73+
74+
- name: Upload build reports
75+
if: always()
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: build-reports
79+
path: ${{ env.SAMPLE_PATH }}/app/build/reports

.github/workflows/Jetchat.yaml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,72 @@ on:
1111
paths:
1212
- '.github/workflows/Jetchat.yaml'
1313
- 'Jetchat/**'
14+
concurrency:
15+
group: jetchat-build-${{ github.ref }}
16+
cancel-in-progress: true
1417
env:
1518
SAMPLE_PATH: Jetchat
1619

1720
jobs:
1821
build:
19-
uses: android/compose-samples/.github/workflows/build-sample.yml@main
20-
with:
21-
name: Jetchat
22-
path: Jetchat
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Copy CI gradle.properties
30+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
31+
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: 11
36+
37+
- name: Generate cache key
38+
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
39+
40+
- uses: actions/cache@v2
41+
with:
42+
path: |
43+
~/.gradle/caches/modules-*
44+
~/.gradle/caches/jars-*
45+
~/.gradle/caches/build-cache-*
46+
key: gradle-${{ hashFiles('checksum.txt') }}
47+
48+
- name: Check spotless
49+
working-directory: ${{ env.SAMPLE_PATH }}
50+
run: ./gradlew spotlessCheck --stacktrace
51+
52+
- name: Check lint
53+
working-directory: ${{ env.SAMPLE_PATH }}
54+
run: ./gradlew lintDebug --stacktrace
55+
56+
- name: Build debug
57+
working-directory: ${{ env.SAMPLE_PATH }}
58+
run: ./gradlew assembleDebug --stacktrace
59+
60+
- name: Build release
61+
working-directory: ${{ env.SAMPLE_PATH }}
62+
run: ./gradlew assembleRelease --stacktrace
63+
64+
- name: Run local tests
65+
working-directory: ${{ env.SAMPLE_PATH }}
66+
run: ./gradlew testDebug --stacktrace
67+
68+
- name: Upload build outputs (APKs)
69+
uses: actions/upload-artifact@v2
70+
with:
71+
name: build-outputs
72+
path: ${{ env.SAMPLE_PATH }}/app/build/outputs
73+
74+
- name: Upload build reports
75+
if: always()
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: build-reports
79+
path: ${{ env.SAMPLE_PATH }}/app/build/reports
2380

2481
test:
2582
needs: build

.github/workflows/Jetsnack.yaml

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,69 @@ on:
1111
paths:
1212
- '.github/workflows/Jetsnack.yaml'
1313
- 'Jetsnack/**'
14+
concurrency:
15+
group: jetsnack-build-${{ github.ref }}
16+
cancel-in-progress: true
17+
env:
18+
SAMPLE_PATH: Jetsnack
1419

1520
jobs:
1621
build:
17-
uses: android/compose-samples/.github/workflows/build-sample.yml@main
18-
with:
19-
name: Jetsnack
20-
path: Jetsnack
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Copy CI gradle.properties
30+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
31+
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: 11
36+
37+
- name: Generate cache key
38+
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
39+
40+
- uses: actions/cache@v2
41+
with:
42+
path: |
43+
~/.gradle/caches/modules-*
44+
~/.gradle/caches/jars-*
45+
~/.gradle/caches/build-cache-*
46+
key: gradle-${{ hashFiles('checksum.txt') }}
47+
48+
- name: Check spotless
49+
working-directory: ${{ env.SAMPLE_PATH }}
50+
run: ./gradlew spotlessCheck --stacktrace
51+
52+
- name: Check lint
53+
working-directory: ${{ env.SAMPLE_PATH }}
54+
run: ./gradlew lintDebug --stacktrace
55+
56+
- name: Build debug
57+
working-directory: ${{ env.SAMPLE_PATH }}
58+
run: ./gradlew assembleDebug --stacktrace
59+
60+
- name: Build release
61+
working-directory: ${{ env.SAMPLE_PATH }}
62+
run: ./gradlew assembleRelease --stacktrace
63+
64+
- name: Run local tests
65+
working-directory: ${{ env.SAMPLE_PATH }}
66+
run: ./gradlew testDebug --stacktrace
67+
68+
- name: Upload build outputs (APKs)
69+
uses: actions/upload-artifact@v2
70+
with:
71+
name: build-outputs
72+
path: ${{ env.SAMPLE_PATH }}/app/build/outputs
73+
74+
- name: Upload build reports
75+
if: always()
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: build-reports
79+
path: ${{ env.SAMPLE_PATH }}/app/build/reports

0 commit comments

Comments
 (0)