Windows CI should create the installer #686
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: windows | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, closed] | |
jobs: | |
windows-build: | |
runs-on: ${{ matrix.windows-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
windows-version: | |
- 'windows-2019' | |
- 'windows-latest' | |
env: | |
CXXFLAGS: /MP | |
steps: | |
- name: Sync repository | |
uses: actions/checkout@v4 | |
- name: Install Conan | |
uses: turtlebrowser/get-conan@main | |
- name: Cache Qt and Conan | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ github.workspace }}/qt_installation/ | |
~/.conan/data | |
key: ${{ runner.os }}-${{ hashFiles('**/qt_installation/**', '**/conanfile.txt') }} | |
restore-keys: ${{ runner.os }}- | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: '5.15.2' | |
arch: 'win64_msvc2019_64' | |
dir: '${{ github.workspace }}/qt_installation/' | |
cache: 'true' | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
tools: 'tools_ifw' | |
add-tools-to-path: true | |
- name: Build Plotjuggler | |
shell: pwsh | |
run: > | |
conan profile detect; | |
conan install . -of build --build=missing -pr:b=default -s build_type=Release; | |
set TOOLCHAIN=%cd%/build/conan_toolchain.cmake; | |
cmake -Ax64 -T host=x64 -B build -DCMAKE_INSTALL_PREFIX=install -DCMAKE_TOOLCHAIN_FILE=%TOOLCHAIN% -DCMAKE_POLICY_DEFAULT_CMP0091=NEW .; | |
cmake --build build --config Release --target install | |
- name: Build QT Installer | |
# if: github.event_name == 'release' || github.event.inputs.run-installer == 'true' | |
shell: pwsh | |
run: > | |
xcopy src/PlotJuggler/installer installer/ /Y /S /f /z; | |
xcopy install/bin/*.* installer/io.plotjuggler.application/data /Y /S /f /z; | |
windeployqt.exe --release installer/io.plotjuggler.application/data/PlotJuggler.exe; | |
binarycreator.exe --offline-only -c installer\config.xml -p installer PlotJuggler-Windows-installer.exe | |
- name: Upload installer | |
if: github.event_name == 'release' || github.event.inputs.run-installer == 'true' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: PlotJuggler-Windows-installer.exe |