Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 45ed6c3

Browse files
committed
Add GitHub Actions workflow
This enables automatic builds for new commits and PRs in the master branch. This sample is currently **green**, see build logs: + GRADLE_OPTS=' -Xms4g -Xmx4g' + GRADLE_OPTS=' -Xms4g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError' + GRADLE_OPTS=' -Xms4g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.daemon=false' + GRADLE_OPTS=' -Xms4g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2' + GRADLE_OPTS=' -Xms4g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false' + GRADLE_OPTS=' -Xms4g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process' + GRADLE_OPTS=' -Xms4g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process -Dfile.encoding=UTF-8' + export GRADLE_OPTS ++ find . -name gradlew + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./CustomTransition/gradlew + SAMPLE=./CustomTransition + bash ./CustomTransition/gradlew -p ./CustomTransition -Pci --no-parallel --stacktrace assembleDebug > Task :Application:preBuild UP-TO-DATE > Task :Application:preDebugBuild > Task :Application:compileDebugAidl NO-SOURCE > Task :Application:compileDebugRenderscript NO-SOURCE > Task :Application:checkDebugManifest > Task :Application:generateDebugBuildConfig > Task :Application:prepareLintJar > Task :Application:generateDebugSources > Task :Application:javaPreCompileDebug > Task :Application:mainApkListPersistenceDebug > Task :Application:generateDebugResValues > Task :Application:generateDebugResources > Task :Application:mergeDebugResources > Task :Application:createDebugCompatibleScreenManifests > Task :Application:processDebugManifest > Task :Application:processDebugResources > Task :Application:compileDebugJavaWithJavac > Task :Application:compileDebugSources > Task :Application:mergeDebugShaders > Task :Application:compileDebugShaders Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. > Task :Application:generateDebugAssets > Task :Application:mergeDebugAssets > Task :Application:checkDebugDuplicateClasses > Task :Application:mergeExtDexDebug > Task :Application:transformClassesWithDexBuilderForDebug > Task :Application:mergeDexDebug > Task :Application:validateSigningDebug > Task :Application:signingConfigWriterDebug > Task :Application:mergeDebugJniLibFolders > Task :Application:transformNativeLibsWithMergeJniLibsForDebug > Task :Application:transformNativeLibsWithStripDebugSymbolForDebug > Task :Application:processDebugJavaRes NO-SOURCE > Task :Application:transformResourcesWithMergeJavaResForDebug > Task :Application:packageDebug > Task :Application:assembleDebug Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 12s 26 actionable tasks: 26 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./OurStreets/gradlew + SAMPLE=./OurStreets + bash ./OurStreets/gradlew -p ./OurStreets -Pci --no-parallel --stacktrace assembleDebug > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:checkDebugManifest > Task :app:generateDebugBuildConfig > Task :app:javaPreCompileDebug > Task :app:mainApkListPersistenceDebug > Task :app:generateDebugResValues > Task :app:generateDebugResources > Task :app:createDebugCompatibleScreenManifests > Task :app:processDebugManifest > Task :app:mergeDebugShaders > Task :app:compileDebugShaders > Task :app:generateDebugAssets > Task :app:mergeDebugAssets > Task :app:processDebugJavaRes NO-SOURCE > Task :app:checkDebugDuplicateClasses > Task :app:mergeDebugResources > Task :app:processDebugResources Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. > Task :app:compileDebugJavaWithJavac > Task :app:compileDebugSources > Task :app:mergeExtDexDebug > Task :app:mergeLibDexDebug > Task :app:transformClassesWithDexBuilderForDebug > Task :app:mergeDebugJavaResource > Task :app:validateSigningDebug > Task :app:signingConfigWriterDebug > Task :app:mergeProjectDexDebug > Task :app:mergeDebugJniLibFolders > Task :app:mergeDebugNativeLibs > Task :app:stripDebugDebugSymbols > Task :app:packageDebug > Task :app:assembleDebug BUILD SUCCESSFUL in 12s 25 actionable tasks: 25 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./ActivitySceneTransitionBasic/gradlew + SAMPLE=./ActivitySceneTransitionBasic + bash ./ActivitySceneTransitionBasic/gradlew -p ./ActivitySceneTransitionBasic -Pci --no-parallel --stacktrace assembleDebug > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:checkDebugManifest > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:generateDebugBuildConfig > Task :app:javaPreCompileDebug > Task :app:mainApkListPersistenceDebug > Task :app:generateDebugResValues > Task :app:generateDebugResources > Task :app:createDebugCompatibleScreenManifests > Task :app:processDebugManifest > Task :app:mergeDebugResources > Task :app:processDebugResources > Task :app:compileDebugJavaWithJavac > Task :app:compileDebugSources > Task :app:mergeDebugShaders > Task :app:compileDebugShaders > Task :app:generateDebugAssets > Task :app:mergeDebugAssets > Task :app:processDebugJavaRes NO-SOURCE > Task :app:checkDebugDuplicateClasses > Task :app:mergeDebugJavaResource > Task :app:transformClassesWithDexBuilderForDebug > Task :app:validateSigningDebug > Task :app:signingConfigWriterDebug > Task :app:mergeExtDexDebug > Task :app:mergeDebugJniLibFolders > Task :app:mergeDebugNativeLibs > Task :app:stripDebugDebugSymbols > Task :app:mergeDexDebug > Task :app:packageDebug > Task :app:assembleDebug BUILD SUCCESSFUL in 10s 24 actionable tasks: 24 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./Interpolator/gradlew + SAMPLE=./Interpolator + bash ./Interpolator/gradlew -p ./Interpolator -Pci --no-parallel --stacktrace assembleDebug > Task :Application:preBuild UP-TO-DATE > Task :Application:preDebugBuild > Task :Application:compileDebugAidl NO-SOURCE > Task :Application:compileDebugRenderscript NO-SOURCE > Task :Application:checkDebugManifest > Task :Application:generateDebugBuildConfig > Task :Application:prepareLintJar > Task :Application:generateDebugSources > Task :Application:javaPreCompileDebug > Task :Application:mainApkListPersistenceDebug > Task :Application:generateDebugResValues > Task :Application:generateDebugResources > Task :Application:mergeDebugResources > Task :Application:createDebugCompatibleScreenManifests > Task :Application:processDebugManifest > Task :Application:processDebugResources > Task :Application:compileDebugJavaWithJavac Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. > Task :Application:compileDebugSources > Task :Application:mergeDebugShaders > Task :Application:compileDebugShaders > Task :Application:generateDebugAssets > Task :Application:mergeDebugAssets > Task :Application:checkDebugDuplicateClasses > Task :Application:mergeExtDexDebug > Task :Application:mergeLibDexDebug > Task :Application:transformClassesWithDexBuilderForDebug > Task :Application:mergeProjectDexDebug > Task :Application:validateSigningDebug > Task :Application:signingConfigWriterDebug > Task :Application:mergeDebugJniLibFolders > Task :Application:transformNativeLibsWithMergeJniLibsForDebug > Task :Application:transformNativeLibsWithStripDebugSymbolForDebug > Task :Application:processDebugJavaRes NO-SOURCE > Task :Application:transformResourcesWithMergeJavaResForDebug > Task :Application:packageDebug > Task :Application:assembleDebug Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 13s 27 actionable tasks: 27 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./BasicTransition/gradlew + SAMPLE=./BasicTransition + bash ./BasicTransition/gradlew -p ./BasicTransition -Pci --no-parallel --stacktrace assembleDebug > Task :Application:preBuild UP-TO-DATE > Task :Application:preDebugBuild > Task :Application:compileDebugAidl NO-SOURCE > Task :Application:compileDebugRenderscript NO-SOURCE > Task :Application:checkDebugManifest > Task :Application:generateDebugBuildConfig > Task :Application:prepareLintJar > Task :Application:generateDebugSources > Task :Application:javaPreCompileDebug > Task :Application:mainApkListPersistenceDebug > Task :Application:generateDebugResValues > Task :Application:generateDebugResources > Task :Application:mergeDebugResources > Task :Application:createDebugCompatibleScreenManifests > Task :Application:processDebugManifest > Task :Application:processDebugResources > Task :Application:compileDebugJavaWithJavac Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. > Task :Application:compileDebugSources > Task :Application:mergeDebugShaders > Task :Application:compileDebugShaders > Task :Application:generateDebugAssets > Task :Application:mergeDebugAssets > Task :Application:checkDebugDuplicateClasses > Task :Application:mergeExtDexDebug > Task :Application:transformClassesWithDexBuilderForDebug > Task :Application:mergeDexDebug > Task :Application:validateSigningDebug > Task :Application:signingConfigWriterDebug > Task :Application:mergeDebugJniLibFolders > Task :Application:transformNativeLibsWithMergeJniLibsForDebug > Task :Application:transformNativeLibsWithStripDebugSymbolForDebug > Task :Application:processDebugJavaRes NO-SOURCE > Task :Application:transformResourcesWithMergeJavaResForDebug > Task :Application:packageDebug > Task :Application:assembleDebug Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 17s 26 actionable tasks: 26 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./GridToPager/gradlew + SAMPLE=./GridToPager + bash ./GridToPager/gradlew -p ./GridToPager -Pci --no-parallel --stacktrace assembleDebug To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.6.4/userguide/gradle_daemon.html. Daemon will be stopped at the end of the build stopping after processing > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:generateDebugBuildConfig > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:javaPreCompileDebug > Task :app:mainApkListPersistenceDebug > Task :app:generateDebugResValues > Task :app:generateDebugResources > Task :app:mergeDebugResources > Task :app:createDebugCompatibleScreenManifests > Task :app:extractDeepLinksDebug > Task :app:processDebugManifest > Task :app:processDebugResources > Task :app:compileDebugJavaWithJavac > Task :app:compileDebugSources > Task :app:mergeDebugShaders > Task :app:compileDebugShaders > Task :app:generateDebugAssets > Task :app:mergeDebugAssets > Task :app:processDebugJavaRes NO-SOURCE > Task :app:mergeDebugJavaResource > Task :app:checkDebugDuplicateClasses > Task :app:desugarDebugFileDependencies > Task :app:mergeLibDexDebug > Task :app:dexBuilderDebug > Task :app:mergeProjectDexDebug > Task :app:mergeExtDexDebug > Task :app:mergeDebugJniLibFolders > Task :app:validateSigningDebug > Task :app:mergeDebugNativeLibs > Task :app:stripDebugDebugSymbols > Task :app:packageDebug > Task :app:assembleDebug BUILD SUCCESSFUL in 21s 25 actionable tasks: 25 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./Motion/gradlew + SAMPLE=./Motion + bash ./Motion/gradlew -p ./Motion -Pci --no-parallel --stacktrace assembleDebug To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.4.1/userguide/gradle_daemon.html. Daemon will be stopped at the end of the build stopping after processing > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:checkDebugManifest > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:generateDebugBuildConfig > Task :app:writeDebugApplicationId > Task :app:generateSafeArgsDebug > Task :app:mainApkListPersistenceDebug > Task :app:generateDebugResValues > Task :app:generateDebugResources > Task :app:createDebugCompatibleScreenManifests > Task :app:processDebugManifest > Task :app:mergeDebugResources > Task :app:processDebugResources > Task :app:compileDebugKotlin > Task :app:javaPreCompileDebug > Task :app:compileDebugJavaWithJavac > Task :app:compileDebugSources > Task :app:mergeDebugShaders > Task :app:compileDebugShaders > Task :app:generateDebugAssets > Task :app:mergeDebugAssets > Task :app:processDebugJavaRes NO-SOURCE > Task :app:checkDebugDuplicateClasses > Task :app:desugarDebugFileDependencies > Task :app:mergeDebugJavaResource > Task :app:transformClassesWithDexBuilderForDebug > Task :app:validateSigningDebug > Task :app:signingConfigWriterDebug > Task :app:mergeExtDexDebug > Task :app:mergeDebugJniLibFolders > Task :app:mergeDebugNativeLibs > Task :app:stripDebugDebugSymbols > Task :app:mergeDexDebug > Task :app:packageDebug > Task :app:assembleDebug BUILD SUCCESSFUL in 44s 28 actionable tasks: 28 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./RevealEffectBasic/gradlew + SAMPLE=./RevealEffectBasic + bash ./RevealEffectBasic/gradlew -p ./RevealEffectBasic -Pci --no-parallel --stacktrace assembleDebug > Task :Application:preBuild UP-TO-DATE > Task :Application:preDebugBuild > Task :Application:compileDebugAidl NO-SOURCE > Task :Application:compileDebugRenderscript NO-SOURCE > Task :Application:checkDebugManifest > Task :Application:generateDebugBuildConfig > Task :Application:prepareLintJar > Task :Application:generateDebugSources > Task :Application:javaPreCompileDebug > Task :Application:mainApkListPersistenceDebug > Task :Application:generateDebugResValues > Task :Application:generateDebugResources > Task :Application:mergeDebugResources > Task :Application:createDebugCompatibleScreenManifests > Task :Application:processDebugManifest > Task :Application:processDebugResources Note: Some input files use or override a deprecated API. > Task :Application:compileDebugJavaWithJavac Note: Recompile with -Xlint:deprecation for details. > Task :Application:compileDebugSources > Task :Application:mergeDebugShaders > Task :Application:compileDebugShaders > Task :Application:generateDebugAssets > Task :Application:mergeDebugAssets > Task :Application:checkDebugDuplicateClasses > Task :Application:mergeExtDexDebug > Task :Application:mergeLibDexDebug > Task :Application:transformClassesWithDexBuilderForDebug > Task :Application:mergeProjectDexDebug > Task :Application:validateSigningDebug > Task :Application:signingConfigWriterDebug > Task :Application:mergeDebugJniLibFolders > Task :Application:transformNativeLibsWithMergeJniLibsForDebug > Task :Application:transformNativeLibsWithStripDebugSymbolForDebug > Task :Application:processDebugJavaRes NO-SOURCE > Task :Application:transformResourcesWithMergeJavaResForDebug > Task :Application:packageDebug > Task :Application:assembleDebug Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 18s 27 actionable tasks: 27 executed + for GRADLEW in '`find . -name "gradlew"`' ++ dirname ./Unsplash/gradlew + SAMPLE=./Unsplash + bash ./Unsplash/gradlew -p ./Unsplash -Pci --no-parallel --stacktrace assembleDebug > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:checkDebugManifest > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:generateDebugBuildConfig > Task :app:prepareLintJar > Task :app:prepareLintJarForPublish > Task :app:generateDebugSources > Task :app:dataBindingExportBuildInfoDebug > Task :app:dataBindingExportFeaturePackageIdsDebug > Task :app:dataBindingMergeDependencyArtifactsDebug > Task :app:dataBindingMergeGenClassesDebug > Task :app:generateDebugResValues > Task :app:generateDebugResources > Task :app:mergeDebugResources > Task :app:dataBindingGenBaseClassesDebug > Task :app:javaPreCompileDebug > Task :app:mainApkListPersistenceDebug > Task :app:createDebugCompatibleScreenManifests > Task :app:processDebugManifest > Task :app:processDebugResources Note: /Users/owahltinez/Sandbox/samples/animation-samples/Unsplash/app/src/main/java/com/example/android/unsplash/transition/TextResize.java uses or overrides a deprecated API. > Task :app:compileDebugJavaWithJavac Note: Recompile with -Xlint:deprecation for details. Note: /Users/owahltinez/Sandbox/samples/animation-samples/Unsplash/app/src/main/java/com/example/android/unsplash/MainActivity.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. > Task :app:compileDebugSources > Task :app:mergeDebugShaders > Task :app:compileDebugShaders > Task :app:generateDebugAssets > Task :app:mergeDebugAssets > Task :app:processDebugJavaRes NO-SOURCE > Task :app:checkDebugDuplicateClasses > Task :app:mergeDebugJavaResource > Task :app:mergeLibDexDebug > Task :app:transformClassesWithDexBuilderForDebug > Task :app:mergeExtDexDebug > Task :app:validateSigningDebug > Task :app:signingConfigWriterDebug > Task :app:mergeDebugJniLibFolders > Task :app:mergeProjectDexDebug > Task :app:mergeDebugNativeLibs > Task :app:stripDebugDebugSymbols > Task :app:packageDebug > Task :app:assembleDebug BUILD SUCCESSFUL in 21s 32 actionable tasks: 32 executed
1 parent 49fb422 commit 45ed6c3

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

