mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 08:09:39 +00:00
212 lines
7.4 KiB
YAML
Executable File
212 lines
7.4 KiB
YAML
Executable File
name: CompileAndDeploy
|
|
|
|
on:
|
|
#[push, pull_request] #just for test the deployment
|
|
schedule:
|
|
- cron: '0 0 1 * *' #every first day of the month at midnight
|
|
|
|
jobs:
|
|
ubuntu_build:
|
|
name: Build MeshLab (Ubuntu)
|
|
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: Installing dependencies
|
|
run: |
|
|
sudo apt install -y qt5-default qttools5-dev-tools qtscript5-dev libqt5xmlpatterns5-dev mesa-common-dev libglu1-mesa-dev lib3ds-dev libglew-dev libeigen3-dev libopenctm-dev libgmp-dev libqhull-dev
|
|
- name: Setting env variables
|
|
id: envs
|
|
shell: bash
|
|
run: |
|
|
echo ::set-output name=date::"$(date +%Y.%m)"
|
|
- name: Compiling MeshLab
|
|
run: |
|
|
cd src/
|
|
qmake
|
|
make -j4
|
|
- name: Creating Meshlab Portable ZIP
|
|
run : |
|
|
cd install/linux
|
|
./linux_install.sh
|
|
cd ../../distrib/
|
|
mv *.AppImage ../MeshLab${{steps.envs.outputs.date}}-linux.AppImage
|
|
- name: Uploading Meshlab Portable
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_portable_linux
|
|
path: distrib/
|
|
- name: Uploading Meshlab AppImage
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_linux_appimage
|
|
path: MeshLab${{steps.envs.outputs.date}}-linux.AppImage
|
|
|
|
macos_build:
|
|
name: Build MeshLab (MacOS)
|
|
runs-on: macos
|
|
|
|
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: Installing dependencies
|
|
run: |
|
|
brew install llvm libomp qt
|
|
npm install -g appdmg
|
|
- name: Setting env variables
|
|
id: envs
|
|
shell: bash
|
|
run: |
|
|
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::"$(date +%Y.%m)"
|
|
- name: Compiling MeshLab
|
|
run: |
|
|
cd src/
|
|
qmake
|
|
make -j4
|
|
- name: Creating DMG
|
|
run: |
|
|
cd install/macx
|
|
./macinstall_latest.sh
|
|
cd ../..
|
|
ls -la distrib/MeshLab${{steps.envs.outputs.date}}.dmg
|
|
mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
- name: Uploading DMG
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_macos
|
|
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
|
|
windows_build:
|
|
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: Setting MSVC
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Installing QT
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
modules: qtscript xmlpatterns
|
|
- name: Compiling MeshLab
|
|
run: |
|
|
cd src\
|
|
qmake
|
|
nmake
|
|
- name: Creating MeshLab Portable ZIP
|
|
run: |
|
|
cd distrib
|
|
windeployqt --no-translations meshlab.exe
|
|
- name: Uploading Meshlab Portable
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: meshlab_portable_windows
|
|
path: distrib
|
|
|
|
|
|
create_prerelease:
|
|
name: Creating Prerelease
|
|
needs: [ubuntu_build, macos_build, windows_build]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setting env variables
|
|
id: envs
|
|
run: |
|
|
echo ::set-output name=date::"$(date +%Y.%m)"
|
|
- name: Publishing PreRelease
|
|
id: create_prerelease
|
|
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}}-beta
|
|
draft: false
|
|
prerelease: true
|
|
|
|
- name: Downloading MacOS DMG
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_macos
|
|
- name: Uploading PreReleaseMacOS
|
|
id: upload-prerelease-macos
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_prerelease.outputs.upload_url }}
|
|
asset_path: meshlab_macos/MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
asset_name: MeshLab${{steps.envs.outputs.date}}-macos.dmg
|
|
asset_content_type: MeshLab for MacOS
|
|
|
|
- name: Downloading Windows ZIP
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_portable_windows
|
|
- name: Creating Meshlab Portable Archive
|
|
run: |
|
|
zip -r MeshLab${{steps.envs.outputs.date}}-windows.zip meshlab_portable_windows/
|
|
- name: Uploading PreReleaseWindowsPortable
|
|
id: upload-prerelease-windows-portable
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_prerelease.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: Downloading Linux ZIP
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_portable_linux
|
|
- name: Creating Meshlab Linux Archive
|
|
run: |
|
|
zip -r MeshLab${{steps.envs.outputs.date}}-linux.zip meshlab_portable_linux/
|
|
- name: Downloading Linux AppImage
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: meshlab_linux_appimage
|
|
- name: Uploading PreReleaseLinuxPortable
|
|
id: upload-prerelease-linux-portable
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_prerelease.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: Uploading PreReleaseLinuxAppImage
|
|
id: upload-prerelease-linux-appimage
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_prerelease.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
|