From 47a9deb94b2530a037c61ade30d3174a1a7ebedd Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 15 Aug 2020 20:24:38 -0500 Subject: [PATCH] [nostalgia] Add support for a persistent external vcpkg dir --- Makefile | 16 +++++++++++++--- jenkins/gba/Jenkinsfile | 1 + jenkins/linux/Jenkinsfile | 3 +++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aad16e6f..e89c2b65 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,11 @@ OS=$(shell uname | tr [:upper:] [:lower:]) HOST_ENV=${OS}-$(shell uname -m) DEVENV=devenv$(shell pwd | sed 's/\//-/g') DEVENV_IMAGE=nostalgia-devenv -VCPKG_DIR=./.vcpkg-$(HOST_ENV)/ +ifndef VCPKG_DIR_BASE + VCPKG_DIR_BASE=.vcpkg +endif +VCPKG_VERSION=2020.06 +VCPKG_DIR=$(VCPKG_DIR_BASE)/$(VCPKG_VERSION)-$(HOST_ENV) CURRENT_BUILD=$(HOST_ENV)-$(file < .current_build) ifneq ($(shell which docker 2> /dev/null),) ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running) @@ -86,10 +90,16 @@ devenv-shell: ${ENV_RUN} bash .PHONY: vcpkg -vcpkg: +vcpkg: ${VCPKG_DIR} vcpkg-install + +${VCPKG_DIR}: ${RM_RF} ${VCPKG_DIR} - git clone https://github.com/microsoft/vcpkg ${VCPKG_DIR} + mkdir -p ${VCPKG_DIR_BASE} + git clone -b release --depth 1 --branch ${VCPKG_VERSION} https://github.com/microsoft/vcpkg.git ${VCPKG_DIR} ${VCPKG_DIR}/bootstrap-vcpkg.sh + +.PHONY: vcpkg-install +vcpkg-install: ${VCPKG_DIR}/vcpkg install sdl2 jsoncpp .PHONY: configure-release diff --git a/jenkins/gba/Jenkinsfile b/jenkins/gba/Jenkinsfile index 0f178b39..2118e188 100644 --- a/jenkins/gba/Jenkinsfile +++ b/jenkins/gba/Jenkinsfile @@ -5,6 +5,7 @@ pipeline { environment { DEVKITPRO = '/opt/devkitpro' DEVKITARM = '/opt/devkitpro/devkitARM' + VCPKG_DIR_BASE = '/var/lib/vcpkg/nostalgia/' } stages { stage('Environment') { diff --git a/jenkins/linux/Jenkinsfile b/jenkins/linux/Jenkinsfile index 614210b5..6b1770f4 100644 --- a/jenkins/linux/Jenkinsfile +++ b/jenkins/linux/Jenkinsfile @@ -2,6 +2,9 @@ pipeline { agent { label 'linux-x86_64' } + environment { + VCPKG_DIR_BASE = '/var/lib/vcpkg/nostalgia/' + } stages { stage('Environment') { steps {