Yatopia/.github/workflows/build.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2020-02-26 17:29:12 +01:00
name: CI
2020-07-15 21:01:42 +02:00
on: [push, pull_request]
2020-02-26 17:29:12 +01:00
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
2020-07-17 05:18:15 +02:00
java: [11, 8, 14]
2020-02-26 17:29:12 +01:00
steps:
2020-07-18 06:58:35 +02:00
- uses: actions/checkout@v2.2.0
- name: Set up JDK ${{ matrix.java }}
2020-03-21 17:32:08 +01:00
uses: actions/setup-java@v1.3.0
with:
java-version: ${{ matrix.java }}
- name: Pull Maven Cache
uses: actions/cache@v1.1.2
id: maven-cache
2020-07-11 22:31:40 +02:00
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
2020-07-17 05:18:15 +02:00
- uses: s4u/maven-settings-action@v2.1.0
2020-07-17 17:39:18 +02:00
name: Use ${{ matrix.java }} as the java target
2020-07-17 05:18:15 +02:00
with:
2020-07-17 17:39:18 +02:00
properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]'
- name: Setup YAPFA Project
run: |
git submodule update --init --recursive -f
git config --global user.email "ci@github.com"
git config --global user.name "Github CI"
sudo chmod -R -f 777 scripts
- name: Build Maven Depends
if: steps.maven-cache.outputs.cache-hit != 'true'
run: |
cd Tuinity
./tuinity jar
cd ..//
2020-02-26 17:29:12 +01:00
- name: Build YAPFA
run: |
2020-07-17 04:02:27 +02:00
./yapfa full
2020-03-22 17:20:21 +01:00
- name: Upload Artifact
2020-07-18 06:58:35 +02:00
uses: actions/upload-artifact@v2.0.1
2020-03-22 17:20:21 +01:00
with:
2020-05-23 16:19:40 +02:00
name: YAPFA-${{ matrix.java }}
2020-07-17 05:44:48 +02:00
path: target/YAPFA-1.16.1-paperclip.jar