-
Notifications
You must be signed in to change notification settings - Fork 286
122 lines (104 loc) · 3.85 KB
/
cache_vcpkg.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Cache Vcpkg
on:
push:
branches: ["**"]
paths:
- ".github/workflows/cache_vcpkg.yml"
pull_request:
branches: ["**"]
paths:
- ".github/workflows/cache_vcpkg.yml"
release:
types: [published]
schedule:
# Run at 02:00 UTC every Saturday
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
- cron: "0 2 * * SAT"
env:
VCPKG_ROOT: C:\dartsim\vcpkg
VCPKG_VERSION: "2024.02.14"
jobs:
setup_and_build_base:
runs-on: windows-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install vcpkg
shell: cmd
run: |
git clone -q https://github.com/microsoft/vcpkg.git %VCPKG_ROOT%
cd /d %VCPKG_ROOT%
git checkout %VCPKG_VERSION%
%VCPKG_ROOT%\bootstrap-vcpkg.bat
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: base
path: ${{ env.VCPKG_ROOT }}
build_deps_and_upload:
needs: setup_and_build_base
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
zip-name: ["vcpkg-dartsim-deps-v7.0"]
deps:
[
"assimp ccd eigen3 entt fcl fmt spdlog bullet3 coin-or-ipopt freeglut glfw3 nlopt ode opencl opengl osg pagmo2 pybind11 tinyxml2 urdfdom yaml-cpp",
]
include:
- zip-name: "vcpkg-dartsim-deps-v6.14"
deps: "assimp ccd eigen3 fcl fmt spdlog bullet3 coin-or-ipopt flann freeglut glfw3 nlopt ode opengl osg pagmo2 pybind11 tinyxml2 urdfdom"
# - zip-name: "vcpkg-dartsim-deps-min-v7.0"
# deps: "assimp ccd eigen3 entt fcl fmt spdlog"
# - zip-name: "vcpkg-dartsim-deps-cuda-v7.0"
# deps: "assimp ccd eigen3 entt fcl fmt spdlog bullet3 coin-or-ipopt cuda freeglut glfw3 nlopt ode opencl opengl osg pagmo2 pybind11 tinyxml2 urdfdom yaml-cpp"
# - zip-name: "vcpkg-dartsim-deps-v8.0"
# deps: "eigen3 fmt pkgconf assimp bullet3 ccd coin-or-ipopt fcl glew imgui nlopt ode opencl opengl osg pybind11 spdlog tbb tinyxml2 urdfdom"
# - zip-name: "vcpkg-dartsim-deps-cuda-v8.0"
# deps: "eigen3 fmt pkgconf assimp bullet3 ccd coin-or-ipopt cuda fcl glew imgui nlopt ode opencl opengl osg pybind11 spdlog tbb tinyxml2 urdfdom"
steps:
- name: Download Base Artifacts
uses: actions/download-artifact@v3
with:
name: base
path: ${{ env.VCPKG_ROOT }}
# Install CUDA Toolkit conditionally
- uses: Jimver/[email protected]
if: contains(matrix.deps, 'cuda')
id: cuda-toolkit
with:
cuda: "12.1.0"
# Install DART dependencies
- name: Install vcpkg Packages
env:
VCPKG_PACKAGES: ${{ matrix.deps }}
shell: cmd
run: |
%VCPKG_ROOT%\vcpkg.exe install --recurse --triplet x64-windows %VCPKG_PACKAGES%
# Remove temporary files
# https://learn.microsoft.com/en-us/vcpkg/about/faq#how-can-i-remove-temporary-files
- name: Cleanup vcpkg Temporary Files
shell: cmd
run: |
RMDIR /Q/S %VCPKG_ROOT%\buildtrees
RMDIR /Q/S %VCPKG_ROOT%\packages
RMDIR /Q/S %VCPKG_ROOT%\downloads
- name: Prepare Release File
shell: cmd
run: |
7z a -mx9 ${{ matrix.zip-name }}.zip %VCPKG_ROOT%
@echo off
setlocal
set file="${{ matrix.zip-name }}.zip"
set maxbytesize=2500000000
FOR /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
if %size% GTR %maxbytesize% (
echo File is greater than %maxbytesize% bytes
exit /b 1
)
- name: Upload Vcpkg Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.zip-name }}
path: ./${{ matrix.zip-name }}.zip