-
Notifications
You must be signed in to change notification settings - Fork 173
77 lines (63 loc) · 2.27 KB
/
nightly-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: MekHQ Nightly CI
on:
schedule:
- cron: "0 0 * * *"
env:
GRADLE_OPTS: "-Dscan.link.VCS=https://github.com/MegaMek/mekhq/commit/${{ github.sha }}"
jobs:
nightly_ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java-distribution: [temurin]
java-version: [17]
fail-fast: false
name: Nightly MekHQ CI ${{ matrix.os }} on ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }}
steps:
- uses: actions/checkout@v4
with:
path: mekhq
- name: Checkout MegaMek
uses: actions/checkout@v4
with:
repository: MegaMek/megamek
path: megamek
- name: Checkout MegaMekLab
uses: actions/checkout@v4
with:
repository: MegaMek/megameklab
path: megameklab
- name: Set up ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Add MHQRevision file
run: |
echo ${{ github.sha }} >> mekhq/MekHQ/mhq-revision.txt
- name: Build with Gradle
working-directory: mekhq
run: ./gradlew clean build --stacktrace --scan
- name: Upload Test Logs on Failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }}-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }}-ci-failure-logs
path: mekhq/MekHQ/build/reports/
- name: Upload Tar GZ Artifact
uses: actions/upload-artifact@v4
with:
name: mhq-release-tgz-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }}
path: mekhq/MekHQ/build/distributions/*.tar.gz
# - name: Upload Zip Release
# uses: actions/upload-artifact@v4
# with:
# name: mhq-release-zip-${{ matrix.java-distribution }}-jdk${{ matrix.java-version }}
# path: mekhq/MekHQ/build/distributions/*.zip