redistribute and replace maven with gradle #2
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: test | |
| on: [push, pull_request] | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Update Package Information | |
| run: sudo apt-get update | |
| - name: Install Dependencies | |
| run: sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Build with Gradle | |
| run: | | |
| export XVFB_WHD="1920x1080x24" | |
| export DISPLAY=":99" | |
| export GALLIUM_DRIVER="llvmpipe" | |
| export LIBGL_ALWAYS_SOFTWARE="1" | |
| # Start Xvfb | |
| echo "Starting Xvfb" | |
| Xvfb :99 -ac -screen 0 "$XVFB_WHD" -nolisten tcp +extension GLX +render -noreset & | |
| Xvfb_pid="$!" | |
| echo "Waiting for Xvfb (PID: $Xvfb_pid) to be ready..." | |
| while ! xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; do | |
| sleep 0.1 | |
| done | |
| echo "Xvfb is running." | |
| ./gradlew --no-daemon test | |
| - name: Upload Images | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: images-linux | |
| path: | | |
| target/*.png | |
| build/**/*.png | |
| test-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Download Mesa | |
| uses: carlosperate/download-file-action@v2 | |
| with: | |
| file-url: 'https://downloads.fdossena.com/geth.php?r=mesa64-latest' | |
| file-name: 'mesa64-latest.7z' | |
| location: '.' | |
| - name: Overwrite opengl32.dll with Mesa | |
| uses: DuckSoft/extract-7z-action@v1.0 | |
| with: | |
| pathSource: mesa64-latest.7z | |
| pathTarget: C:\WINDOWS\SYSTEM32\ | |
| - name: Build with Gradle | |
| run: ./gradlew --no-daemon test | |
| - name: Upload Images | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: images-windows | |
| path: | | |
| target/*.png | |
| build/**/*.png | |
| test-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Build with Gradle | |
| run: ./gradlew --no-daemon test | |
| - name: Upload Images | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: images-macos | |
| path: | | |
| target/*.png | |
| build/**/*.png |