mirror of
https://github.com/strato-emu/strato.git
synced 2025-04-02 10:41:51 -04:00
CI now performs build checks on pushes to the master branch only. For pull requests, the dev variant of the app is built and artifacts are uploaded for ease of testing and side-by-side installation. PR builds use autogenerated debug signing keys, resulting in different keys being used for each build on purpose to ensure they cannot be installed over each other, avoiding any possible conflict between two PRs.
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
# A workflow to verify the build on every push to the master branch
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Git Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Restore CCache
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
with:
|
|
max-size: 3Gi
|
|
|
|
- name: Restore Gradle Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.gradle/
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('app/**/*.xml') }}-${{ hashFiles('app/**.kt', 'app/**.java') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('app/**/*.xml') }}-
|
|
${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}-
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Install Java 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin' # Temurin should come pre-installed on GitHub-hosted runners
|
|
java-version: '17'
|
|
|
|
- name: Install Ninja Build
|
|
run: |
|
|
sudo apt-get install -y ninja-build
|
|
ln -s /usr/bin/ninja .
|
|
|
|
- name: Android Assemble
|
|
env:
|
|
CMAKE_C_COMPILER_LAUNCHER: "ccache"
|
|
CMAKE_CXX_COMPILER_LAUNCHER: "ccache"
|
|
CCACHE_COMPILERCHECK: "string:${{ env.NDK_VERSION }}" # Use NDK version instead of compiler timestamp
|
|
run: ./gradlew --no-daemon --stacktrace --build-cache --parallel --configure-on-demand assembleMainlineRelease
|