Skip to content

add api for vitmain count #1190

add api for vitmain count

add api for vitmain count #1190

Workflow file for this run

name: Test package
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- '*'
# Only one run of this workflow at a time. Any new push (including a
# tag push that kicks off a release) cancels whatever run is currently
# in progress, so the latest trigger always wins and old builds/releases
# don't keep running in the background.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
# ---------------------------------------------------------------------
# Original Linux job (unchanged)
# ---------------------------------------------------------------------
build:
runs-on: ubuntu-latest
steps:
- name: Install updated FreeType
timeout-minutes: 30
run: sudo apt-get update;sudo apt-get install libfreetype6
- name: Checkout repository and submodules
timeout-minutes: 30
uses: actions/checkout@v2
with:
submodules: recursive
- name: List directory contents
timeout-minutes: 30
run: pwd; ls -la
- name: start xvfb
timeout-minutes: 30
run:
Xvfb :0 &
- name: After checkout, list directory contnts
timeout-minutes: 30
run: pwd; ls -la
- name: Install libraries
timeout-minutes: 30
run: |
sudo add-apt-repository ppa:freecad-maintainers/freecad-stable
sudo apt install -y wget freecad inkscape meshlab libgtk2.0-0
sudo snap install blender --classic
- name: Pull a JavaFX JDK
timeout-minutes: 30
run: wget https://cdn.azul.com/zulu/bin/zulu25.36.15-ca-fx-jdk25.0.4-linux_x64.tar.gz
- name: After JDK download, list directory contnts
timeout-minutes: 30
run: pwd; ls -la
- name: Set Java
timeout-minutes: 30
uses: actions/setup-java@v1
with:
java-version: 25
jdkFile: zulu25.36.15-ca-fx-jdk25.0.4-linux_x64.tar.gz
- name: Shadow Jar
timeout-minutes: 30
run: ./gradlew spotlessCheck shadowJar
- name: initialize the X11 DISPLAY variable
timeout-minutes: 30
run:
export DISPLAY=:0
- name: Build/Test with Gradle
timeout-minutes: 30
run: xvfb-run -s '-screen 0 1024x768x24' ./gradlew test
- name: Test Bezier
timeout-minutes: 30
run: xvfb-run -s '-screen 0 1024x768x24' java --enable-preview -Dprism.order=sw -Dprism.verbose=true -jar build/libs/bowler-kernel.jar -g https://gist.github.com/4aeeaa49bd3a807eed8f8ff3dea84c48.git BezierEditorDemo.groovy
- name: start xvfb
timeout-minutes: 30
run:
Xvfb :0 &
- name: Test Local
timeout-minutes: 30
run: xvfb-run -s '-screen 0 1024x768x24' java --enable-preview -Dprism.order=sw -Dprism.verbose=true -jar build/libs/bowler-kernel.jar -f kernel-return-test.groovy
- name: Clean Cad
timeout-minutes: 30
run: rm -rf $HOME/bowler-workspace/gitcache/github.com/Hephaestus-Arm/HephaestusArm2
- name: build Cad
timeout-minutes: 30
run: xvfb-run -s '-screen 0 1024x768x24' java --enable-preview -Dprism.order=sw -Dprism.verbose=true -jar build/libs/bowler-kernel.jar -g https://github.com/Hephaestus-Arm/HephaestusArm2.git hephaestus.xml
- name: Zip BowlerStudioInstall
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p artifacts
find "$HOME/bin/BowlerStudioInstall" -maxdepth 1 -type f \( -iname "*.zip" -o -iname "*.tar" -o -iname "*.tar.gz" -o -iname "*.tar.xz" -o -iname "*.tgz" -o -iname "*.gz" -o -iname "*.xz" -o -iname "*.7z" -o -iname "*.rar" \) -delete
cd "$HOME/bin/BowlerStudioInstall"
rm -rf eclipse/plugins/org.eclipse.justj.openjdk*
zip -r -9 "$RUNNER_TEMP/BowlerStudioInstall-linux.zip" .
cd "$GITHUB_WORKSPACE"
mv "$RUNNER_TEMP/BowlerStudioInstall-linux.zip" artifacts/BowlerStudioInstall-linux.zip
- name: List BowlerStudioInstall
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
run: |
ls -al $HOME/bin/BowlerStudioInstall/
- name: Upload BowlerStudioInstall artifact (Linux)
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: BowlerStudioInstall-linux
path: artifacts/BowlerStudioInstall-linux.zip
- name: Upload bowler-kernel.jar artifact
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: bowler-kernel-jar
path: build/libs/bowler-kernel.jar
# ---------------------------------------------------------------------
# Windows: Shadow Jar build verification only
# ---------------------------------------------------------------------
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository and submodules
timeout-minutes: 30
uses: actions/checkout@v2
with:
submodules: recursive
- name: List directory contents
timeout-minutes: 30
run: Get-Location; Get-ChildItem
- name: Pull a JavaFX JDK
timeout-minutes: 30
run: Invoke-WebRequest -Uri "https://cdn.azul.com/zulu/bin/zulu25.36.15-ca-fx-jdk25.0.4-win_x64.zip" -OutFile "zulu25.36.15-ca-fx-jdk25.0.4-win_x64.zip"
- name: After JDK download, list directory contents
timeout-minutes: 30
run: Get-Location; Get-ChildItem
- name: Set Java
timeout-minutes: 30
uses: actions/setup-java@v1
with:
java-version: 25
jdkFile: zulu25.36.15-ca-fx-jdk25.0.4-win_x64.zip
- name: Shadow Jar
timeout-minutes: 30
run: ./gradlew.bat spotlessCheck test shadowJar
- name: Confirm Shadow Jar exists
timeout-minutes: 30
run: |
if (Test-Path "build/libs/bowler-kernel.jar") {
Write-Host "Shadow Jar built successfully:"
Get-Item build/libs/bowler-kernel.jar
} else {
Write-Error "Shadow Jar not found at build/libs/bowler-kernel.jar"
exit 1
}
- name: Zip BowlerStudioInstall
timeout-minutes: 60
run: |
New-Item -ItemType Directory -Force -Path artifacts | Out-Null
Get-ChildItem -Path "$HOME\bin\BowlerStudioInstall" -File | Where-Object { $_.Extension -in ".zip",".sfx",".tar",".gz",".tgz",".xz",".7z",".rar" -or $_.Name -match '\.(tar\.gz|tar\.xz)$' } | Remove-Item -Force
Get-ChildItem -Path "$HOME\bin\BowlerStudioInstall\eclipse\plugins" -Directory -Filter "org.eclipse.justj.openjdk*" -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force
$tempZip = Join-Path $Env:RUNNER_TEMP "BowlerStudioInstall-windows.zip"
$7z = Get-Command 7z.exe -ErrorAction SilentlyContinue
if (-not $7z) { throw "7z.exe not found on PATH" }
Push-Location "$HOME\bin\BowlerStudioInstall"
& $7z.Source a -tzip -mx=5 -mmt=on $tempZip * | Out-Null
if ($LASTEXITCODE -ne 0) { throw "7z exited with code $LASTEXITCODE" }
Pop-Location
Move-Item -Force $tempZip "artifacts\BowlerStudioInstall-windows.zip"
Get-ChildItem -Path "$HOME\bin\BowlerStudioInstall"
- name: Upload BowlerStudioInstall artifact (Windows)
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: BowlerStudioInstall-windows
path: artifacts/BowlerStudioInstall-windows.zip
# ---------------------------------------------------------------------
# macOS ARM (native aarch64 JVM): full build + test suite
# ---------------------------------------------------------------------
build-macos-arm:
runs-on: macos-latest # Apple Silicon (arm64) runner
steps:
- name: Checkout repository and submodules
timeout-minutes: 30
uses: actions/checkout@v2
with:
submodules: recursive
- name: List directory contents
timeout-minutes: 30
run: pwd; ls -la
- name: Install Blender, FreeCAD, OpenSCAD, MeshLab
timeout-minutes: 30
run: |
brew install --cask inkscape blender freecad meshlab openscad@snapshot
- name: Add CAD/3D tool binaries to PATH
timeout-minutes: 30
run: |
echo "/Applications/Blender.app/Contents/MacOS" >> $GITHUB_PATH
echo "/Applications/FreeCAD.app/Contents/MacOS" >> $GITHUB_PATH
echo "/Applications/OpenSCAD.app/Contents/MacOS" >> $GITHUB_PATH
echo "/Applications/meshlab.app/Contents/MacOS" >> $GITHUB_PATH
- name: Verify tool installation
timeout-minutes: 30
run: |
which blender || (echo "blender not found on PATH" && exit 1)
which freecad || (echo "freecad not found on PATH" && exit 1)
which openscad || (echo "openscad not found on PATH" && exit 1)
MESHLAB_BIN=$(find /Applications -maxdepth 1 -iname "meshlab*.app" -exec find {} -type f -iname "meshlab" \; 2>/dev/null | head -n1)
if [ -n "$MESHLAB_BIN" ]; then
echo "Found MeshLab binary: $MESHLAB_BIN"
dirname "$MESHLAB_BIN" >> $GITHUB_PATH
else
echo "Could not locate a meshlab binary under /Applications. Listing app contents for debugging:"
find /Applications -maxdepth 1 -iname "meshlab*.app"
find /Applications -maxdepth 1 -iname "meshlab*.app" -exec find {} -maxdepth 4 \; 2>/dev/null
fi
blender --version
openscad --version
- name: Pull a JavaFX JDK (macOS arm64)
timeout-minutes: 30
run: curl -L -O https://cdn.azul.com/zulu/bin/zulu25.32.21-ca-fx-jdk25.0.2-macosx_aarch64.tar.gz
- name: After JDK download, list directory contents
timeout-minutes: 30
run: pwd; ls -la
- name: Set Java
timeout-minutes: 30
uses: actions/setup-java@v1
with:
java-version: 25
jdkFile: zulu25.32.21-ca-fx-jdk25.0.2-macosx_aarch64.tar.gz
- name: Shadow Jar
timeout-minutes: 30
run: ./gradlew spotlessCheck test shadowJar
- name: Test Bezier
timeout-minutes: 30
run: java --enable-preview -Dprism.order=sw -Dprism.verbose=true -jar build/libs/bowler-kernel.jar -g https://gist.github.com/4aeeaa49bd3a807eed8f8ff3dea84c48.git BezierEditorDemo.groovy
- name: Test Local
timeout-minutes: 30
run: java --enable-preview -Dprism.order=sw -Dprism.verbose=true -jar build/libs/bowler-kernel.jar -f kernel-return-test.groovy
- name: Clean Cad
timeout-minutes: 30
run: rm -rf $HOME/bowler-workspace/gitcache/github.com/Hephaestus-Arm/HephaestusArm2
- name: build Cad
timeout-minutes: 30
run: java --enable-preview -Dprism.order=sw -Dprism.verbose=true -jar build/libs/bowler-kernel.jar -g https://github.com/Hephaestus-Arm/HephaestusArm2.git hephaestus.xml
- name: Zip BowlerStudioInstall
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p artifacts
find "$HOME/bin/BowlerStudioInstall" -maxdepth 1 -type f \( -iname "*.zip" -o -iname "*.dmg" -o -iname "*.tar" -o -iname "*.tar.gz" -o -iname "*.tar.xz" -o -iname "*.tgz" -o -iname "*.gz" -o -iname "*.xz" -o -iname "*.7z" -o -iname "*.rar" \) -delete
cd "$HOME/bin/BowlerStudioInstall"
rm -rf eclipse/plugins/org.eclipse.justj.openjdk*
zip -r -9 "$RUNNER_TEMP/BowlerStudioInstall-macos-arm.zip" .
cd "$GITHUB_WORKSPACE"
mv "$RUNNER_TEMP/BowlerStudioInstall-macos-arm.zip" artifacts/BowlerStudioInstall-macos-arm.zip
- name: List BowlerStudioInstall
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
run: |
ls -al $HOME/bin/BowlerStudioInstall/
- name: Upload BowlerStudioInstall artifact (macOS ARM)
timeout-minutes: 30
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: BowlerStudioInstall-macos-arm
path: artifacts/BowlerStudioInstall-macos-arm.zip
# ---------------------------------------------------------------------
# Release: only runs on tag pushes, once all platform builds succeed.
# Each build job already produced its final zip / jar, so this job
# downloads them as-is and attaches them straight to the release —
# no re-extracting, no re-zipping.
# ---------------------------------------------------------------------
release:
runs-on: ubuntu-latest
needs: [build, build-windows, build-macos-arm]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Linux BowlerStudioInstall artifact
timeout-minutes: 30
uses: actions/download-artifact@v4
with:
name: BowlerStudioInstall-linux
path: dist
- name: Download Windows BowlerStudioInstall artifact
timeout-minutes: 30
uses: actions/download-artifact@v4
with:
name: BowlerStudioInstall-windows
path: dist
- name: Download macOS ARM BowlerStudioInstall artifact
timeout-minutes: 30
uses: actions/download-artifact@v4
with:
name: BowlerStudioInstall-macos-arm
path: dist
- name: Download bowler-kernel.jar artifact
timeout-minutes: 30
uses: actions/download-artifact@v4
with:
name: bowler-kernel-jar
path: dist
- name: List release assets
timeout-minutes: 30
run: ls -la dist
- name: Create Release
timeout-minutes: 30
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload bowler-kernel.jar asset
timeout-minutes: 30
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/bowler-kernel.jar
asset_name: bowler-kernel.jar
asset_content_type: application/jar
- name: Upload Linux BowlerStudioInstall asset
timeout-minutes: 30
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/BowlerStudioInstall-linux.zip
asset_name: BowlerStudioInstall-linux.zip
asset_content_type: application/zip
- name: Upload macOS ARM BowlerStudioInstall asset
timeout-minutes: 30
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/BowlerStudioInstall-macos-arm.zip
asset_name: BowlerStudioInstall-macos-arm.zip
asset_content_type: application/zip
- name: Upload Windows BowlerStudioInstall asset
timeout-minutes: 30
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/BowlerStudioInstall-windows.zip
asset_name: BowlerStudioInstall-windows.zip
asset_content_type: application/zip