-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (50 loc) · 1.53 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Check
on:
push:
jobs:
actionlint:
name: Lint GitHub workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Check GitHub workflows
run: ${{ steps.get_actionlint.outputs.executable }} -color
check:
name: Check gradle build (java ${{ matrix.javaVersion }})
runs-on: ubuntu-latest
strategy:
matrix:
javaVersion: [17, 21, 23]
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.javaVersion }}
- name: Lint
run: ./gradlew lint
- name: Test
run: ./gradlew test
- name: Assemble Debug
shell: bash
run: |
./gradlew assembleDebug
DIRNAME=upload/termux-debug-apks-"$GITHUB_SHA"
mkdir -p "$DIRNAME"
shopt -s globstar; for file in termux-*/**/*.apk; do FILENAME="$(basename "$file")"; cp "$file" "$DIRNAME"/"${FILENAME/.apk/-$GITHUB_SHA.apk}"; done
- uses: actions/upload-artifact@v4
if: matrix.javaVersion == '21'
with:
name: termux-debug-apks-${{ github.sha }}
path: upload/
gradle-wrapper-validation:
name: Validate gradle wrappers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4