.github/scripts/gradlew_recursive.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# Copyright (C) 2020 The Android Open Source Project
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -xe
18+
19+
# Default Gradle settings are not optimal for Android builds, override them
20+
# here to make the most out of the GitHub Actions build servers
21+
GRADLE_OPTS="$GRADLE_OPTS -Xms4g -Xmx4g"
22+
GRADLE_OPTS="$GRADLE_OPTS -XX:+HeapDumpOnOutOfMemoryError"
23+
GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.daemon=false"
24+
GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.workers.max=2"
25+
GRADLE_OPTS="$GRADLE_OPTS -Dkotlin.incremental=false"
26+
GRADLE_OPTS="$GRADLE_OPTS -Dkotlin.compiler.execution.strategy=in-process"
27+
GRADLE_OPTS="$GRADLE_OPTS -Dfile.encoding=UTF-8"
28+
export GRADLE_OPTS
29+
30+
# Crawl all gradlew files which indicate an Android project
31+
# You may edit this if your repo has a different project structure
32+
for GRADLEW in `find . -name "gradlew"` ; do
33+
SAMPLE=$(dirname "${GRADLEW}")
34+
# Tell Gradle that this is a CI environment and disable parallel compilation
35+
bash "$GRADLEW" -p "$SAMPLE" -Pci --no-parallel --stacktrace $@
36+
done

.github/workflows/android.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright (C) 2020 The Android Open Source Project
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Android CI
16+
17+
on:
18+
push:
19+
branches: [ master ]
20+
pull_request:
21+
branches: [ master ]
22+
23+
jobs:
24+
25+
build:
26+
name: Build
27+
runs-on: ubuntu-18.04
28+
29+
steps:
30+
- uses: actions/checkout@v1
31+
- name: set up JDK 1.8
32+
uses: actions/setup-java@v1
33+
with:
34+
java-version: 1.8
35+
- name: Build project
36+
run: .github/scripts/gradlew_recursive.sh assembleDebug
37+
- name: Zip artifacts
38+
run: zip -r assemble.zip . -i '**/build/*.apk' '**/build/*.aab' '**/build/*.aar' '**/build/*.so'
39+
- name: Upload artifacts
40+
uses: actions/upload-artifact@v1
41+
with:
42+
name: assemble
43+
path: assemble.zip

0 commit comments

Comments
 (0)