Skip to content

Commit

Permalink
Build on GitHub (#165)
Browse files Browse the repository at this point in the history
* macOS build on Github CI
* Remove Travis
* Reduce XCode builds
* Build Windows
* Make Windows Builds work
* removed qwt build from ci for now as it seemed optional and needs more
refactoring
* use correct exit codes for the three .bat files
* upload a complete artifact including QT DLLs
* make some parameters for the bat files CI-Friendly
* No build for Ubuntu 16.04

Signed-off-by: Hannes Achleitner <[email protected]>
Co-authored-by: Lukas Einfalt <[email protected]>
  • Loading branch information
hannesa2 and lukx authored Jan 22, 2021
1 parent ceb8fea commit 447debd
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 51 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/BuildPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: PullRequest

on: [pull_request]

jobs:
buildMac:
name: Build macOS
runs-on: macOS-latest
strategy:
matrix:
xcode: [Xcode_12.2, Xcode_12.3, Xcode_11.7]
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
submodules: true
- name: Investigate available XCode versions
run: ls -n /Applications/ | grep Xcode*
- name: Set XCode Version
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: install qt
run: brew install qt
- name: install build environment
run: scripts/install.sh
- name: Build project
run: scripts/build.sh
- name: Archive artifact
uses: actions/[email protected]
if: ${{ success() }}
with:
name: DLT-macOS ${{ matrix.xcode }}
path: build/release

buildLinux:
name: Build ${{ matrix.ubuntu }}
strategy:
matrix:
ubuntu: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.ubuntu }}
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
submodules: true
- name: install build environment
run: scripts/install.sh
- name: Build project
run: scripts/build.sh
- name: Archive artifact
uses: actions/[email protected]
if: ${{ success() }}
with:
name: DLT ${{ matrix.ubuntu }}
path: build/release

