Skip to content

Commit

Permalink
Use pre-built vcpkg packages to reduce build time (#1458)
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 authored May 4, 2020
1 parent 35bd08e commit 3f76766
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 55 deletions.
38 changes: 0 additions & 38 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,41 +64,3 @@ jobs:
- script: |
'.ci/script.sh'
displayName: 'Script'
- job: windows_vs2019_x64
timeoutInMinutes: 120
pool:
vmImage: 'windows-2019'
strategy:
matrix:
Debug64:
CONFIGURATION: 'Debug'
# Release64:
# CONFIGURATION: 'Release'
variables:
VCPKG_INSTALL_ROOT: $(Build.SourcesDirectory)\vcpkg
VCPKG_ARCH: 'x64-windows'
VCPKG_PACKAGES: 'assimp boost-system boost-filesystem ccd eigen3 fcl'
# 'dart-utils' needs tinyxml2 and boost algorithm/lexical-cast
# and also boost-math to resolve a circular dependency with lexical-cast
VCPKG_OPTIONAL_PACKAGES: 'boost-algorithm boost-lexical-cast boost-math bullet3 freeglut ode opengl tinyxml2 urdfdom'
VCPKG_OPTIONAL_PACKAGES_NOT_WORKING: 'flann ipopt nlopt osg'
BUILD_TOOLSET_VERSION: '142'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
steps:
- script: |
git clone -q --depth 1 https://github.com/microsoft/vcpkg.git $(VCPKG_INSTALL_ROOT)
$(VCPKG_INSTALL_ROOT)\bootstrap-vcpkg.bat
displayName: 'Install vcpkg'
- script: |
$(VCPKG_INSTALL_ROOT)\vcpkg.exe install --recurse --triplet $(VCPKG_ARCH) $(VCPKG_PACKAGES) $(VCPKG_OPTIONAL_PACKAGES)
$(VCPKG_INSTALL_ROOT)\vcpkg.exe integrate install
displayName: 'Install dependencies'
- script: |
cmake --version
mkdir build
cd build
cmake .. -G "$(CMAKE_GENERATOR)" -A x64 -DCMAKE_BUILD_TYPE=$(CONFIGURATION) -Wno-dev -T "v$(BUILD_TOOLSET_VERSION),host=x64" -DVCPKG_TARGET_TRIPLET=$(VCPKG_ARCH) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_INSTALL_ROOT)/scripts/buildsystems/vcpkg.cmake" -DCMAKE_INSTALL_PREFIX="$(Build.BinariesDirectory)/$(REPO_NAME)" -DDART_MSVC_DEFAULT_OPTIONS=ON -DDART_VERBOSE=ON
cmake --build . --target ALL_BUILD --config $(CONFIGURATION) -- /maxcpucount:4
displayName: 'Build'
workingDirectory: '$(Build.SourcesDirectory)'
33 changes: 16 additions & 17 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,29 @@ jobs:
windows_2019:
name: Windows [Release]
runs-on: windows-2019
env:
COMPILER: gcc
BUILD_TYPE: Release
RUN_TESTS: OFF
VCPKG_ROOT: 'C:/dartsim/vcpkg'
VCPKG_BUILD_TAG: v0.1.1
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
env:
COMPILER: gcc
VCPKG_ROOT: 'C:\vcpkg'
VCPKG_PACKAGES: 'assimp boost-system boost-filesystem ccd eigen3 fcl'
# 'dart-utils' needs tinyxml2 and boost algorithm/lexical-cast
# and also boost-math to resolve a circular dependency with lexical-cast
VCPKG_OPTIONAL_PACKAGES: 'boost-algorithm boost-lexical-cast boost-math bullet3 tinyxml2'
# VCPKG_OPTIONAL_PACKAGES_NOT_WORKING: 'flann ipopt nlopt ode osg urdfdom'
shell: cmd
run: |
vcpkg install --recurse --triplet x64-windows %VCPKG_PACKAGES%
vcpkg install --recurse --triplet x64-windows %VCPKG_OPTIONAL_PACKAGES%
mkdir -p C:/dartsim
choco install -y wget
wget https://github.com/dartsim/vcpkg-build/releases/download/%VCPKG_BUILD_TAG%/vcpkg-dartsim-dependencies.zip
unzip vcpkg-dartsim-dependencies.zip -d C:/dartsim
- name: Build
env:
COMPILER: gcc
VCPKG_ROOT: 'C:\vcpkg'
BUILD_TYPE: Release
RUN_TESTS: OFF
shell: cmd
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake"
cmake --build .
cmake .. -G "Visual Studio 16 2019" -A x64 -Wno-dev ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" ^
-DDART_MSVC_DEFAULT_OPTIONS=ON ^
-DDART_VERBOSE=ON
cmake --build . --target ALL_BUILD -- /maxcpucount:4

0 comments on commit 3f76766

Please sign in to comment.