Skip to content

[Release] 0.11.3 release! #620

[Release] 0.11.3 release!

[Release] 0.11.3 release! #620

Workflow file for this run

# mirror of the Jenkins pipeline, used for requiring PRs to build successfully before merging
# this uses Actions because it's easier to integrate with GitHub PRs, and to allow running the build on forks
name: Build pull request
on:
pull_request:
merge_group:
workflow_dispatch:
# trigger on pushes to the default branch (main) to keep the cache up to date
push:
branches: main
env:
JAVA_VERSION: 17
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- uses: gradle/actions/setup-gradle@v4
- name: Build
run: |
chmod +x gradlew
./gradlew build
- name: Prepare artifacts for upload
run: |
mkdir -p dist
cp {Common,Forge,Fabric}/build/libs/*.jar dist
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mod-build
path: dist
retention-days: 30
test:
needs: build
strategy:
fail-fast: false
matrix:
env:
- server
- client
modloader:
- fabric
- forge
include:
- modloader: fabric
mc-runtime-test: fabric
fabric-api: 0.87.0
dependencies: >-
'https://cdn.modrinth.com/data/Ha28R6CL/versions/vlhvI5Li/fabric-language-kotlin-1.10.18%2Bkotlin.1.9.22.jar'
'https://cdn.modrinth.com/data/9s6osm5g/versions/s7VTKfLA/cloth-config-11.1.106-fabric.jar'
'https://cdn.modrinth.com/data/TZo2wHFe/versions/dabyDTwJ/paucal-0.6.0%2B1.20.1-fabric.jar'
'https://cdn.modrinth.com/data/fin1PX4m/versions/fBoxabC2/inline-fabric-1.20.1-1.0.1.jar'
'https://cdn.modrinth.com/data/K01OU20C/versions/HykM2Qyv/cardinal-components-api-5.2.1.jar'
'https://cdn.modrinth.com/data/nU0bVIaL/versions/Y6tuH1cn/Patchouli-1.20.1-84-FABRIC.jar'
'https://cdn.modrinth.com/data/mOgUt4GM/versions/zv46i3PW/modmenu-7.1.0.jar'
'https://cdn.modrinth.com/data/5aaWibi9/versions/z8ProfKL/trinkets-3.7.0.jar'
- modloader: forge
mc-runtime-test: lexforge
fabric-api: none
dependencies: >-
'https://cdn.modrinth.com/data/ordsPcFz/versions/9j6YaPp2/kotlinforforge-4.10.0-all.jar'
'https://cdn.modrinth.com/data/9s6osm5g/versions/JoLgnJ0G/cloth-config-11.1.106-forge.jar'
'https://cdn.modrinth.com/data/TZo2wHFe/versions/HyBiJPtT/paucal-0.6.0%2B1.20.1-forge.jar'
'https://cdn.modrinth.com/data/fin1PX4m/versions/huiPd6Lc/inline-forge-1.20.1-1.0.1.jar'
'https://cdn.modrinth.com/data/40FYwb4z/versions/fs9CeXYZ/caelus-forge-3.1.0%2B1.20.jar'
'https://cdn.modrinth.com/data/nU0bVIaL/versions/JMtc0mTS/Patchouli-1.20.1-84-FORGE.jar'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Create cache key
run: |
cat <<END_OF_FILE > dependencies.txt
${{ matrix.dependencies }}
END_OF_FILE
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: run/mods
key: ${{ hashFiles('dependencies.txt') }}
- name: Download dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
for url in ${{ matrix.dependencies }}; do
wget --directory-prefix=run/mods/ "$url"
done
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: mod-build
path: dist
- name: Prepare mod jar
run: |
rm -f dist/*-javadoc.jar dist/*-sources.jar
cp dist/hexcasting-${{ matrix.modloader }}-*.jar run/mods
- name: Run MC test client
if: matrix.env == 'client'
timeout-minutes: 10
uses: headlesshq/[email protected]
with:
java: ${{ env.JAVA_VERSION }}
mc: 1.20.1
modloader: ${{ matrix.modloader }}
regex: '.*${{ matrix.modloader }}.*'
fabric-api: ${{ matrix.fabric-api }}
mc-runtime-test: ${{ matrix.mc-runtime-test }}
- name: Run MC test server
if: matrix.env == 'server'
timeout-minutes: 10
uses: headlesshq/[email protected]
with:
java: ${{ env.JAVA_VERSION }}
mc: 1.20.1
modloader: ${{ matrix.modloader }}
fabric-api: ${{ matrix.fabric-api }}
datagen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- uses: gradle/actions/setup-gradle@v4
# ForgeGradle datagen asset download often fails (see #692)
# so just allow it to automatically retry a few times
- name: Run datagen
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: |
chmod +x gradlew
./gradlew runAllDatagen
- name: Check datagen
run: |
git add --intent-to-add .
git diff --name-only --exit-code -- ":!:*/src/generated/resources/.cache/*"
hexdoc:
# don't bother running the docs build when pushing to main - nothing necessary to cache here
if: github.event_name != 'push'
uses: hexdoc-dev/actions/.github/workflows/hexdoc.yml@v1
permissions:
contents: write
pages: read
secrets:
GH_TOKEN: ""
with:
python-version: "3.11"
release: false
deploy-pages: false
site-url: https://hexcasting.hexxy.media