Files
leocad/.github/workflows/continuous.yml
T
Leonardo Zide d185d8a938 Fix Windows Qt installation and update CI actions
The released aqtinstall 3.3.0 resolves Qt 6.11.3 but cannot read its Windows repository layout, so CI fails before building. Pin the Windows job to Qt 6.10.3, whose MSVC 2022 packages remain discoverable with that installer.

Update checkout, cache, artifact upload, and CPU core detection to released Node 24 action versions to remove their Node 20 deprecation warnings. Keep the existing MSVC setup action, which has no newer release.

Validation: actionlint and git diff --check passed. Verified Windows Qt 6.10.3 architecture and archive discovery with aqtinstall 3.3.0. A hosted Windows build remains to be run.
2026-10-21 11:46:48 -07:00

149 lines
4.5 KiB
YAML

name: LeoCAD CI
on:
pull_request:
branches: [ "master" ]
workflow_dispatch:
push:
branches: [ "master" ]
permissions:
contents: read
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '5.15.*'
cache: 'true'
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v3
id: cpu-cores
- name: Generate Makefile
run: qmake PREFIX=/usr
- name: Build
run: make -j ${{ steps.cpu-cores.outputs.count }}
- name: Generate test Makefile
run: |
mkdir -p build/tests
cd build/tests
qmake ../../tests/tests.pro CONFIG+=release CONFIG-=debug
- name: Build tests
working-directory: build/tests
run: make -j ${{ steps.cpu-cores.outputs.count }}
- name: Run tests
working-directory: build/tests
run: make check TESTARGS="-o test-results.xml,junitxml -o -,txt"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ runner.os }}
path: build/tests/test-results.xml
if-no-files-found: ignore
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.11.*'
cache: 'true'
- name: Cache Library
uses: actions/cache@v6
id: cache-library
with:
path: library.bin
key: library-26.08
- name: Download Library
if: steps.cache-library.outputs.cache-hit != 'true'
run: |
wget https://github.com/leozide/leocad/releases/download/v26.09/Library-26.08.zip -O library.zip
unzip library.zip
- name: Cache POV-Ray
uses: actions/cache@v6
id: cache-povray
with:
path: povray
key: povray-build1
- name: Download POV-Ray
if: steps.cache-povray.outputs.cache-hit != 'true'
run: |
wget https://github.com/leozide/povray/releases/download/build1/povray
chmod +x povray
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leozide/leocad/commits/master | jq -r '.sha' > remote.txt
REMOTE=$(cat remote.txt)
echo "REMOTE=$REMOTE"
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v3
id: cpu-cores
- name: Generate Makefile
run: qmake -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib PREFIX=/usr
- name: Build
run: make -j ${{ steps.cpu-cores.outputs.count }}
- name: Generate test Makefile
run: |
mkdir -p build/tests
cd build/tests
qmake ../../tests/tests.pro CONFIG+=release CONFIG-=debug
- name: Build tests
working-directory: build/tests
run: make -j ${{ steps.cpu-cores.outputs.count }}
- name: Run tests
working-directory: build/tests
run: make check TESTARGS="-o test-results.xml,junitxml -o -,txt"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ runner.os }}
path: build/tests/test-results.xml
if-no-files-found: ignore
build-windows:
runs-on: windows-2022
defaults:
run:
shell: cmd
steps:
- uses: actions/checkout@v7
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
# aqtinstall 3.3 cannot read Qt 6.11's Windows repository layout.
version: '6.10.3'
arch: 'win64_msvc2022_64'
cache: 'true'
- name: Generate Makefile
run: qmake -spec win32-msvc CONFIG+=release CONFIG-=debug CONFIG-=debug_and_release
- name: Build
run: nmake /NOLOGO
- name: Generate test Makefile
run: |
mkdir build\tests
cd build\tests
qmake ..\..\tests\tests.pro -spec win32-msvc CONFIG+=release CONFIG-=debug CONFIG-=debug_and_release
- name: Build tests
working-directory: build/tests
run: nmake /NOLOGO
- name: Run tests
working-directory: build/tests
run: nmake /NOLOGO check "TESTARGS=-o test-results.xml,junitxml -o -,txt"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ runner.os }}
path: build/tests/test-results.xml
if-no-files-found: ignore