Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/win_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: windows-latest
runs-on: windows-2022

steps:
- name: Checkout plugin
uses: actions/checkout@v4
Expand All @@ -29,36 +29,42 @@ jobs:
shell: pwsh
run: |
conan profile detect
conan install . -of build --build=missing -pr:b=default -s build_type=Release
conan install . -of build --build=missing -pr:b=default `
-s build_type=Release -s compiler.cppstd=20 `
-c tools.build:jobs=$([Environment]::ProcessorCount) `
-c tools.cmake.cmaketoolchain:generator=Ninja

- name: Cache PlotJuggler install
id: cache-plotjuggler
uses: actions/cache@v4
with:
path: pj_install/
key: ${{ runner.os }}-plotjuggler-${{ hashFiles('plotjuggler/**') }}

- name: Clone PlotJuggler
if: steps.cache-plotjuggler.outputs.cache-hit != 'true'
run: git clone --depth 1 --branch 3.9.2 https://github.com/facontidavide/PlotJuggler.git plotjuggler

- name: Build & install PlotJuggler
if: steps.cache-plotjuggler.outputs.cache-hit != 'true'
shell: pwsh
run: |
mkdir pj_build
cmake -S plotjuggler -B pj_build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\pj_install -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build pj_build --config RelWithDebInfo --target install
cmake --build pj_build --config RelWithDebInfo --target install --parallel $([Environment]::ProcessorCount)

- name: Build your plugin
run: |
shell: pwsh
run: |
Remove-Item -Recurse -Force build -ErrorAction SilentlyContinue
mkdir build
cd build
cmake .. -Dplotjuggler_DIR="${{ github.workspace }}\pj_install\lib\cmake\plotjuggler" -DADD_UNITS=OFF
cmake --build . --config Release
cmake --build . --config Release --parallel $([Environment]::ProcessorCount)
cmake --install . --prefix "${{ github.workspace }}\plugin_install"


- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: plugin-build
path: build/
path: build/
Loading