meshlab/.github/workflows/Windows.yml
2020-10-16 11:55:13 +02:00

94 lines
3.1 KiB
YAML

name: Windows
on: [push, pull_request]
jobs:
windows_build_cmake:
name: Build MeshLab (Windows - CMake)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
modules: xmlpatterns
- name: Setup env variables
id: envs
run: |
echo "::set-output name=date::$(type ML_VERSION)"
- name: Configure and build
shell: bash
run: |
sh install/windows/windows_build.sh
#- name: Configure
# run: |
# cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
# -DBUILD_MINI=ON
#- name: Build MeshLab
# run: |
# cmake --build $env:GITHUB_WORKSPACE/build --config RelWithDebInfo -j 4
# cmake --build $env:GITHUB_WORKSPACE/build --config RelWithDebInfo --target INSTALL
#- name: Uploading MeshLab Portable
# uses: actions/upload-artifact@v1
# with:
# name: meshlab_windows_portable_cmake
# path: install
windows_build_qmake:
name: Build MeshLab (Windows - QMake)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Download 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 "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
#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
- name: Build MeshLab
run: |
.\install\windows\qmake\windows_build.ps1
- name: Deploy MeshLab
run: |
.\install\windows\qmake\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_qmake
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