Skip to content

Merge until1.12.2 and upstream-master into version-specific directories #8

Merge until1.12.2 and upstream-master into version-specific directories

Merge until1.12.2 and upstream-master into version-specific directories #8

Workflow file for this run

name: Build 1.18 (Master Branch)

Check failure on line 1 in .github/workflows/build-1.18.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-1.18.yml

Invalid workflow file

(Line: 68, Col: 14): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.build_shell, (Line: 73, Col: 14): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.build_shell, (Line: 83, Col: 14): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.gradle_shell, (Line: 89, Col: 14): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.gradle_shell
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
platform: linux
build_script: build_lib_for_x11.sh
native_deps: build-essential libx11-dev libxtst-dev
gradle_cmd: ./gradlew
build_shell: bash
gradle_shell: bash
- os: macos-13
platform: macos
build_script: build_lib_for_mac.sh
native_deps: ''
gradle_cmd: ./gradlew
build_shell: bash
gradle_shell: bash
- os: windows-2022
platform: windows
build_script: build_lib_for_win.sh
native_deps: ''
gradle_cmd: gradlew.bat
build_shell: msys2 {0}
gradle_shell: cmd
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Install build dependencies (Linux)
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.native_deps }}
- name: Set up MinGW (Windows)
if: matrix.platform == 'windows'
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-toolchain
make
- name: Build native library (Windows)
if: matrix.platform == 'windows'
shell: ${{ matrix.build_shell }}
run: ./${{ matrix.build_script }}
- name: Build native library (Linux/macOS)
if: matrix.platform != 'windows'
shell: ${{ matrix.build_shell }}
run: chmod +x ${{ matrix.build_script }} && ./${{ matrix.build_script }}
- name: Set executable permissions for gradlew (Linux/macOS)
if: matrix.platform != 'windows'
run: |
chmod +x forge/gradlew
chmod +x fabric/gradlew
- name: Build Forge mod
shell: ${{ matrix.gradle_shell }}
run: |
cd forge
${{ matrix.gradle_cmd }} build --no-daemon
- name: Build Fabric mod
shell: ${{ matrix.gradle_shell }}
run: |
cd fabric
${{ matrix.gradle_cmd }} build --no-daemon
- name: Upload Forge artifacts
uses: actions/upload-artifact@v4
with:
name: forge-mod-${{ matrix.platform }}
path: forge/build/libs/*.jar
- name: Upload Fabric artifacts
uses: actions/upload-artifact@v4
with:
name: fabric-mod-${{ matrix.platform }}
path: fabric/build/libs/*.jar