Skip to content

Remove dependency-builder, use ndkports instead. Upgrade deps #121

Remove dependency-builder, use ndkports instead. Upgrade deps

Remove dependency-builder, use ndkports instead. Upgrade deps #121

Workflow file for this run

# MIT License
#
# Copyright (c) 2021, 2022, 2024 ViliusSutkus89.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: build
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/build.yml'
permissions:
actions: none
checks: none
contents: none
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
build:
if: "!contains(github.event.head_commit.message, '[SkipCI]')"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: android-actions/setup-android@v3
- run: ./gradlew lintRelease publishToMavenLocal
- uses: actions/upload-artifact@v4
with:
name: library-lint-report
path: wvWare/build/reports/lint-results-release.html
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: maven-local
path: ~/.m2
if-no-files-found: error
instrumentedTests-aosp_atd-target:
# Only macos VMs are available with exposed CPU extensions to run hardware accelerated emulator
runs-on: macos-13
name: android-${{ matrix.api-level }} on ${{ matrix.arch }} (${{ matrix.api-type-target }})
needs: build
strategy:
fail-fast: false
matrix:
api-level: [34, 33, 32, 31, 30]
arch: [x86_64]
api-type-target: [aosp_atd]
include:
- api-level: 30
arch: x86
api-type-target: aosp_atd
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: android-actions/setup-android@v3
- uses: reactivecircus/android-emulator-runner@v2
with:
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.api-type-target }}
sdcard-path-or-size: 1G
disk-size: 8G
script: |
mkdir -p testResults/screenshots
adb logcat > testResults/logcat.txt &
adb shell screencap /data/local/tmp/beforeTests.png
adb pull /data/local/tmp/beforeTests.png testResults/screenshots/
./gradlew connectedCheck || touch sorry_but_tests_are_failing
adb pull /sdcard/Pictures/screenshots testResults/ || true
adb shell screencap /data/local/tmp/afterTests.png
adb pull /data/local/tmp/afterTests.png testResults/screenshots/
mv wvWare/build/reports/androidTests/connected testResults/
mv wvWare/build/outputs/androidTest-results testResults/
test ! -f sorry_but_tests_are_failing
- uses: actions/upload-artifact@v4
if: always()
with:
name: testResults-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.api-type-target }}
path: testResults
if-no-files-found: error
instrumentedTests-default-target:
# Only macos VMs are available with exposed CPU extensions to run hardware accelerated emulator
runs-on: macos-13
name: android-${{ matrix.api-level }} on ${{ matrix.arch }} (${{ matrix.api-type-target }})
needs: build
strategy:
fail-fast: false
matrix:
api-level: [29, 28, 27, 26, 25, 24, 23, 22, 21]
arch: [x86_64, x86]
api-type-target: [default]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: android-actions/setup-android@v3
- uses: reactivecircus/android-emulator-runner@v2
with:
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.api-type-target }}
sdcard-path-or-size: 1G
disk-size: 8G
script: |
mkdir -p testResults/screenshots
adb logcat > testResults/logcat.txt &
adb shell screencap /data/local/tmp/beforeTests.png
adb pull /data/local/tmp/beforeTests.png testResults/screenshots/
./gradlew connectedCheck || touch sorry_but_tests_are_failing
adb pull /sdcard/Pictures/screenshots testResults/ || true
adb shell screencap /data/local/tmp/afterTests.png
adb pull /data/local/tmp/afterTests.png testResults/screenshots/
mv wvWare/build/reports/androidTests/connected testResults/
mv wvWare/build/outputs/androidTest-results testResults/
test ! -f sorry_but_tests_are_failing
- uses: actions/upload-artifact@v4
if: always()
with:
name: testResults-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.api-type-target }}
path: testResults
if-no-files-found: error