meshlab/.github/workflows/CompileWindows.yml
2020-02-17 15:33:22 +01:00

89 lines
2.8 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: Setting MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Installing QT
uses: ouuan/install-qt-action@v2.3.1
with:
modules: qtscript xmlpatterns
- name: Setting Env
id: envs
run: |
echo '::set-env name=VCINSTALLDIR::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
echo '::set-output name=date::$(Get-Date -Format "yyyy.MM")'
- name: print date
run: |
echo ${{steps.envs.outputs.date}}
- name: Compiling MeshLab
run: |
cd src\
qmake
nmake
- name: Deploying MeshLab
run: |
.\install\windows\windows_deploy.ps1
- name: Creating NSIS script
run: |
.\install\windows\windows_nsis_script.ps1
- name: Creating installer
uses: joncloud/makensis-action@v1
with:
script-file: "install/windows/resources/meshlab_final.nsi"
- name: Uploading Meshlab Portable
uses: actions/upload-artifact@v1
with:
name: meshlab_windows_portable
path: distrib
- name: Uploading Meshlab Installer
uses: actions/upload-artifact@v1
with:
name: meshlab_windows_installer
path: install/windows/resources/MeshLab${{steps.envs.outputs.date}}.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: Setting MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Installing QT
uses: ouuan/install-qt-action@v2.3.1
with:
modules: qtscript xmlpatterns
- name: Configure
run: |
cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install
# -DBUILD_MINI=ON
- name: Build
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