From 345f8b7c0246464e1895bfe3dcfd70f23218e365 Mon Sep 17 00:00:00 2001 From: Julian Kalinowski Date: Fri, 24 Nov 2023 14:03:56 +0100 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..daa2a6e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,64 @@ +name: Android CI + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + build: + runs-on: macos-14 + + steps: + - uses: actions/checkout@v3 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches/modules-* + ~/.gradle/caches/jars-* + ~/.gradle/caches/build-cache-* + key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build library + run: ./gradlew assembleRelease + - name: Build sample apps + run: ./gradlew -p sample-app assembleRelease + - name: Build playground app + run: ./gradlew -p playground-app assembleRelease + + test: + runs-on: macos-14 + + steps: + - uses: actions/checkout@v3 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches/modules-* + ~/.gradle/caches/jars-* + ~/.gradle/caches/build-cache-* + key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Test library + run: ./gradlew check