Elytra Icon For End City Ships #4
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: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| compile-cubiomes: | |
| name: Compile Cubiomes to shared library | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Compile shared library (ubuntu-latest) | |
| if: matrix.os == 'ubuntu-latest' | |
| working-directory: src/main/c/cubiomes | |
| run: | | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --config Release | |
| cp build/libcubiomes.so ../../resources/libcubiomes.so | |
| - name: Compile shared library (macos-latest) | |
| if: matrix.os == 'macos-latest' | |
| working-directory: src/main/c/cubiomes | |
| run: | | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" | |
| cmake --build build --config Release | |
| cp build/libcubiomes.dylib ../../resources/libcubiomes.dylib | |
| - name: Set up MSYS2 (windows-latest) | |
| if: matrix.os == 'windows-latest' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| update: true | |
| install: > | |
| base-devel | |
| mingw-w64-x86_64-toolchain | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-ninja | |
| - name: Compile shared library (windows-latest) | |
| if: matrix.os == 'windows-latest' | |
| working-directory: src/main/c/cubiomes | |
| shell: msys2 {0} | |
| run: | | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --config Release | |
| cp build/cubiomes.dll ../../resources/cubiomes.dll | |
| - name: Compute SHA256 hash (ubuntu-latest) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: sha256sum src/main/resources/libcubiomes.so | |
| - name: Compute SHA256 hash (macos-latest) | |
| if: matrix.os == 'macos-latest' | |
| run: shasum -a 256 src/main/resources/libcubiomes.dylib | |
| - name: Compute SHA256 hash (windows-latest) | |
| if: matrix.os == 'windows-latest' | |
| run: Get-FileHash -Algorithm SHA256 src/main/resources/cubiomes.dll | |
| - name: Capture shared library (ubuntu-latest) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libcubiomes.so | |
| path: src/main/resources/libcubiomes.so | |
| - name: Capture shared library (macos-latest) | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libcubiomes.dylib | |
| path: src/main/resources/libcubiomes.dylib | |
| - name: Capture shared library (windows-latest) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cubiomes.dll | |
| path: src/main/resources/cubiomes.dll | |
| build: | |
| name: Build SeedMapper | |
| needs: compile-cubiomes | |
| runs-on: ubuntu-latest | |
| env: | |
| LLVM_HOME: /usr/lib/llvm-13 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Capture shared library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| path: src/main/resources/ | |
| - name: Validate gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v4 | |
| - name: Setup JDK 23 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 23 | |
| distribution: 'temurin' | |
| - name: Make Gradle wrapper executable | |
| run: | | |
| chmod +x ./gradlew | |
| chmod +x ./jextract/gradlew | |
| - name: Install LLVM 13 | |
| run: | | |
| wget --no-verbose https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz | |
| tar -xf clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz | |
| sudo mv clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04 $LLVM_HOME | |
| - name: Compile jextract | |
| working-directory: jextract | |
| run: ./gradlew --stacktrace -Pjdk_home=$JAVA_HOME -Pllvm_home=$LLVM_HOME clean verify | |
| - name: Build | |
| run: ./gradlew build | |
| - name: Capture build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SeedMapper | |
| path: build/libs/ |