mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 08:09:39 +00:00
477 lines
19 KiB
YAML
477 lines
19 KiB
YAML
name: CreateRelease
|
|
|
|
on:
|
|
#[push, pull_request] #just for test release scripts
|
|
workflow_dispatch: #manual run
|
|
inputs:
|
|
version:
|
|
description: 'New MeshLab Version'
|
|
required: true
|
|
default: 'YYYY.MM'
|
|
|
|
|
|
jobs:
|
|
update_ml_version:
|
|
name: Update ML_VERSION and snapcraft.yaml
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- name: Update MeshLab version
|
|
run : |
|
|
echo ${{ github.event.inputs.version }} | tr -d '\n'> ML_VERSION
|
|
- name: Update Snap file
|
|
run: |
|
|
sed "s%MESHLAB_VERSION%$(cat ML_VERSION)%g" scripts/Linux/resources/snap/snap_noversion.yaml > snapcraft.yaml
|
|
- name: commit ML_VERSION and snapcraft.yaml change
|
|
uses: stefanzweifel/git-auto-commit-action@v4.1.1
|
|
with:
|
|
commit_message: Apply automatic ML_VERSION and snapcraft.yaml change
|
|
|
|
linux_build:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (Linux)
|
|
runs-on: ubuntu-18.04 #in order to deploy, need to use oldest supported version
|
|
strategy:
|
|
matrix:
|
|
precision: [single_precision, double_precision]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: master
|
|
submodules: recursive
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update && sudo apt-get upgrade
|
|
bash scripts/${{ runner.os }}/0_setup_env_ubuntu.sh --dont_install_qt --dowload_cgal_and_boost_src
|
|
#needed by qt 5.15 on linux
|
|
sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev
|
|
- name: Setup env variables
|
|
id: envs
|
|
shell: bash
|
|
run: |
|
|
if [ "${{matrix.precision}}" == "double_precision" ]; then
|
|
echo ::set-output name=artifact_suffix::"_double"
|
|
else
|
|
echo ::set-output name=artifact_suffix::""
|
|
fi
|
|
- name: Configure and Build
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
|
|
- name: Deploy and AppImage
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/2_deploy_and_appimage.sh
|
|
- name: Upload Meshlab Portable
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshlab_linux_portable${{steps.envs.outputs.artifact_suffix}}
|
|
path: src/install/
|
|
- name: Upload Meshlab AppImage
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshlab_linux_appimage${{steps.envs.outputs.artifact_suffix}}
|
|
path: MeshLab*-linux.AppImage
|
|
|
|
macos_build:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (MacOS)
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
precision: [single_precision, double_precision]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: master
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install libomp cgal xerces-c
|
|
npm install -g appdmg
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
- name: Setup env variables
|
|
id: envs
|
|
shell: bash
|
|
run: |
|
|
if [ "${{matrix.precision}}" == "double_precision" ]; then
|
|
echo ::set-output name=artifact_suffix::"_double"
|
|
else
|
|
echo ::set-output name=artifact_suffix::""
|
|
fi
|
|
- name: Configure and Build
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
|
|
- name: Deploy
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/2_deploy.sh
|
|
- name: Import Cert and Key
|
|
uses: apple-actions/import-codesign-certs@v1
|
|
with:
|
|
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
|
|
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
|
- name: Sign
|
|
run: |
|
|
codesign --options "runtime" --timestamp --force --deep --sign ${{ secrets.MACOS_CERT_ID }} src/install/meshlab.app
|
|
- name: Notarize
|
|
uses: devbotsxyz/xcode-notarize@v1
|
|
with:
|
|
product-path: "src/install/meshlab.app"
|
|
appstore-connect-username: ${{ secrets.MACOS_NOTARIZATION_USER }}
|
|
appstore-connect-password: ${{ secrets.MACOS_NOTARIZATION_PSSW }}
|
|
- name: "Staple Release"
|
|
uses: devbotsxyz/xcode-staple@v1
|
|
with:
|
|
product-path: "src/install/meshlab.app"
|
|
- name: Create MeshLab DMG
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/3_dmg.sh
|
|
- name: Upload MeshLab Portable
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshlab_macos_portable${{steps.envs.outputs.artifact_suffix}}
|
|
path: src/install/MeshLab*.app
|
|
- name: Upload DMG
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshlab_macos_dmg${{steps.envs.outputs.artifact_suffix}}
|
|
path: src/install/MeshLab*-macos.dmg
|
|
|
|
windows_build:
|
|
needs: [update_ml_version]
|
|
name: Build MeshLab (Windows)
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
precision: [single_precision, double_precision]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: master
|
|
submodules: recursive
|
|
- name: Setup MSVC
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
- name: Setup env variables
|
|
shell: bash
|
|
id: envs
|
|
run: |
|
|
if [ "${{matrix.precision}}" == "double_precision" ]; then
|
|
echo ::set-output name=artifact_suffix::"_double"
|
|
else
|
|
echo ::set-output name=artifact_suffix::""
|
|
fi
|
|
echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC" >> $GITHUB_ENV
|
|
- name: Install wget
|
|
run: |
|
|
$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin"
|
|
pacman.exe -S --noconfirm --noprogressbar wget unzip
|
|
- name: Set Certificate
|
|
run: |
|
|
New-Item -ItemType directory -Path certificate
|
|
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_CERTIFICATE }}'
|
|
certutil -decode certificate\certificate.txt certificate\certificate.pfx
|
|
- name: Download external libraries
|
|
shell: C:\shells\msys2bash.cmd {0}
|
|
run: |
|
|
bash scripts/${{ runner.os }}/0_download_ext.sh
|
|
- name: Configure and Build
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
|
|
- name: Sign Portable content
|
|
run: |
|
|
.\scripts\Windows\resources\windows_sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PWD }}' -path 'src\install\'
|
|
- name: Deploy
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/2_deploy.sh
|
|
- name: NSIS script
|
|
shell: bash
|
|
run: |
|
|
bash scripts/${{ runner.os }}/resources/nsis_script.sh
|
|
- name: Create Installer
|
|
uses: joncloud/makensis-action@v1
|
|
with:
|
|
script-file: "src/install/meshlab_final.nsi"
|
|
- name: Move Installer
|
|
shell: bash
|
|
run: |
|
|
mkdir src/installer
|
|
mv src/install/MeshLab*-windows.exe src/installer
|
|
- name: Sign Installer
|
|
run: |
|
|
.\scripts\Windows\resources\windows_sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PWD }}' -path 'src\installer\'
|
|
- name: Uploading MeshLab Portable
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshlab_windows_portable${{steps.envs.outputs.artifact_suffix}}
|
|
path: src/install
|
|
- name: Upload Meshlab Installer
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}}
|
|
path: src/installer/MeshLab*-windows.exe
|
|
|
|
#after building MeshLab for the three platforms, we create a release in github
|
|
create_release:
|
|
name: Create Release
|
|
needs: [linux_build, macos_build, windows_build]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Setup env variables
|
|
id: envs
|
|
shell: bash
|
|
run: |
|
|
if [ "${{ github.event.inputs.release_candidate }}" == "true" ]; then
|
|
echo ::set-output name=rc_suffix::"_rc"
|
|
else
|
|
echo ::set-output name=rc_suffix::""
|
|
fi
|
|
|
|
#Download Linux Packages
|
|
- name: Download Linux ZIP
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_linux_portable
|
|
path: meshlab_linux_portable
|
|
- name: Download Linux ZIP-d
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_linux_portable_double
|
|
path: meshlab_linux_portable_double
|
|
- name: Download Linux AppImage
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_linux_appimage
|
|
path: meshlab_linux_appimage
|
|
- name: Download Linux AppImage-d
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_linux_appimage_double
|
|
path: meshlab_linux_appimage_double
|
|
- name: Change Permissions
|
|
run: |
|
|
chmod +x meshlab_linux_portable/usr/bin/meshlab
|
|
chmod +x meshlab_linux_portable/AppRun
|
|
chmod +x meshlab_linux_portable_double/usr/bin/meshlab
|
|
chmod +x meshlab_linux_portable_double/AppRun
|
|
- name: Create MeshLab Portable Linux Archive
|
|
run: |
|
|
cd meshlab_linux_portable
|
|
tar -cvzf ../MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.tar.gz *
|
|
cd ../meshlab_linux_portable_double
|
|
tar -cvzf ../MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.tar.gz *
|
|
cd ..
|
|
|
|
#Download MacOS Package
|
|
- name: Download MacOS DMG
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_macos_dmg
|
|
path: meshlab_macos_dmg
|
|
- name: Download MacOS DMG-d
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_macos_dmg_double
|
|
path: meshlab_macos_dmg_double
|
|
- name: Download MacOS Portable
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_macos_portable
|
|
path: meshlab_macos_portable
|
|
- name: Download MacOS Portable-d
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_macos_portable_double
|
|
path: meshlab_macos_portable_double
|
|
- name: Change Permissions
|
|
run: |
|
|
chmod +x meshlab_macos_portable/MeshLab*.app/Contents/MacOS/meshlab
|
|
chmod +x meshlab_macos_portable_double/MeshLab*.app/Contents/MacOS/meshlab
|
|
- name: Create MeshLab Portable MacOS
|
|
run: |
|
|
cd meshlab_macos_portable
|
|
tar -cvzf ../MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.tar.gz *
|
|
cd ../meshlab_macos_portable_double
|
|
tar -cvzf ../MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.tar.gz *
|
|
cd ..
|
|
|
|
#Download Windows Packages
|
|
- name: Download Windows ZIP
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_windows_portable
|
|
path: meshlab_windows_portable
|
|
- name: Download Windows ZIP-d
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_windows_portable_double
|
|
path: meshlab_windows_portable_double
|
|
- name: Download Windows Installer
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_windows_installer
|
|
path: meshlab_windows_installer
|
|
- name: Download Windows Installer-d
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: meshlab_windows_installer_double
|
|
path: meshlab_windows_installer_double
|
|
- name: Create MeshLab Portable Windows Archive
|
|
run: |
|
|
cd meshlab_windows_portable
|
|
zip -r ../MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.zip *
|
|
cd ../meshlab_windows_portable_double
|
|
zip -r ../MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-windows.zip *
|
|
cd ..
|
|
|
|
|
|
#Create release and upload
|
|
- name: Publish Release
|
|
id: create_release
|
|
uses: actions/create-release@v1.0.0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: MeshLab-${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}
|
|
release_name: MeshLab-${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}
|
|
draft: false
|
|
prerelease: ${{ github.event.inputs.release_candidate }}
|
|
#Linux
|
|
- 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${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.tar.gz
|
|
asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.tar.gz
|
|
asset_content_type: MeshLab Portable for Linux
|
|
- name: Upload ReleaseLinuxPortable-d
|
|
id: upload-release-linux-portable-d
|
|
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${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.tar.gz
|
|
asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.tar.gz
|
|
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${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.AppImage
|
|
asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.AppImage
|
|
asset_content_type: MeshLab AppImage for Linux
|
|
- name: Upload ReleaseLinuxAppImage-d
|
|
id: upload-release-linux-appimage-d
|
|
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_double/MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.AppImage
|
|
asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.AppImage
|
|
asset_content_type: MeshLab AppImage for Linux
|
|
#MacOS
|
|
- 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${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.dmg
|
|
asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.dmg
|
|
asset_content_type: MeshLab DMG for MacOS
|
|
- name: Upload ReleaseMacOSDMG-d
|
|
id: upload-release-macos-d
|
|
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_double/MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.dmg
|
|
asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.dmg
|
|
asset_content_type: MeshLab DMG for MacOS
|
|
- name: Upload ReleaseMacOSPortable
|
|
id: upload-release-macos-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${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
|
|
asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
|
|
asset_content_type: MeshLab Portable for MacOS
|
|
- name: Upload ReleaseMacOSPortable-d
|
|
id: upload-release-macos-portable-d
|
|
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${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
|
|
asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
|
|
asset_content_type: MeshLab Portable for MacOS
|
|
#Windows
|
|
- 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${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.zip
|
|
asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.zip
|
|
asset_content_type: MeshLab Portable for Windows
|
|
- name: Upload ReleaseWindowsPortable-d
|
|
id: upload-release-windows-portable-d
|
|
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${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-windows.zip
|
|
asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-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${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.exe
|
|
asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.exe
|
|
asset_content_type: MeshLab Installer for Windows
|
|
- name: Upload ReleaseWindowsInstaller-d
|
|
id: upload-release-windows-installer-d
|
|
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_double/MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-windows.exe
|
|
asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-windows.exe
|
|
asset_content_type: MeshLab Installer for Windows
|