pass the exception up #41
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
| # This is a basic workflow to help you get started with Actions | |
| name: CI | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the master branch | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| tags: | |
| - '*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| build_mac_java: | |
| name: JAVA Mac arm64 | |
| timeout-minutes: 30 | |
| runs-on: macos-14 | |
| steps: | |
| - name: Install common dependencies | |
| run: | | |
| brew install googletest | |
| pip install trimesh pytest maven | |
| - uses: actions/checkout@v4 | |
| - uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: 4.0.2 | |
| - name: Install Java and Maven | |
| run: | | |
| wget https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-macosx_aarch64.tar.gz | |
| tar -xzf zulu21.46.19-ca-fx-jdk21.0.9-macosx_aarch64.tar.gz | |
| echo "JAVA_HOME=$(pwd)/zulu21.46.19-ca-fx-jdk21.0.9-macosx_aarch64" >> $GITHUB_ENV | |
| echo "PATH=$(pwd)/zulu21.46.19-ca-fx-jdk21.0.9-macosx_aarch64/bin:$PATH" >> $GITHUB_ENV | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_USE_BUILTIN_CLIPPER2=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DMANIFOLD_STRICT=ON -DMANIFOLD_USE_BUILTIN_TBB=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_ASSERT=ON -DMANIFOLD_PYBIND=OFF -DMANIFOLD_PAR=ON .. && make | |
| cd .. | |
| mkdir -p ./bindings/java/src/main/resources/manifold3d/natives/mac-arm64/ | |
| ls -al ./build/src/ | |
| cp ./build/src/libmanifold.dylib ./bindings/java/src/main/resources/manifold3d/natives/mac-arm64/ | |
| cp ./build/bindings/c/libmanifoldc.dylib ./bindings/java/src/main/resources/manifold3d/natives/mac-arm64/ | |
| cd bindings/java/ | |
| mvn test --file pom.xml --no-transfer-progress | |
| - name: Upload native libraries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: native-libs-mac-arm64 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| build_linux_java_ARM: | |
| name: JAVA Linux_ARM Build | |
| timeout-minutes: 45 | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| CC: gcc-14 | |
| CXX: g++-14 | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libgtest-dev libassimp-dev git libtbb-dev pkg-config libpython3-dev lcov | |
| python -m pip install -U trimesh pytest | |
| - uses: actions/checkout@v4 | |
| - uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: 4.0.2 | |
| - name: Pull a JavaFX JDK | |
| run: wget https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-linux_aarch64.tar.gz | |
| - name: Set Java | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 21 | |
| jdkFile: ./zulu21.46.19-ca-fx-jdk21.0.9-linux_aarch64.tar.gz | |
| - name: Build With parallelization | |
| run: | | |
| bash bindings/java/scripts/linux/buildC-arm.sh | |
| cd bindings/java/ | |
| mvn test --file pom.xml --no-transfer-progress | |
| - name: Upload native libraries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: native-libs-linux-arm64 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| build_linux_java_x86: | |
| name: JAVA Linux_x86 Build | |
| timeout-minutes: 45 | |
| runs-on: ubuntu-24.04 | |
| env: | |
| CC: gcc-14 | |
| CXX: g++-14 | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libgtest-dev libassimp-dev git libtbb-dev pkg-config libpython3-dev lcov | |
| python -m pip install -U trimesh pytest | |
| - uses: actions/checkout@v4 | |
| - uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: 4.0.2 | |
| - name: Pull a JavaFX JDK | |
| run: wget https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-linux_x64.tar.gz | |
| - name: Set Java | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 21 | |
| jdkFile: ./zulu21.46.19-ca-fx-jdk21.0.9-linux_x64.tar.gz | |
| - name: Build With parallelization | |
| run: | | |
| bash bindings/java/scripts/linux/buildC.sh | |
| cd bindings/java/ | |
| mvn test --file pom.xml --no-transfer-progress | |
| - name: Upload native libraries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: native-libs-linux-x86 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| build_windows_java_x86: | |
| name: JAVA Windows x86 | |
| timeout-minutes: 30 | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: 4.0.2 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Pull a JavaFX JDK | |
| run: curl -O https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-win_x64.zip | |
| - name: Set Java | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 21 | |
| jdkFile: ./zulu21.46.19-ca-fx-jdk21.0.9-win_x64.zip | |
| - name: Build for Java | |
| shell: powershell | |
| run: | | |
| cmake . -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_USE_BUILTIN_CLIPPER2=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_STRICT=ON -DMANIFOLD_PAR=ON -DMANIFOLD_EXPORT=ON -DMANIFOLD_USE_BUILTIN_TBB=ON -DMANIFOLD_ASSERT=ON -DMANIFOLD_PAR=ON -A x64 -B build | |
| cd build | |
| cmake --build . --target ALL_BUILD --config Release | |
| cd .. | |
| mkdir -p bindings\java\src\main\resources\manifold3d\natives\win-x86_64\ | |
| echo "List files" | |
| Get-ChildItem -Path . -Recurse -Filter *.dll | Select-Object -ExpandProperty FullName | |
| echo "Copy existing files..." | |
| cp build\lib\Release\manifold.dll bindings\java\src\main\resources\manifold3d\natives\win-x86_64\manifold.dll | |
| cp build\lib\Release\manifoldc.dll bindings\java\src\main\resources\manifold3d\natives\win-x86_64\manifoldc.dll | |
| cd bindings\java | |
| mvn test --file pom.xml --no-transfer-progress | |
| cd .. | |
| cd .. | |
| - name: Upload native libraries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: native-libs-windows-x86 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| deploy_java: | |
| name: JAVA Deploy Jar to Clojars | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [ build_linux_java_x86,build_linux_java_ARM,build_windows_java_x86 ,build_mac_java] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download native libraries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: native-libs-mac-arm64 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| - name: Download native libraries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: native-libs-linux-arm64 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| - name: Download native libraries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: native-libs-windows-x86 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| - name: Download native libraries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: native-libs-linux-x86 | |
| path: bindings/java/src/main/resources/manifold3d/natives/ | |
| - name: List shared libraries | |
| run: | | |
| ls -al bindings/java/src/main/resources/manifold3d/natives/ | |
| ls -al bindings/java/src/main/resources/manifold3d/natives/linux-x86_64 | |
| ls -al bindings/java/src/main/resources/manifold3d/natives/linux-arm64 | |
| ls -al bindings/java/src/main/resources/manifold3d/natives/win-x86_64 | |
| ls -al bindings/java/src/main/resources/manifold3d/natives/mac-arm64 | |
| - name: Pull a JavaFX JDK | |
| run: wget https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-fx-jdk21.0.9-linux_x64.tar.gz | |
| - name: Set Java | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 21 | |
| jdkFile: ./zulu21.46.19-ca-fx-jdk21.0.9-linux_x64.tar.gz | |
| maven-version: '3.8.7' | |
| - name: Install Maven 3.8.7 | |
| run: | | |
| wget https://archive.apache.org/dist/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz | |
| tar -xzf apache-maven-3.8.7-bin.tar.gz | |
| echo "$PWD/apache-maven-3.8.7/bin" >> $GITHUB_PATH | |
| - name: Check Maven version | |
| run: mvn --version | |
| - name: Build Jar | |
| run: | | |
| bash bindings/java/scripts/findVersion.sh | |
| ls -al bindings/java/scripts/ | |
| bash bindings/java/scripts/clojar.sh $(bash bindings/java/scripts/findVersion.sh) | |
| env: | |
| CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | |
| CLOJARS_TOKEN: ${{ secrets.CLOJARS_TOKEN }} |