Skip to content

Bump actions/download-artifact from 3 to 4 #25

Bump actions/download-artifact from 3 to 4

Bump actions/download-artifact from 3 to 4 #25

Workflow file for this run

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@v4
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@v4
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@v4
with:
name: ${{ matrix.zip-name }}
path: ./${{ matrix.zip-name }}.zip