Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled CI MSVC build jobs. #80

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
66 changes: 41 additions & 25 deletions .github/workflows/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
name: libQGLViewer
on: [push, pull_request]

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
buildQt5:
runs-on: ubuntu-latest
build:
strategy:
matrix:
include:
- runner: 'ubuntu-latest'
qtVersion: '6.2.2'
- runner: 'ubuntu-latest'
qtVersion: '5.15.2'
# - runner: 'macOS-11'
# qtVersion: '6.2.2'
- runner: 'windows-2019'
qtVersion: '6.2.2'
qtArch: 'win64_msvc2019_64'
- runner: 'windows-2019'
qtVersion: '5.15.2'
qtArch: 'win64_msvc2019_64'
runs-on: ${{ matrix.runner }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install -y build-essential qtbase5-dev libglu1-mesa-dev
- name: Build all
- uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qtVersion }}
arch: ${{ matrix.qtArch }}
cache: true

- name: Install GLU
if: startsWith(matrix.runner, 'ubuntu')
run: sudo apt-get install -y libglu1-mesa-dev

- name: Build QGLViewer
run: |
mkdir build
cd build
cmake ..
make all
buildQt6:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install -y build-essential qt6-base-dev libglu1-mesa-dev
- name: Build all
run: |
mkdir build
cd build
cmake ..
make all
mkdir build
cmake -B build -S .
cmake --build build --config Release
9 changes: 9 additions & 0 deletions CMakeLists.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake explicitly recommends to set the minimum version before the project name. Could you move the line
cmake_minimum_required(VERSION 3.16) above the project() line?

Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ add_library(QGLViewer SHARED ${QGLViewer_SRC})
target_include_directories(QGLViewer INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(QGLViewer PRIVATE ${QtLibs} OpenGL::GL OpenGL::GLU)

if(MSVC)
# Avoid a compiler error when using std::min/std::max.
target_compile_definitions(QGLViewer PRIVATE NOMINMAX)
endif()

if(WIN32)
target_compile_definitions(QGLViewer PRIVATE CREATE_QGLVIEWER_DLL)
endif()

# Example: animation.
set(animation_SRC
"${PROJECT_SOURCE_DIR}/examples/animation/animation.cpp"
Expand Down
2 changes: 2 additions & 0 deletions QGLViewer/VRender/NVector3.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
namespace vrender
{
class Vector3;
class NVector3;
std::ostream& operator<<(std::ostream &out,const NVector3 &u);

class NVector3
{
Expand Down
1 change: 1 addition & 0 deletions QGLViewer/VRender/Primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace vrender
{
class Feedback3DColor ;
class Primitive ;
std::ostream& operator<<(std::ostream&, const Feedback3DColor&) ;

#define EPS_SMOOTH_LINE_FACTOR 0.06 /* Lower for better smooth lines. */

Expand Down
2 changes: 2 additions & 0 deletions QGLViewer/VRender/Vector2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

namespace vrender
{
class Vector2;
class Vector3;
std::ostream& operator<< (std::ostream&,const Vector2&);

class Vector2
{
Expand Down
2 changes: 2 additions & 0 deletions QGLViewer/VRender/Vector3.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
namespace vrender
{
class NVector3;
class Vector3;
std::ostream& operator<< (std::ostream&, const Vector3&);

class Vector3
{
Expand Down