Files
fritzing-build/.github/workflows/windows.yml
T
2026-03-06 16:02:04 +09:00

94 lines
3.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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.3 (latest open-source 6.5.x; phoenix.pro allows 6.5.3–6.5.10)
# Arch label for MSVC 2022 / 2019 64-bit is identical
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.5.3'
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