CI #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build MiniDNS | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
java: | |
- 17 | |
- 21 | |
env: | |
PRIMARY_JAVA_VERSION: 21 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
# Caches | |
- name: Cache Maven | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: maven-${{ hashFiles('**/build.gradle') }} | |
restore-keys: | | |
maven- | |
- name: Cache Gradle | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: gradle-caches-${{ hashFiles('**/build.gradle') }} | |
restore-keys: | |
gradle-caches | |
- name: Cache Gradle Binary | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/gradle-bin-${GRADLE_VERSION}/ | |
key: gradle-bin-${GRADLE_VERSION} | |
- name: Cache Android SDK | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.android/sdk | |
key: android-${{ hashFiles('build.gradle') }} | |
restore-keys: | | |
android- | |
# Pre-reqs | |
- name: Install Android SDK Manager | |
uses: android-actions/setup-android@v2 | |
- name: Install Android SDK | |
run: | | |
sdkmanager \ | |
"platforms;android-19" \ | |
"platforms;android-23" | |
# Testing | |
- name: Gradle Check | |
run: ./gradlew check --stacktrace | |
# Test local publish | |
- name: Gradle publish | |
run: ./gradlew publishToMavenLocal --stacktrace | |
# Javadoc | |
- name: Javadoc | |
if: ${{ matrix.java == env.PRIMARY_JAVA_VERSION }} | |
run: ./gradlew javadocAll --stacktrace | |
# Test Coverage Report | |
- name: Jacoco Test Coverage | |
run: ./gradlew minidns-hla:testCodeCoverageReport | |
# Coveralls | |
- name: Report coverage stats to Coveralls | |
if: ${{ matrix.java == env.PRIMARY_JAVA_VERSION }} | |
uses: coverallsapp/github-action@v2 | |
with: | |
format: jacoco | |
file: minidns-hla/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml | |
# Upload build artifacts | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: smack-java-${{ matrix.java }} | |
path: | | |
minidns-*/build/libs/*.jar | |
!**/*-test-fixtures.jar | |
!**/*-tests.jar |