meshlab/.github/workflows/Windows.yml
2022-11-23 15:14:37 +01:00

73 lines
2.1 KiB
YAML

name: Windows
on: [push, pull_request]
env:
QT_VERSION: 5.15.2
jobs:
windows_build:
name: Build MeshLab (Windows)
runs-on: windows-latest
strategy:
matrix:
precision: [single_precision, double_precision]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
version: ${{ env.QT_VERSION }}
- name: Setup env variables
shell: bash
id: envs
run: |
if [ "${{matrix.precision}}" == "double_precision" ]; then
echo "artifact_suffix=_double" >> $GITHUB_OUTPUT
else
echo "artifact_suffix=" >> $GITHUB_OUTPUT
fi
echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC" >> $GITHUB_ENV
- name: Install dependencies
shell: bash
run: |
choco install ccache ninja wget nsis
- name: Cache external libraries sources
id: cache-ext-libs
uses: actions/cache@v3
with:
path: src/external/downloads/*
key: ${{ runner.os }}-external-libraries
- name: Ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-${{ github.ref }}-${{ matrix.precision }}
- name: Configure and Build
shell: bash
run: |
bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} --nightly --ccache
- name: Deploy
shell: bash
run: |
bash scripts/${{ runner.os }}/2_deploy.sh
- name: Create Installer
shell: bash
run: |
bash scripts/${{ runner.os }}/3_pack.sh
- name: Uploading MeshLab Portable
uses: actions/upload-artifact@v3
with:
name: meshlab_windows_portable${{steps.envs.outputs.artifact_suffix}}
path: install
- name: Upload Meshlab Installer
uses: actions/upload-artifact@v3
with:
name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}}
path: package/MeshLab*