Improve Pipeline & Misc Improvements (#12)

* split pipeline

* add dedicated doc build step

* parallel builds

* fix permissions

* rm push trigger

* mv gcc ubuntu

* add windows build

* always build the docs

* doc alignment

* checkout recursive

* depend on builds for documentation

* set standard via cmake

* update libCZI to main

* pretty_function win32

* version history update

* disable windows release build

missing dependencies for doc generation

trigger ci on push to main

adapt doc-gen job require only doxygen
This commit is contained in:
m-aXimilian
2025-10-07 17:11:43 +02:00
committed by Maximilian Kueffner
parent fec5c08aaa
commit b1923a490c
9 changed files with 170 additions and 64 deletions
+33
View File
@@ -0,0 +1,33 @@
name: build-ubuntu
on:
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: setup
run: |
sudo apt update
sudo apt -y install libopencv-dev libglfw3 libglfw3-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev doxygen graphviz
- name: Configure Ubuntu
run: cmake -B ${{github.workspace}}/build/gcc-${{ matrix.configuration }} -S . -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
- name: Build Ubuntu
run: cmake --build ${{github.workspace}}/build/gcc-${{ matrix.configuration }} --config ${{ matrix.configuration }} -- -j 10
- name: Test Ubuntu
run: |
cd ${{github.workspace}}/build/gcc-${{ matrix.configuration }}
ctest -C ${{ matrix.configuration }}
+43
View File
@@ -0,0 +1,43 @@
name: build-windows
on:
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
configuration: [Debug]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cacke vcpkg
uses: actions/cache@v3
with:
path: 'C:/vcpkg/installed'
key: vcpkg-x64-windows-${{ matrix.configuration }}
restore-keys: |
vcpkg-x64-windows-${{ matrix.configuration }}
- name: Install OpenCV vcpkg
run: |
vcpkg install opencv[core]:x64-windows-static
- name: Set PATH for vcpkg
run: echo "PATH=C:/vcpkg/installed/x64-windows/bin:${{ env.PATH }}" >> $GITHUB_ENV
- name: Configure Windows
run: cmake -B ${{github.workspace}}/build/msvc-${{ matrix.configuration }} -S . -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
- name: Build Windows
run: cmake --build ${{github.workspace}}/build/msvc-${{ matrix.configuration }} --config ${{ matrix.configuration }} -j 10
- name: Test Windows
run: |
cd ${{github.workspace}}/build/msvc-${{ matrix.configuration }}
ctest -C ${{ matrix.configuration }}
+25
View File
@@ -0,0 +1,25 @@
name: CI Workflow
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-ubuntu:
uses: ./.github/workflows/build-ubuntu.yml
build-windows:
uses: ./.github/workflows/build-windows.yml
generate-docs:
permissions:
id-token: write
pages: write
uses: ./.github/workflows/generate-docs.yml
if: github.ref == 'refs/heads/main'
needs:
- build-ubuntu
- build-windows
@@ -1,40 +1,33 @@
name: C/C++ CI
name: generate-docs
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: setup
run: |
sudo apt update
sudo apt -y install libopencv-dev libglfw3 libglfw3-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev doxygen graphviz
- name: configure
run: cmake --preset gcc-debug
- name: build
run: cmake --build build --preset gcc-debug
- name: test
run: |
cd ${{github.workspace}}/build/gcc-debug
ctest -C Debug
sudo apt -y install doxygen graphviz
- name: Upload static files as artifact
- name: Generate Documentation
run: |
cmake -S . -B build -DPIXELARIUM_BUILD_DOCS_ONLY=ON
cmake --build build
- name: Upload Documentation Files as Artifacts
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: ${{github.workspace}}/build/gcc-debug/doc/html
path: ${{github.workspace}}/build/doc/html
# Deployment job
deploy:
environment:
name: github-pages