Skip to content

Commit

Permalink
fix github pipeline for macos and windows
Browse files Browse the repository at this point in the history
Also changed vcpkg dependency from qt5 to qt5-base, because that should be
enough and vcpkg seems to build from source (?) and no one has time to build Qt
completely.
Includes some hacks to get around the fact that the macos pipeline does not set
the path to the QtConfig.cmake correctly.
  • Loading branch information
Michel Schmid committed Feb 14, 2024
1 parent 2f304e0 commit d372b59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: "Install dependencies"
run: brew tap robotology/formulae && brew install cmake pkg-config qt@5 protobuf@21 robotology/formulae/ode
run: brew tap robotology/formulae && brew install cmake pkg-config qt@5
- name: "Build"
run: make
# for some reason qt5 is not correctly in the path and this will break whenever the location of it changes
# 5.15.11 is for macos-12 and 5.15.12 is for macos-13
run: PATH=/usr/local/Cellar/qt@5/5.15.11/lib/cmake/Qt5:/usr/local/Cellar/qt@5/5.15.12/lib/cmake/Qt5:$PATH && make BUILD_ODE=ON

build-windows:
runs-on: windows-latest
Expand All @@ -45,7 +47,8 @@ jobs:
with:
vcpkgGitCommitId: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
vcpkgDirectory: c:/vcpkg # folder must reside in c:\ otherwise qt wont install due to long path errors

# needed to actually install the vcpkg dependencies
runVcpkgInstall: true

- name: Run CMake and run vcpkg to build packages
uses: lukka/run-cmake@v10
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ BUILDDIR=build
BUILDTYPE=Release
#BUILDTYPE=Debug

BUILD_ODE=OFF

.PHONY: all build mkbuilddir cmake dist package deb install clean clean-all

all: build
Expand All @@ -22,7 +24,7 @@ mkbuilddir:
[ -d $(BUILDDIR) ] || mkdir $(BUILDDIR)

cmake: CMakeLists.txt
cd $(BUILDDIR) && cmake -DCMAKE_BUILD_TYPE=$(BUILDTYPE) ..
cd $(BUILDDIR) && cmake -DCMAKE_BUILD_TYPE=$(BUILDTYPE) -DBUILD_ODE=$(BUILD_ODE) ..

dist: package

Expand Down
4 changes: 2 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "grsim",
"version-string": "0.0.1",
"dependencies": [
"qt5",
"qt5-base",
"ode",
"protobuf"
]
}
}

0 comments on commit d372b59

Please sign in to comment.