Skip to content

Add basic architectury networking setup #34

Add basic architectury networking setup

Add basic architectury networking setup #34

Workflow file for this run

name: Run tests
on:
push:
branches: "*"
pull_request:
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
java-version: [17]
mappings: [mojmap, yarn]
include:
# artifacts forbid `:` in filenames because of NTFS
# so just upload from Windows since hexdoc already accounts for that
- os: windows-latest
java-version: 17
upload: true
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Install Nox
run: pip install nox
- name: Copy template
run: nox -s ctt
- uses: gradle/gradle-build-action@v2
with:
build-root-directory: .ctt/${{ matrix.mappings }}
- name: Run tests
run: nox -k ${{ matrix.mappings }}
# kill java because gradle leaves an orphaned process that interferes with git clean
- name: Prepare rendered project for upload
if: matrix.upload
run: |
mkdir _build
cp .ctt/${{ matrix.mappings }}/*/build/libs/*.jar _build
cd .ctt/${{ matrix.mappings }}
taskkill /F /IM "java.exe"
git config core.longPaths true
git clean -fdX --exclude "!_site/"
rm -Recurse -Force .git
- name: Upload full rendered project artifact
if: matrix.upload
uses: actions/upload-artifact@v4
with:
name: example-project-${{ matrix.mappings }}
path: .ctt/${{ matrix.mappings }}/
- name: Upload build artifact
if: matrix.upload
uses: actions/upload-artifact@v4
with:
name: example-build-${{ matrix.mappings }}
path: _build/