mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: PR
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
BUILD_DIRS_ARTIFACT: build-dirs
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # Need the tags to build
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Run pre-commit
|
|
uses: pre-commit/action@v3.0.1
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: pre-commit
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # Need the tags to build
|
|
- name: Setup
|
|
uses: ./.github/actions/setup
|
|
- name: Native build
|
|
uses: ./.github/actions/native-build
|
|
with:
|
|
cache: true
|
|
- name: Build app
|
|
id: buildapp
|
|
run: |
|
|
./gradlew clean assembleDebug
|
|
echo "apk=$(ls app/build/outputs/apk/debug/Wholphin-debug*.apk)" >> "$GITHUB_OUTPUT"
|
|
- name: Tar build dirs
|
|
run: |
|
|
tar -czf build.tgz ./app/.
|
|
- uses: actions/upload-artifact@v5
|
|
id: upload-build-dirs
|
|
with:
|
|
name: "${{ env.BUILD_DIRS_ARTIFACT }}"
|
|
path: build.tgz
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v5
|
|
with:
|
|
name: Wholphin-debug.apk
|
|
path: "${{ steps.buildapp.outputs.apk }}"
|
|
compression-level: 0
|