Skip to content

Commit e6582d2

Browse files
committed
only cache binary sources, not installed/downloads, to minimize cache size
1 parent efe58f4 commit e6582d2

File tree

7 files changed

+8
-34
lines changed

7 files changed

+8
-34
lines changed

.github/actions/openziti-tunnel-build-action/gh-release/entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ do
5050
git config --global --add safe.directory ${SAFE}
5151
done
5252

53-
for CACHE in \
54-
/github/workspace/vcpkg_cache/{archives,downloads,installed}
55-
do
56-
mkdir -p ${CACHE}
57-
done
53+
mkdir -p /github/workspace/vcpkg_cache
5854

5955
(
6056
cd "${VCPKG_ROOT}"

.github/actions/openziti-tunnel-build-action/redhat-8/entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ do
3838
git config --global --add safe.directory ${SAFE}
3939
done
4040

41-
for CACHE in \
42-
/github/workspace/vcpkg_cache/{archives,downloads,installed}
43-
do
44-
mkdir -p ${CACHE}
45-
done
41+
mkdir -p /github/workspace/vcpkg_cache
4642

4743
(
4844
cd "${VCPKG_ROOT}"

.github/actions/openziti-tunnel-build-action/redhat-9/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSIO
4343
ENV GIT_CONFIG_GLOBAL="/tmp/ziti-builder-gitconfig"
4444

4545
ENV VCPKG_ROOT=/usr/local/vcpkg
46-
ENV VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache/archives,readwrite"
47-
ENV VCPKG_DOWNLOADS=/github/workspace/vcpkg_cache/downloads
48-
ENV VCPKG_INSTALLED_DIR=/github/workspace/vcpkg_cache/installed
46+
ENV VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache,readwrite"
4947

5048
# this must be set on arm. see https://learn.microsoft.com/en-us/vcpkg/users/config-environment#vcpkg_force_system_binaries
5149
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes

.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ do
3838
git config --global --add safe.directory ${SAFE}
3939
done
4040

41-
for CACHE in \
42-
/github/workspace/vcpkg_cache/{archives,downloads,installed}
43-
do
44-
mkdir -p ${CACHE}
45-
done
41+
mkdir -p /github/workspace/vcpkg_cache
4642

4743
(
4844
cd "${VCPKG_ROOT}"

.github/actions/openziti-tunnel-build-action/ubuntu-20.04/entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ do
4141
git config --global --add safe.directory ${SAFE}
4242
done
4343

44-
for CACHE in \
45-
/github/workspace/vcpkg_cache/{archives,downloads,installed}
46-
do
47-
mkdir -p ${CACHE}
48-
done
44+
mkdir -p /github/workspace/vcpkg_cache
4945

5046
(
5147
cd "${VCPKG_ROOT}"

.github/actions/openziti-tunnel-build-action/ubuntu-22.04/entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ do
4141
git config --global --add safe.directory ${SAFE}
4242
done
4343

44-
for CACHE in \
45-
/github/workspace/vcpkg_cache/{archives,downloads,installed}
46-
do
47-
mkdir -p ${CACHE}
48-
done
44+
mkdir -p /github/workspace/vcpkg_cache
4945

5046
(
5147
cd "${VCPKG_ROOT}"

.github/workflows/cpack.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ jobs:
5858
env:
5959
ZITI_DEB_TEST_REPO: ${{ vars.ZITI_DEB_TEST_REPO || 'zitipax-openziti-deb-test' }}
6060
ZITI_RPM_TEST_REPO: ${{ vars.ZITI_RPM_TEST_REPO || 'zitipax-openziti-rpm-test' }}
61-
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache/archives,readwrite
62-
VCPKG_DOWNLOADS: ${{ github.workspace }}/vcpkg_cache/downloads
63-
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_cache/installed
61+
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
6462
steps:
6563
- name: Print Environment Variables and Event JSON
6664
uses: hmarr/debug-action@v3
@@ -128,9 +126,7 @@ jobs:
128126
uses: ./.github/actions/openziti-tunnel-build-action
129127
env:
130128
# map vcpkg cache in the CPack Docker Action container to the mounted directory used by the rest of the workflow
131-
VCPKG_BINARY_SOURCES: clear;files,/github/workspace/vcpkg_cache/archives,readwrite
132-
VCPKG_DOWNLOADS: /github/workspace/vcpkg_cache/downloads
133-
VCPKG_INSTALLED_DIR: /github/workspace/vcpkg_cache/installed
129+
VCPKG_BINARY_SOURCES: clear;files,/github/workspace/vcpkg_cache,readwrite
134130
with:
135131
arch: ${{ matrix.arch.cmake }}
136132
config: RelWithDebInfo

0 commit comments

Comments
 (0)