mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 08:09:39 +00:00
# Conflicts: # .github/workflows/CompileAndRelease.yml # .github/workflows/CompileWindows.yml
103 lines
3.6 KiB
YAML
103 lines
3.6 KiB
YAML
name: CompileWindows
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
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: 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
|
|
|
|
windows_build_cmake:
|
|
name: Build MeshLab (Windows, CMake)
|
|
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: 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: Setup env variables
|
|
id: envs
|
|
run: |
|
|
echo "::set-output name=date::$(type ML_VERSION)"
|
|
- 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_portable_windows_cmake
|
|
# path: install
|