# windows build is work in progress
buildWindows:
name: Build Windows
strategy:
matrix:
task: [parser, sdk]
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
submodules: true
- name: Install qt
uses: jurplel/install-qt-action@v2
with:
mirror: http://ftp.fau.de/qtproject/
version: 5.12.10
- name: Build ${{ matrix.task }}
run: $env:WORKSPACE=$env:GITHUB_WORKSPACE; $env:QTDIR=$env:Qt5_DIR.Replace('/','\'); ./build_${{ matrix.task }}_windows_qt5_MSVC.bat
- name: Archive artifact
uses: actions/[email protected]
if: ${{ success() }}
with:
name: DLT ${{ matrix.task }}
path: build/dist
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Diagnostic Log and Trace Viewer
Build and Test status: [![Build Status](https://travis-ci.org/GENIVI/dlt-viewer.svg?branch=master)](https://travis-ci.org/GENIVI/dlt-viewer)
## Overview

The Diagnostic Log and Trace Viewer is an application that can send and receive control messages to the DLT daemon, e.g. to set individual log levels of applications and contexts or get the list of applications and contexts registered in the DLT daemon. DLT viewer is based on Qt for Windows and Linux and can run on the Mac though that is not officially supported.
Expand Down
34 changes: 13 additions & 21 deletions build_parser_windows_qt5_MSVC.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,22 @@ if "%MSVC_DIR%"=="" set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio
set PATH=%QTDIR%\bin;%MSVC_DIR%;%MSVC_DIR%\bin;%PATH%
set QTSDK=%QTDIR%

IF "%DLT_PARSER_DIR%"=="" (
if '%WORKSPACE%'=='' (
if '%DLT_PARSER_DIR%'=='' (
set DLT_PARSER_DIR=c:\DltParser
)

set SOURCE_DIR=%CD%
set BUILD_DIR=%CD%\build\release
) else (
if '%DLT_PARSER_DIR%'=='' (
set DLT_PARSER_DIR=%WORKSPACE%\build\dist\DltParser
)

set SOURCE_DIR=%WORKSPACE%
set BUILD_DIR=%WORKSPACE%\build\release
)

set SOURCE_DIR=%CD%
set BUILD_DIR=%CD%\build\release

echo ************************************
echo * QTDIR = %QTDIR%
Expand Down Expand Up @@ -118,24 +128,6 @@ if not exist %DLT_PARSER_DIR%\examples mkdir %DLT_PARSER_DIR%\examples
IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

echo *** Copy files ***
rem copy %QTDIR%\bin\icuin54.dll %DLT_PARSER_DIR%
rem IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

rem copy %QTDIR%\bin\icuuc54.dll %DLT_PARSER_DIR%
rem IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

rem copy %QTDIR%\bin\icudt54.dll %DLT_PARSER_DIR%
rem IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

rem copy %QTDIR%\bin\libwinpthread-1.dll %DLT_PARSER_DIR%
rem IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER
rem
rem copy %QTDIR%\bin\libgcc_s_dw2-1.dll %DLT_PARSER_DIR%
rem IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER
rem
rem copy "%QTDIR%\bin\libstdc++-6.dll" %DLT_PARSER_DIR%
rem IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

copy %QTDIR%\bin\Qt5Core.dll %DLT_PARSER_DIR%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER

Expand Down
44 changes: 24 additions & 20 deletions build_qwt_windows_qt5_MSVC.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ REM 30.1.18 1.0 Gernot Wirschal First versioned file
REM 4.7.19 1.1 Alexander Wenzel Update to Qt 5.12.4, Qwt 6.1.4 and Visual Studio 2015
REM 25.11.20 1.2 Alexander Wenzel Update to Qt 5.12.10


echo ************************************
echo *** Build QWT Library ***
echo ************************************
Expand All @@ -15,7 +14,6 @@ echo ************************************
echo *** Configuration ***
echo ************************************


if "%MSVC_VERSION%"=="" (
echo "Set default MSVCS ""
set MSVC_VERSION=2015
Expand Down Expand Up @@ -44,12 +42,11 @@ echo Target architecture is %ARCHITECTURE%

echo *** Setting up environment ***

echo Set QT path for %QTVER%

IF "%QTVER%"=="" (
set QTVER=5.12.10
)

echo Set QT path for %QTVER%
echo Set QT diretory for %ARCHITECTURE%

if "%QTDIR%"=="" (
Expand All @@ -71,34 +68,31 @@ IF "%QWT%"=="" (
set QWT=6.1.4
)

set QWT_DIR=C:\Qwt-%QWT%_%MSVC_VERSION%_%QTVER%%DIR_POSTFIX%

set PATH=%QTDIR%\bin;%MSVC_DIR%;%MSVC_DIR%\bin;%PATH%

IF "%WORKSPACE%" == "" (
if '%WORKSPACE%'=='' (
IF "%QWT_DIR%"=="" (
set QWT_DIR=C:\Qwt-%QWT%_%MSVC_VERSION%_%QTVER%%DIR_POSTFIX%
)

set SOURCE_DIR=%CD%\qwt-%QWT%
) ELSE (
) else (
if '%QWT_DIR%'=='' (
set QWT_DIR=%WORKSPACE%\Qwt-%QWT%_%MSVC_VERSION%_%QTVER%%DIR_POSTFIX%
)

set SOURCE_DIR=%WORKSPACE%\qwt-%QWT%
)

IF '%SEVENZ_DIR%'=='' (
set SEVENZ_DIR="C:\Program Files\7-Zip"
)

IF exist %QWT_DIR% (
echo ************************************
echo *** Delete old qwt Directory ***
echo ************************************

rmdir /s /q %QWT_DIR%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER
)

echo ************************************
echo * QTDIR = %QTDIR%
echo * MSVC_DIR = %MSVC_DIR%
echo * PATH = %PATH%
echo * DLT_VIEWER_SDK_DIR = %DLT_VIEWER_SDK_DIR%
echo * QWT_DIR = %QWT_DIR%
echo * SOURCE_DIR = %SOURCE_DIR%
echo ************************************

Expand All @@ -109,6 +103,15 @@ IF not exist "%MSVC_DIR%" (
GOTO ERROR_HANDLER
)

IF exist %QWT_DIR% (
echo ************************************
echo *** Delete old qwt Directory ***
echo ************************************

rmdir /s /q %QWT_DIR%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER
)

echo ************************************
echo *** Unzip Archives ***
echo ************************************
Expand Down Expand Up @@ -162,8 +165,9 @@ echo ### ERROR occured ###
echo ####################################
cd %WORKINGDIR%
IF '%WORKSPACE%'=='' (
pause
pause
)
exit 1


:QUIT
Expand All @@ -173,6 +177,6 @@ echo ************************************
echo Qwt installed in: %QWT_DIR%
cd %WORKINGDIR%
IF '%WORKSPACE%'=='' (
pause
pause
)

13 changes: 4 additions & 9 deletions build_sdk_windows_qt5_MSVC.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if '%WORKSPACE%'=='' (
set BUILD_DIR=%CD%\build\release
) else (
if '%DLT_VIEWER_SDK_DIR%'=='' (
set DLT_VIEWER_SDK_DIR=%WORKSPACE%\DltViewerSDK
set DLT_VIEWER_SDK_DIR=%WORKSPACE%\build\dist\DltViewerSDK
)

set SOURCE_DIR=%WORKSPACE%
Expand Down Expand Up @@ -288,18 +288,13 @@ echo ####################################
echo ### ERROR occured ###
echo ####################################
cd ..
if '%WORKSPACE%'=='' (
pause
)
rem exit 1
exit 1

:QUIT
echo ************************************
echo *** SUCCESS finish ***
echo ************************************
cd ..
echo SDK installed in: %DLT_VIEWER_SDK_DIR%
if '%WORKSPACE%'=='' (
pause
)
rem exit 0

exit 0
File renamed without changes.
File renamed without changes.

0 comments on commit 447debd

Please sign in to comment.