Skip to content

[ISSUE #186][PLOT_VIEW] Build for < Qt5.15 fails #45

[ISSUE #186][PLOT_VIEW] Build for < Qt5.15 fails

[ISSUE #186][PLOT_VIEW] Build for < Qt5.15 fails #45

name: Build windows Qt5
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
branch:
description: 'Target branch'
required: true
default: 'master'
jobs:
build_windows:
runs-on: windows-latest
steps:
- uses: ilammy/msvc-dev-cmd@v1
# Creation of the ..\downloads directory
- name: Creation of the "..\downloads" directory
run: mkdir ..\downloads
shell: cmd
working-directory: .\
# Creation of the ..\tools directory
- name: Creation of the "..\tools" directory
run: mkdir ..\tools
shell: cmd
working-directory: .\
# Installation of jom
- name: Installation of the jom
run: |
Invoke-WebRequest http://download.qt.io/official_releases/jom/jom.zip -OutFile ..\downloads\jom.zip
Expand-Archive '..\downloads\jom.zip' '..\tools\jom'
shell: powershell
# Add jom to path
- name: Add jom to path
run: |
echo "D:/a/${{ github.event.repository.name }}/tools/jom/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: powershell
# Checkout dlt-viewer's revision v2.24.0
- name: Checkout of the dlt-viewer
uses: actions/checkout@v3
with:
repository: GENIVI/dlt-viewer
ref: ebb3c355bc0edf2b6c3be84452b8afa4d1a82641
# Checkout project's revision, which is pushed
- name: Checkout of the project
uses: actions/checkout@v3
with:
repository: svlad-90/${{ github.event.repository.name }}
path: .\plugin\${{ github.event.repository.name }}
ref: ${{ github.ref }}
# Adjust dlt-viewer's plugin CMakeLists.txt file to sub-include the plugin
- name: Patch dlt-viewer's plugin CMakeLists.txt
run: Add-Content .\CMakeLists.txt "`nadd_subdirectory(${{ github.event.repository.name }}/dltmessageanalyzerplugin/src)"
shell: powershell
working-directory: .\plugin
# Install Qt5
- name: Install Qt5
uses: jurplel/install-qt-action@v3
with:
version: 5.15.0
target: desktop
host: windows
dir: ${{ github.workspace }}\Qt5
cache: true
# Create build directory
- name: Creation of the ".\build" directory
run: mkdir ..\build
shell: cmd
working-directory: .\
#CMake for dlt-viewer, including the DLT-Message_analyzer plugin
- name: CMake
run: |
cmake ..\${{ github.event.repository.name }}\ "-GCodeBlocks - NMake Makefiles JOM" "-DCMAKE_BUILD_TYPE:STRING=Release" "-DCMAKE_PREFIX_PATH:STRING=${{ github.workspace }}/Qt5/Qt/5.15.0/msvc2019_64" "-DQT_QMAKE_EXECUTABLE:STRING=${{ github.workspace }}/Qt5/Qt/5.15.0/msvc2019_64/bin/qmake.exe"
shell: cmd
working-directory: ..\build
#List files in build folder
- name: List files in build folder
run: |
dir
shell: cmd
working-directory: ..\build
# Build of the project
- name: Jom
run: |
jom.exe -j8
shell: cmd
working-directory: ..\build