mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 02:09:41 +02:00
Add Makefile; CI: Remove Circle/Travis, add GitHub Actions
This commit is contained in:
parent
6fbd399a4b
commit
ff62aa5a07
5 changed files with 129 additions and 41 deletions
69
.github/workflows/build-android-project.yml
vendored
Normal file
69
.github/workflows/build-android-project.yml
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
name: "CI"
|
||||
|
||||
on: [push, pull_request_target]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip') && (!contains(github.event_name, 'pull_request') || (contains(github.event_name, 'pull_request') && github.event.pull_request.head.repo.full_name != github.repository))"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: "Checkout: Code"
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: "Checkout: Code (PR)"
|
||||
uses: actions/checkout@v2
|
||||
if: "contains(github.event_name, 'pull_request')"
|
||||
with:
|
||||
ref: ${{github.event.pull_request.head.ref}}
|
||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||
|
||||
- name: "Setup: Java"
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: "Cache: Gradle"
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
.gradle
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.*') }}
|
||||
|
||||
- name: "Build: Project with make"
|
||||
run: make clean all
|
||||
|
||||
- name: "Build: List dist files"
|
||||
if: always()
|
||||
run: find dist -type f -maxdepth 2
|
||||
|
||||
- name: "Artifacts: All"
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
name: "all"
|
||||
path: dist
|
||||
retention-days: 5
|
||||
|
||||
- name: "Artifacts: Android APK"
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
name: "android-apk"
|
||||
path: |
|
||||
dist/*.apk
|
||||
|
||||
- name: "Test: JUnit report"
|
||||
if: always()
|
||||
uses: mikepenz/action-junit-report@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
report_paths: 'dist/tests/TEST-*.xml'
|
||||
check_name: "JUnit"
|
||||
|
||||
- name: "Test: Android Lint"
|
||||
if: always()
|
||||
uses: yutailang0119/action-android-lint@v1.0.2
|
||||
with:
|
||||
xml_path: 'dist/lint/lint-results-flavorDefaultDebug.xml'
|
Loading…
Add table
Add a link
Reference in a new issue