fixed subtitle #1649
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: "Build" | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| pull_request: | |
| branches: | |
| - "**" | |
| - "!master" | |
| jobs: | |
| generate-build-matrix: | |
| runs-on: ubuntu-latest | |
| name: Generate build matrix | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: "Generate matrix for the run job" | |
| id: set-matrix | |
| run: ./.github/scripts/generate-run-matrix.sh | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: generate-build-matrix | |
| continue-on-error: true | |
| timeout-minutes: 30 | |
| name: Build ${{ matrix.mod_loader }} ${{ matrix.version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.generate-build-matrix.outputs.matrix) }} | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: "Set up JDK" | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| - name: "Setup gradle" | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: false | |
| gradle-version: wrapper | |
| add-job-summary: 'on-failure' | |
| - name: "Parse gradle properties" | |
| id: gradle-properties | |
| run: ./.github/scripts/parse-gradle-properties.sh ${{ matrix.version }} | |
| - name: "Run build" | |
| run: ./gradlew :${{ matrix.mod_loader }}:${{ matrix.version }}:build | |
| - name: "Upload artifacts" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.gradle-properties.outputs.MOD_ID }}-${{ matrix.mod_loader }}-${{ steps.gradle-properties.outputs.MOD_VERSION }}+mc${{ matrix.version }} | |
| if-no-files-found: error | |
| path: ./${{ matrix.mod_loader }}/versions/${{ matrix.version }}/build/libs/*.jar | |
| run-client: | |
| runs-on: ubuntu-latest | |
| needs: [ build, generate-build-matrix ] | |
| if: ${{ success() && !cancelled() }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.generate-build-matrix.outputs.matrix) }} | |
| name: Run ${{ matrix.mod_loader }} ${{ matrix.version }} client | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: "Set up JDK" | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| - name: "Parse gradle properties" | |
| id: gradle-properties | |
| run: ./.github/scripts/parse-gradle-properties.sh ${{ matrix.version }} | |
| - name: "Download artifacts" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ steps.gradle-properties.outputs.MOD_ID }}-${{ matrix.mod_loader }}-${{ steps.gradle-properties.outputs.MOD_VERSION }}+mc${{ matrix.version }} | |
| path: ./${{ matrix.mod_loader }}/versions/${{ matrix.version }}/build/libs | |
| - name: "Copy mod jar to run/mods" | |
| run: mkdir -p run/mods && cp ./${{ matrix.mod_loader }}/versions/${{ matrix.version }}/build/libs/*.jar run/mods | |
| - name: "Download ResourcefulLib" | |
| run: | | |
| MOD_URL=$(./.github/scripts/get-modrinth-dependency-url.sh "resourceful-lib" "${{ steps.gradle-properties.outputs.DEPS_RESOURCEFUL_LIB_LIB }}" "${{ matrix.mod_loader }}") | |
| wget -P run/mods "$MOD_URL" | |
| - name: "Download YACL" | |
| run: | | |
| MOD_URL=$(./.github/scripts/get-modrinth-dependency-url.sh "yacl" "${{ steps.gradle-properties.outputs.DEPS_YACL }}-${{ matrix.mod_loader }}" "${{ matrix.mod_loader }}") | |
| wget -P run/mods "$MOD_URL" | |
| - name: Run ${{ matrix.version }} ${{ matrix.mod_loader }} client | |
| uses: 3arthqu4ke/[email protected] | |
| with: | |
| mc: ${{ matrix.version }} | |
| modloader: ${{ matrix.mod_loader }} | |
| regex: .*${{ matrix.mod_loader }}.* | |
| mc-runtime-test: ${{ matrix.mod_loader_alias }} | |
| java: ${{ steps.gradle-properties.outputs.JAVA_VERSION }} | |
| fabric-api: ${{ steps.gradle-properties.outputs.DEPS_FABRIC_API }} | |
| xvfb: false | |
| headlessmc-command: -lwjgl --retries 3 --jvm -Djava.awt.headless=true | |
| cache-mc: true | |
| run-server: | |
| runs-on: ubuntu-latest | |
| needs: [ build, generate-build-matrix ] | |
| if: ${{ success() && !cancelled() }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.generate-build-matrix.outputs.matrix) }} | |
| name: Run ${{ matrix.mod_loader }} ${{ matrix.version }} server | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: "Set up JDK" | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| - name: "Parse gradle properties" | |
| id: gradle-properties | |
| run: ./.github/scripts/parse-gradle-properties.sh ${{ matrix.version }} | |
| - name: "Download artifacts" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ steps.gradle-properties.outputs.MOD_ID }}-${{ matrix.mod_loader }}-${{ steps.gradle-properties.outputs.MOD_VERSION }}+mc${{ matrix.version }} | |
| path: ./${{ matrix.mod_loader }}/versions/${{ matrix.version }}/build/libs | |
| - name: "Copy mod jar to run/mods" | |
| run: mkdir -p run/mods && cp ./${{ matrix.mod_loader }}/versions/${{ matrix.version }}/build/libs/*.jar run/mods | |
| - name: "Download ResourcefulLib" | |
| run: | | |
| MOD_URL=$(./.github/scripts/get-modrinth-dependency-url.sh "resourceful-lib" "${{ steps.gradle-properties.outputs.DEPS_RESOURCEFUL_LIB_LIB }}" "${{ matrix.mod_loader }}") | |
| wget -P run/mods "$MOD_URL" | |
| - name: "Download YACL" | |
| run: | | |
| MOD_URL=$(./.github/scripts/get-modrinth-dependency-url.sh "yacl" "${{ steps.gradle-properties.outputs.DEPS_YACL }}-${{ matrix.mod_loader }}" "${{ matrix.mod_loader }}") | |
| wget -P run/mods "$MOD_URL" | |
| - name: Run ${{ matrix.version }} ${{ matrix.mod_loader }} server | |
| uses: headlesshq/[email protected] | |
| with: | |
| mc: ${{ matrix.version }} | |
| modloader: ${{ matrix.mod_loader }} | |
| java: ${{ steps.gradle-properties.outputs.JAVA_VERSION }} | |
| fabric-api: ${{ steps.gradle-properties.outputs.DEPS_FABRIC_API }} | |
| headlessmc-command: -lwjgl --retries 3 --jvm -Djava.awt.headless=true | |
| cache-mc: true |