mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 00:07:24 +00:00
360 lines
13 KiB
YAML
360 lines
13 KiB
YAML
name: BuildAndRelease
|
|
|
|
on:
|
|
#[push, pull_request] #just for test release scripts
|
|
schedule:
|
|
- cron: '0 1 1 * *' #every first day of the month at 1am
|
|
|
|
jobs:
|
|
update_ml_version:
|
|
name: Update ML_VERSION, snapcraft.yaml and Info.plist
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Checkout submodules
|
|
shell: bash
|
|
run: |
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
git submodule sync --recursive
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
- name: Setup env variables
|
|
id: envs
|
|
run: |
|
|
echo ::set-output name=date::"$(date +%Y.%m)"
|
|
- name: Update MeshLab version
|
|
run : |
|
|
echo ${{steps.envs.outputs.date}} | tr -d '\n'> ML_VERSION
|
|
- name: Update Info.plist
|
|
run: |
|
|
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString ${{steps.envs.outputs.date}}" src/meshlab/Info.plist
|
|
/usr/libexec/PlistBuddy -c "Set CFBundleVersion ${{steps.envs.outputs.date}}" src/meshlab/Info.plist
|
|
- name: Update Snap file
|
|
run: |
|
|
sed "s%MESHLAB_VERSION%$(cat ML_VERSION)%g" install/linux/snap/snap_noversion.yaml > snapcraft.yaml
|
|
- name: commit ML_VERSION, snapcraft.yaml and Info.plist change
|
|
uses: stefanzweifel/git-auto-commit-action@v4.1.1
|
|
with:
|
|
commit_message: Apply automatic ML_VERSION, snapcraft.yaml and Info.plist change
|
|
|
|
ubuntu_build_appimage:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (Ubuntu - AppImage)
|
|
runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Checkout submodules
|
|
shell: bash
|
|
run: |
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
git submodule sync --recursive
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
modules: xmlpatterns
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libglew-dev libeigen3-dev libgmp-dev
|
|
sudo apt-get install -y libxkbcommon-x11-0 chrpath
|
|
- name: Setup env variables
|
|
id: envs
|
|
run: |
|
|
echo ::set-output name=date::"$(cat ML_VERSION)"
|
|
- name: Build MeshLab
|
|
run: |
|
|
sh install/linux/linux_build.sh
|
|
- name: Deploy MeshLab and MeshLabServer
|
|
run : |
|
|
sh install/linux/linux_appimages.sh
|
|
- name: Upload Meshlab Portable
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_linux_portable
|
|
path: distrib/
|
|
- name: Upload MeshlabServer AppImage
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlabserver_linux_appimage
|
|
path: MeshLabServer${{steps.envs.outputs.date}}-linux.AppImage
|
|
- name: Upload Meshlab AppImage
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_linux_appimage
|
|
path: MeshLab${{steps.envs.outputs.date}}-linux.AppImage
|
|
|
|
ubuntu_build_snap:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (Ubuntu - Snap)
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Checkout submodules
|
|
shell: bash
|
|
run: |
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
git submodule sync --recursive
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
- name: Install dependencies
|
|
run: |
|
|
#needed for some reason...
|
|
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
|
|
sudo apt update
|
|
sudo apt-get install -y snapcraft
|
|
- name: Setup env variables
|
|
id: envs
|
|
run: |
|
|
echo ::set-output name=date::"$(cat ML_VERSION)"
|
|
- name: Build MeshLab Snap
|
|
run: |
|
|
snapcraft
|
|
- name: Rename Snap
|
|
run: |
|
|
mv ./meshlab*.snap ./MeshLab${{steps.envs.outputs.date}}-linux.snap
|
|
- name: Upload Meshlab Snap
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_linux_snap
|
|
path: MeshLab${{steps.envs.outputs.date}}-linux.snap
|
|
|
|
macos_build:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (MacOS)
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Checkout submodules
|
|
shell: bash
|
|
run: |
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
git submodule sync --recursive
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install libomp
|
|
npm install -g appdmg
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
modules: xmlpatterns
|
|
- name: Setup env variables
|
|
id: envs
|
|
shell: bash
|
|
run: |
|
|
#sh install/macos/macos_setup_env.sh
|
|
#necessary here on github actions:
|
|
#echo '::set-env name=QTDIR::/usr/local/opt/qt'
|
|
#echo '::add-path::/usr/local/opt/qt/bin'
|
|
#echo '::set-env name=LD_LIBRARY_PATH::/usr/local/opt/qt/lib:${{env.LD_LIBRARY_PATH}}'
|
|
#echo '::set-env name=PKG_CONFIG_PATH::/usr/local/opt/qt/lib:${{env.PKG_CONFIG_PATH}}'
|
|
echo ::set-output name=date::"$(cat ML_VERSION)"
|
|
- name: Build MeshLab
|
|
run: |
|
|
sh install/macos/macos_build.sh
|
|
- name: Deploy MeshLab
|
|
run: |
|
|
sh install/macos/macos_deploy.sh
|
|
- name: Create DMG
|
|
run: |
|
|
sh install/macos/macos_dmg.sh
|
|
mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
- name: Upload DMG
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_macos_dmg
|
|
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
|
|
windows_build:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (Windows)
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Checkout submodules
|
|
shell: bash
|
|
run: |
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
git submodule sync --recursive
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
- name: Downlaod Jom
|
|
run: |
|
|
Invoke-WebRequest -Uri "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" -OutFile "jom_1_1_3.zip"
|
|
New-Item -Name "jom" -ItemType "directory"
|
|
Expand-Archive -Path jom_1_1_3.zip -DestinationPath .\jom
|
|
echo "::add-path::$(Get-Location)\jom"
|
|
- name: Setup env variables
|
|
id: envs
|
|
run: |
|
|
echo '::set-env name=VCINSTALLDIR::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
|
|
echo "::set-output name=date::$(type ML_VERSION)"
|
|
- name: Setup MSVC
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
modules: xmlpatterns
|
|
version: '5.14.2'
|
|
#mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
|
|
- name: Build MeshLab
|
|
run: |
|
|
cd src\
|
|
qmake
|
|
jom -j4 #Qt nmake for parallel build
|
|
- name: Deploy MeshLab
|
|
run: |
|
|
.\install\windows\windows_deploy.ps1
|
|
- name: NSIS script
|
|
run: |
|
|
.\install\windows\resources\windows_nsis_script.ps1
|
|
- name: Create Installer
|
|
uses: joncloud/makensis-action@v1
|
|
with:
|
|
script-file: "install/windows/resources/meshlab_final.nsi"
|
|
- name: Rename Installer
|
|
run: |
|
|
Rename-Item -Path install\windows\resources\MeshLab${{steps.envs.outputs.date}}.exe -NewName MeshLab${{steps.envs.outputs.date}}-windows.exe
|
|
- name: Upload Meshlab Portable
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_windows_portable
|
|
path: distrib
|
|
- name: Upload Meshlab Installer
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_windows_installer
|
|
path: install/windows/resources/MeshLab${{steps.envs.outputs.date}}-windows.exe
|
|
|
|
#after building MeshLab for the three platforms, we create a release in github
|
|
create_release:
|
|
name: Create Release
|
|
needs: [ubuntu_build_appimage, ubuntu_build_snap, macos_build, windows_build]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup env variables
|
|
id: envs
|
|
run: |
|
|
echo ::set-output name=date::"$(date +%Y.%m)"
|
|
- name: Publish Release
|
|
id: create_release
|
|
uses: actions/create-release@v1.0.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: Meshlab-${{steps.envs.outputs.date}}
|
|
release_name: MeshLab-${{steps.envs.outputs.date}}
|
|
draft: false
|
|
prerelease: false
|
|
|
|
#Linux Release
|
|
- name: Download Linux ZIP
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_linux_portable
|
|
- name: Create Meshlab Linux Archive
|
|
run: |
|
|
zip -r MeshLab${{steps.envs.outputs.date}}-linux.zip meshlab_linux_portable/
|
|
- name: Download Linux AppImage
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_linux_appimage
|
|
- name: Download Linux MeshLabServer AppImage
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlabserver_linux_appimage
|
|
- name: Download Linux Snap
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_linux_snap
|
|
- name: Upload ReleaseLinuxPortable
|
|
id: upload-release-linux-portable
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: MeshLab${{steps.envs.outputs.date}}-linux.zip
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-linux.zip
|
|
asset_content_type: MeshLab Portable for Linux
|
|
- name: Upload ReleaseLinuxAppImage
|
|
id: upload-release-linux-appimage
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: meshlab_linux_appimage/MeshLab${{steps.envs.outputs.date}}-linux.AppImage
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-linux.AppImage
|
|
asset_content_type: MeshLab AppImage for Linux
|
|
- name: Upload ReleaseLinuxMeshLabServerAppImage
|
|
id: upload-release-linux-meshlabserver-appimage
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: meshlabserver_linux_appimage/MeshLabServer${{steps.envs.outputs.date}}-linux.AppImage
|
|
asset_name: MeshLabServer${{steps.envs.outputs.date}}-linux.AppImage
|
|
asset_content_type: MeshLabServer AppImage for Linux
|
|
- name: Upload ReleaseLinuxSnap
|
|
id: upload-release-linux-snap
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: meshlab_linux_snap/MeshLab${{steps.envs.outputs.date}}-linux.snap
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-linux.snap
|
|
asset_content_type: MeshLab Snap for Linux
|
|
|
|
#MacOS Release
|
|
- name: Download MacOS DMG
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_macos_dmg
|
|
- name: Upload ReleaseMacOSDMG
|
|
id: upload-release-macos
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: meshlab_macos_dmg/MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
asset_content_type: MeshLab for MacOS
|
|
|
|
#Windows Release
|
|
- name: Download Windows ZIP
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_windows_portable
|
|
- name: Download Windows Installer
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_windows_installer
|
|
- name: Create Meshlab Portable Archive
|
|
run: |
|
|
zip -r MeshLab${{steps.envs.outputs.date}}-windows.zip meshlab_windows_portable/
|
|
- name: Upload ReleaseWindowsPortable
|
|
id: upload-release-windows-portable
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: MeshLab${{steps.envs.outputs.date}}-windows.zip
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-windows.zip
|
|
asset_content_type: MeshLab Portable for Windows
|
|
- name: Upload ReleaseWindowsInstaller
|
|
id: upload-release-windows-installer
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: meshlab_windows_installer/MeshLab${{steps.envs.outputs.date}}-windows.exe
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-windows.exe
|
|
asset_content_type: MeshLab Portable for Windows
|