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

Actions builds (CI) #2

Merged
merged 1 commit into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 36 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Test

on:
pull_request:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set +x
run: chmod a+x gradlew
- name: Build and test
run: ./gradlew clean assembleDebug test
- name: Collate tests
if: ${{ true }}
run: |
mkdir -p build/test_results
find . -regextype posix-extended -regex '.*reports/tests/([^/]+?)' -exec cp -r {} build/test_results/ \;
- name: Upload test results
if: ${{ true }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: build/test_results
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: app-debug
path: TeamCode/build/outputs/apk/debug/TeamCode-debug.apk
3 changes: 3 additions & 0 deletions TeamCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
annotationProcessor files('lib/OpModeAnnotationProcessor.jar')
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
1 change: 1 addition & 0 deletions build.common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.util.regex.Pattern

apply plugin: 'com.adarshr.test-logger'
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'

Expand Down
2 changes: 2 additions & 0 deletions build.dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ dependencies {
runtimeOnly 'org.tensorflow:tensorflow-lite:2.12.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
// Note for FTC Teams: Do not modify this yourself.
// no lol -Miles
classpath 'com.android.tools.build:gradle:8.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.adarshr:gradle-test-logger-plugin:4.0.0"
}
}

Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Allow Gradle to use up to 1 GB of RAM
org.gradle.jvmargs=-Xmx1024M
# Allow Gradle to use up to 2 GB of RAM
org.gradle.jvmargs=-Xmx2048M
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.nonFinalResIds=true
org.gradle.configuration-cache=true