Skip to content

Commit

Permalink
Update windows CI to leverage colcon
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jul 4, 2022
1 parent 71fbdd5 commit d26e435
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 130 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/bionic_build.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- feature/CommandLanguage
pull_request:
schedule:
- cron: '0 5 * * *'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/focal_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- feature/CommandLanguage
pull_request:
schedule:
- cron: '0 5 * * *'
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/windows_2019.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Windows-2019

on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 5 * * *'

env:
VCPKG_PKGS: >-
fcl bullet3 octomap console-bridge eigen3 yaml-cpp benchmark tinyxml2 assimp orocos-kdl pcl lapack-reference jsoncpp boost-dll boost-filesystem boost-filesystem boost-serialization boost-program-options boost-graph
jobs:
windows_ci:
name: Windows-2019
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
path: workspace/src/trajopt

- name: checkout-vcpkg
uses: actions/checkout@v3
with:
path: vcpkg
repository: microsoft/vcpkg

- name: bootstrap-vcpkg
working-directory: vcpkg
run: bootstrap-vcpkg.bat

- name: vcpkg-dry-run
working-directory: vcpkg
shell: cmd
run: |
vcpkg install --dry-run --triplet x64-windows-release ${{ env.VCPKG_PKGS }} > vcpkg_dry_run.txt
- name: cache-vcpkg-archives
if: startsWith(github.ref, 'refs/tags/v') != true
id: cache-vcpkg-archives
uses: pat-s/always-upload-cache@v3
with:
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
key: ${{ runner.os }}-x64-windows-release-vcpkg-${{ hashFiles('vcpkg/vcpkg_dry_run.txt') }}-main
restore-keys: |
${{ runner.os }}-x64-windows-release-vcpkg-
- name: install-depends
shell: cmd
run: |
vcpkg integrate install
python -m pip install vcstool -q
python -m pip install colcon-common-extensions -q
python -m pip install ninja -q
vcpkg install --triplet x64-windows-release ${{ env.VCPKG_PKGS }}
- name: configure-msvc
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: build-workspace
working-directory: workspace
shell: cmd
run: |
vcs import --input "${{ github.workspace }}/workspace/src/trajopt/dependencies.rosinstall" src/
colcon build --packages-ignore trajopt_sqp trajopt_ifopt --event-handlers console_direct+ --cmake-args -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTRAJOPT_ENABLE_TESTING=ON -DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF
if %ERRORLEVEL% GEQ 1 exit 1
- name: run-test
working-directory: workspace
shell: cmd
run: |
call ./install/setup.bat
set PATH=%PATH%;C:/vcpkg/installed/x64-windows-release/bin
colcon test --packages-skip trajopt_sqp trajopt_ifopt --event-handlers console_direct+ --return-code-on-test-failure
if %ERRORLEVEL% GEQ 1 exit 1
colcon test-result --verbose
if %ERRORLEVEL% GEQ 1 exit 1
44 changes: 0 additions & 44 deletions .github/workflows/windows_noetic_build.yml

This file was deleted.

8 changes: 4 additions & 4 deletions dependencies.rosinstall
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
- git:
local-name: ros_industrial_cmake_boilerplate
uri: https://github.com/ros-industrial/ros_industrial_cmake_boilerplate.git
version: master
version: 0.2.16
- git:
local-name: tesseract
uri: https://github.com/ros-industrial-consortium/tesseract.git
version: master
version: 0.9.11
- git:
local-name: opw_kinematics
uri: https://github.com/Jmeyer1292/opw_kinematics.git
version: master
version: 0.4.6
- git:
local-name: ifopt
uri: https://github.com/ethz-adrl/ifopt.git
version: master
version: 2.1.3
20 changes: 0 additions & 20 deletions dependencies_with_ext.rosinstall

This file was deleted.

8 changes: 6 additions & 2 deletions trajopt_ext/osqp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ if(NOT ${osqp_FOUND})
SOURCE_DIR ${CMAKE_BINARY_DIR}/../trajopt_ext/osqp-src
BINARY_DIR ${CMAKE_BINARY_DIR}/../trajopt_ext/osqp-build
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/patch_osqp.cmake
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON)
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
-DVCPKG_TARGET_TRIPLET:STRING=${VCPKG_TARGET_TRIPLET})
endif()

install(FILES package.xml DESTINATION share/osqp)
6 changes: 5 additions & 1 deletion trajopt_ext/osqp_eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ if(NOT ${OsqpEigen_FOUND})
GIT_TAG v0.6.3
SOURCE_DIR ${CMAKE_BINARY_DIR}/../trajopt_ext/osqp_eigen-src
BINARY_DIR ${CMAKE_BINARY_DIR}/../trajopt_ext/osqp_eigen-build
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE:STRING=Release)
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
-DVCPKG_TARGET_TRIPLET:STRING=${VCPKG_TARGET_TRIPLET})

endif()

Expand Down

0 comments on commit d26e435

Please sign in to comment.