Action-SpigotMC/.github/workflows/build.yml

53 lines
1.6 KiB
YAML
Raw Normal View History

2020-11-01 01:27:31 +00:00
name: 'Build & Run'
on:
push:
branches: [ master ]
pull_request:
jobs:
# Make sure clean build works properly
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-11-24 18:17:58 +00:00
- name: Install dependencies and build
run: |
2020-11-01 01:27:31 +00:00
npm i
npm run build
# Make sure the action works on a clean machine without building it
2020-11-01 01:27:31 +00:00
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-11-24 18:17:58 +00:00
- name: Compile 2 spigot version
uses: ./
with:
versions: latest, 1.8
# Run again. The Action should detect that the requested versions are already inside the local maven repo
2020-11-24 18:17:58 +00:00
- name: Compile the same versions agains
uses: ./
2020-11-01 01:27:31 +00:00
with:
# These versions should match the ones above
2020-11-01 01:27:31 +00:00
versions: latest, 1.8
2020-11-24 18:17:58 +00:00
2020-11-24 14:03:56 +00:00
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs
path: /tmp/SpraxDev-Action-SpigotMC/logs/
2020-11-01 01:27:31 +00:00
# Run the original BuildTools in GitHub Actions to easily compare the build times etc.
original-run:
runs-on: ubuntu-latest
steps:
- name: Run original Spigot-BuildTools
# These versions should match the ones from the 'run'-job
# Using '--compile Spigot' as this action does the same by default
2020-11-01 01:27:31 +00:00
run: |
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
java -jar BuildTools.jar --rev latest --compile Spigot
java -jar BuildTools.jar --rev 1.8 --compile Spigot