Skip to content

Require MacOS build pass #1197

Require MacOS build pass

Require MacOS build pass #1197

Workflow file for this run

name: Build-Windows
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
VCPKG_OVERLAY_PORTS: ${{ github.workspace }}/.github/vcpkg_overlays/qt
jobs:
build-dependencies:
name: "Build PhotoBroom dependencies for Windows"
runs-on: windows-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run vcpkg
uses: lukka/run-vcpkg@v11.5
with:
vcpkgJsonGlob: vcpkg.json
# builded dependencies will be cached and reused in later jobs
- name: build dependencies
run: |
vcpkg\vcpkg.exe install
build-photo-broom:
name: "Build PhotoBroom sources on Windows"
needs: build-dependencies
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config:
- name: "debug"
cmake_config: "ninja_debug_vcpkg"
cmake_build: "Ninja Debug"
- name: "release"
cmake_config: "ninja_release_vcpkg"
cmake_build: "Ninja Release"
steps:
- name: Print setup
run: |
echo "config: ${{ matrix.config.cmake_config }}"
echo "build: ${{ matrix.config.cmake_build }}"
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
cache: 'true'
modules: 'qtmultimedia qtquick3d qtshadertools qtquicktimeline'
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
windows_compile_environment: msvc
- name: Run vcpkg
uses: lukka/run-vcpkg@v11.5
with:
vcpkgJsonGlob: vcpkg.json
- name: Build
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.config.cmake_config }}
configurePresetAdditionalArgs: |
[
'-DBUILD_TESTING=OFF',
'-DBUILD_SHARED_LIBS=TRUE',
'-DCMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=C:/ProgramData/Chocolatey/bin/ccache.exe',
'-DCMAKE_C_COMPILER_LAUNCHER:FILEPATH=C:/ProgramData/Chocolatey/bin/ccache.exe'
]
buildPreset: "${{ matrix.config.cmake_build }}"
- name: Make package
if: matrix.config.name == 'release'
run: cmake --build --target package --preset "${{ matrix.config.cmake_build }}"
- name: Upload artifact
if: matrix.config.name == 'release'
uses: actions/upload-artifact@v4
with:
name: Installer
path: out/build/ninja_release_vcpkg/PhotoBroom-*-win64.exe
test-installation:
name: "Windows installer verification"
needs: build-photo-broom
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: Installer
path: ./installer
- name: Verify list of files in installer
run: |
$installerPath = Get-ChildItem -Path ./installer -Filter PhotoBroom-*-win64.exe | Select-Object -ExpandProperty FullName
7z l $installerPath | python .github/parse7z-l.py | python .github/compare.py
- name: Install application
run: |
$installerPath = Get-ChildItem -Path ./installer -Filter PhotoBroom-*-win64.exe | Select-Object -ExpandProperty FullName
Start-Process -FilePath $installerPath -ArgumentList '/S' -Wait
- name: Get dependencies checker
run: |
curl -L -o dependencies_valdiator.py https://gist.githubusercontent.com/Kicer86/4727b1a1ecb96e717ea1c37866134cf4/raw/d7b6f0bc01515a2ba5c17fedd7832038880f62d6/dependencies_valdiator.py
- name: Check dependencies
run: |
pip install pefile
python dependencies_valdiator.py "C:\Program Files\PhotoBroom\Photo_Broom.exe"