94 lines
3.4 KiB
YAML
94 lines
3.4 KiB
YAML
name: Build Fritzing on Windows
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2022
|
|
|
|
env:
|
|
VCPKG_DEFAULT_TRIPLET: x64-windows
|
|
# Pin VCPKG_ROOT to the runner's pre-installed copy to suppress
|
|
# the mismatch warning with the VS-bundled vcpkg path.
|
|
VCPKG_ROOT: C:\vcpkg
|
|
|
|
steps:
|
|
# ── 1. Checkout Fritzing source ──────────────────────────────────────
|
|
- name: Checkout fritzing-app
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: fritzing/fritzing-app
|
|
path: fritzing-app
|
|
|
|
- name: Checkout fritzing-parts
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: fritzing/fritzing-parts
|
|
path: fritzing-parts
|
|
|
|
# ── 2. Setup MSVC 2022 64-bit environment ────────────────────────────
|
|
- name: Setup MSVC environment
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: amd64
|
|
|
|
# ── 3. Install Qt 6.5.10 (max version allowed by phoenix.pro) ───────
|
|
# Arch label for MSVC 2022 / 2019 64-bit is identical
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
version: '6.5.10'
|
|
host: 'windows'
|
|
target: 'desktop'
|
|
arch: 'win64_msvc2019_64'
|
|
modules: 'qt5compat'
|
|
cache: true
|
|
|
|
# ── 4. Cache vcpkg installed packages ────────────────────────────────
|
|
# Caches the installed/ directory so subsequent runs skip
|
|
# downloading and compiling all C++ dependencies.
|
|
- name: Cache vcpkg packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: C:\vcpkg\installed
|
|
key: vcpkg-x64-windows-${{ hashFiles('**/build-windows.yml') }}
|
|
restore-keys: |
|
|
vcpkg-x64-windows-
|
|
|
|
# ── 5. Install C++ dependencies via vcpkg ───────────────────────────
|
|
- name: Install dependencies with vcpkg
|
|
run: |
|
|
vcpkg install boost-filesystem boost-optional boost-assign `
|
|
libgit2 quazip openssl `
|
|
--triplet x64-windows
|
|
shell: pwsh
|
|
|
|
# ── 6. Configure and build Fritzing ─────────────────────────────────
|
|
- name: Configure Fritzing (qmake)
|
|
working-directory: fritzing-app
|
|
run: |
|
|
qmake phoenix.pro ^
|
|
BOOST_PATH="%VCPKG_ROOT%\installed\x64-windows\include" ^
|
|
LIBGIT2_PATH="%VCPKG_ROOT%\installed\x64-windows"
|
|
shell: cmd
|
|
|
|
- name: Build Fritzing (nmake)
|
|
working-directory: fritzing-app
|
|
run: nmake release
|
|
shell: cmd
|
|
|
|
# ── 7. Deploy Qt runtime DLLs next to the executable ────────────────
|
|
- name: Deploy Qt (windeployqt)
|
|
working-directory: fritzing-app/release
|
|
run: windeployqt Fritzing.exe
|
|
shell: cmd
|
|
|
|
# ── 8. Upload the finished build as a downloadable artifact ─────────
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: fritzing-windows-x64
|
|
path: fritzing-app/release/
|
|
retention-days: 14
|