From: "flichtenheld (Code Review)" Date: Tue, 28 Apr 2026 15:35:19 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="Xn2F3anYaKI="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: GHA: Add caching for vcpkg builds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --Xn2F3anYaKI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1642?usp=3Demail to review the following change. Change subject: GHA: Add caching for vcpkg builds ...................................................................... GHA: Add caching for vcpkg builds The nice automatic caching was removed last year, so go back to manual caching of the binary cache dir. While here, also update vcpkg to latest master. Change-Id: I933227aa4bc4f05b58d0e754b4330da807504d01 Signed-off-by: Frank Lichtenheld --- M .github/workflows/build.yaml M renovate.json 2 files changed, 40 insertions(+), 8 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/1642/1 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 895f469..b530fcc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,14 +42,23 @@ VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }} VCPKG_ROOT: ${{ github.workspace }}/vcpkg VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg/installed + VCPKG_BINARY_SOURCES: clear;default,readwrite + VCPKG_GIT_COMMIT_ID: 031f4afe03be385aee354f15be6e6b1fe57497c7 steps: - name: Checkout OpenVPN uses: actions/checkout@...2998... # v6.0.2 - uses: lukka/get-cmake@...3028... # v4.3.2 - - name: Install vcpkg + - name: Setup vcpkg uses: lukka/run-vcpkg@...3029... # v11.6 with: - vcpkgGitCommitId: e5a1490e1409d175932ef6014519e9ae149ddb7c + vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} + - name: Set up vcpkg binary cache + uses: actions/cache@...3024... # v5.0.5 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: android-${{ matrix.abi }}-vcpkg-binary-cache-${{ env.VCPKG_= GIT_COMMIT_ID }} + restore-keys: | + android-${{ matrix.abi }}-vcpkg-binary-cache- - name: Install dependencies run: ${VCPKG_ROOT}/vcpkg install openssl lz4 cmocka - name: configure OpenVPN with cmake @@ -70,10 +79,12 @@ arch: [x86, x64] build: [Release, Debug] - name: "gcc-mingw - ${{ matrix.arch }} - ${{matrix.build }} - OSSL" + name: "gcc-mingw - ${{ matrix.arch }} - ${{ matrix.build }} - OSSL" runs-on: ubuntu-24.04 env: VCPKG_ROOT: ${{ github.workspace }}/vcpkg + VCPKG_BINARY_SOURCES: clear;default,readwrite + VCPKG_GIT_COMMIT_ID: 031f4afe03be385aee354f15be6e6b1fe57497c7 steps: - name: Install dependencies run: sudo apt update && sudo apt install -y mingw-w64 unzip build-= essential wget python3-docutils man2html-base @@ -81,12 +92,21 @@ uses: actions/checkout@...2998... # v6.0.2 - uses: lukka/get-cmake@...3028... # v4.3.2 - - name: Restore from cache and install vcpkg + - name: Setup vcpkg uses: lukka/run-vcpkg@...3029... # v11.6 with: - vcpkgGitCommitId: e5a1490e1409d175932ef6014519e9ae149ddb7c + vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} vcpkgJsonGlob: '**/mingw/vcpkg.json' + - name: Set up vcpkg binary cache + uses: actions/cache@...3024... # v5.0.5 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: mingw-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('= **/mingw/vcpkg.json') }}-${{ env.VCPKG_GIT_COMMIT_ID }} + restore-keys: | + mingw-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/= mingw/vcpkg.json') }}- + mingw-${{ matrix.arch }}-vcpkg-binary-cache- + - name: Run CMake with vcpkg.json manifest uses: lukka/run-cmake@...3030... # v10.9 with: @@ -262,6 +282,8 @@ name: "msbuild - ${{ matrix.arch }} - openssl" env: BUILD_CONFIGURATION: Release + VCPKG_BINARY_SOURCES: clear;default,readwrite + VCPKG_GIT_COMMIT_ID: 031f4afe03be385aee354f15be6e6b1fe57497c7 runs-on: windows-2025 steps: @@ -271,12 +293,22 @@ - name: Install rst2html run: python -m pip install --upgrade pip docutils - - name: Restore artifacts, or setup vcpkg (do not install any packag= e) + - name: Setup vcpkg (do not install any package) uses: lukka/run-vcpkg@...3029... # v11.6 with: - vcpkgGitCommitId: e5a1490e1409d175932ef6014519e9ae149ddb7c + vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }} vcpkgJsonGlob: '**/windows/vcpkg.json' + - name: Set up vcpkg binary cache + uses: actions/cache@...3024... # v5.0.5 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: msvc-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('*= */windows/vcpkg.json') }}-${{ env.VCPKG_GIT_COMMIT_ID }} + restore-keys: | + msvc-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/w= indows/vcpkg.json') }}- + msvc-${{ matrix.arch }}-vcpkg-binary-cache- + + - name: Run CMake with vcpkg.json manifest (NO TESTS) uses: lukka/run-cmake@...3030... # v10.9 if: ${{ matrix.arch =3D=3D 'arm64' }} diff --git a/renovate.json b/renovate.json index 809ac3f..3bd0917 100644 --- a/renovate.json +++ b/renovate.json @@ -27,7 +27,7 @@ "/^\\.github/workflows/.+\\.ya?ml$/" ], "matchStrings": [ - "vcpkgGitCommitId:\\s*(?.*?)\\n" + "VCPKG_GIT_COMMIT_ID:\\s*(?.*?)\\n" ], "currentValueTemplate": "master", "depNameTemplate": "vcpkg", -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1642?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I933227aa4bc4f05b58d0e754b4330da807504d01 Gerrit-Change-Number: 1642 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --Xn2F3anYaKI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

GHA: Add caching for vcpkg builds

Th= e nice automatic caching was removed last year,
so go back to manual cac= hing of the binary cache
dir.

While here, also update vcpkg to la= test master.

Change-Id: I933227aa4bc4f05b58d0e754b4330da807504d01Signed-off-by: Frank Lichtenheld <frank@...2641...>
---
M .git= hub/workflows/build.yaml
M renovate.json
2 files changed, 40 insertio= ns(+), 8 deletions(-)

git pull ssh://gerrit.open=
vpn.net:29418/openvpn refs/changes/42/1642/1
diff --git a/.github/w=
orkflows/build.yaml b/.github/workflows/build.yaml
index 89= 5f469..b530fcc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -42,14 = +42,23 @@
VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_tr= iplet }}
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg/in= stalled
+ VCPKG_= BINARY_SOURCES: clear;default,readwrite
+ VCPKG_GIT_COMMIT_ID: 031f4afe03be385aee354f15be6e= 6b1fe57497c7
steps:
- name: Che= ckout OpenVPN
uses: actions/checkout@...2998... # = v6.0.2
- uses: lukka/get-cmake@...3028... # v4.3.2
- - name: Install v= cpkg
+ - name: S= etup vcpkg
uses: lukka/run-vcpkg@...3029... # v11.= 6
with:
- vcpkgGitCommitId: e5a1490e1409d175932ef6014519e9ae149d= db7c
+ vcpkg= GitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}
+ - name: Set up vcpkg binary cache
<= span style=3D"color: hsl(120, 100%, 40%);">+ uses: actions/cache@...493...= 3024... # v5.0.5

+ = with:
+ = path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
+ key: android-${{ matrix.abi }}-vcpkg-bin= ary-cache-${{ env.VCPKG_GIT_COMMIT_ID }}
+ restore-keys: |
+ android-${{ matrix.abi }}-vcpkg-bina= ry-cache-
- name: Install dependencies
run: ${VCPKG_ROOT}/vcpkg install openssl lz4 cmocka

<= span> - name: configure OpenVPN with cmake

@@ -70,10 = +79,12 @@
arch: [x86, x64]
= build: [Release, Debug]

- name: "gcc-mingw - ${{ matrix.arch }} - ${{m= atrix.build }} - OSSL"
+ name: "gcc-mingw - ${{ matrix.arch }} - ${{ matrix.build }= } - OSSL"
runs-on: ubuntu-24.04
= env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
+ VCPKG_BINARY_SO= URCES: clear;default,readwrite
+ VCPKG_GIT_COMMIT_ID: 031f4afe03be385aee354f15be6e6b1fe5749= 7c7
steps:
- name: Install depe= ndencies
run: sudo apt update && sudo apt = install -y mingw-w64 unzip build-essential wget python3-docutils man2html-b= ase
@@ -81,12 +92,21 @@
uses: acti= ons/checkout@...2998... # v6.0.2

-= uses: lukka/get-cmake@...3028... # v4.3.2
- - name: Restore from cache and install vcpkg
+ - name: Setup vcp= kg
uses: lukka/run-vcpkg@...3029... # v11.6=
with:
+ vcpkgGitCommi= tId: ${{ env.VCPKG_GIT_COMMIT_ID }}
vcpkgJsonGlo= b: '**/mingw/vcpkg.json'

+ - name: Set up vcpkg binary cache
+ uses: actions/ca= che@...3024... # v5.0.5
+ with:
+ = path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
+ key: mingw-${{ matrix.arch }}-v= cpkg-binary-cache-${{ hashFiles('**/mingw/vcpkg.json') }}-${{ env.V= CPKG_GIT_COMMIT_ID }}
+ restore-keys: |
+ mingw-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFil= es('**/mingw/vcpkg.json') }}-
+ mingw-${{ matrix.arch }}-vcpkg-binary-cache-<= /span>
+
= - name: Run CMake with vcpkg.json manifest
use= s: lukka/run-cmake@...3030... # v10.9
with:=
@@ -262,6 +282,8 @@
name: "msbuild - = ${{ matrix.arch }} - openssl"
env:
BUILD_CONFIGURATION: Release

+ VCPKG_BINARY_SOURCES: clear;default,readwrite=
+ VCPKG_GIT_C= OMMIT_ID: 031f4afe03be385aee354f15be6e6b1fe57497c7
=
runs-on: windows-2025
steps:=
@@ -271,12 +293,22 @@
- name: Install rst2= html
run: python -m pip install --upgrade pip docu= tils

= - - name: Restore artifacts, or setup vcpkg (do not install any packag= e)
+ - name: Set= up vcpkg (do not install any package)
uses: lukka/= run-vcpkg@...3029... # v11.6
with:
- vcpkgGitCommitId: e5a1490e1= 409d175932ef6014519e9ae149ddb7c

+ vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}
vcpkgJsonGlob: '**/windows/vcpkg.json'

+ -= name: Set up vcpkg binary cache
+ uses: actions/cache@...3024... # v5.0.5
+ with:

+ path: ${{ env.VCPKG_DEFAULT_BI= NARY_CACHE }}
+ = key: msvc-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/w= indows/vcpkg.json') }}-${{ env.VCPKG_GIT_COMMIT_ID }}
+ restore-keys: |
<= span style=3D"color: hsl(120, 100%, 40%);">+ msvc-${{ matrix.arc= h }}-vcpkg-binary-cache-${{ hashFiles('**/windows/vcpkg.json') }}-<= /span>
+ msvc-${{= matrix.arch }}-vcpkg-binary-cache-
+
+
- name: Run CMake with vcpkg.json manifest (NO TESTS)<= /span>
uses: lukka/run-cmake@...3030... # v10.9 if: ${{ matrix.arch =3D=3D 'arm64' }}
diff --git a/renovate.json b/renovate.json

index 809ac3f= ..3bd0917 100644
--- a/renovate.json
+++ b/= renovate.json
@@ -27,7 +27,7 @@
= "/^\\.github/workflows/.+\\.ya?ml$/"
= ],
"matchStrings": [- "vcpkgGit= CommitId:\\s*(?<currentDigest>.*?)\\n"
+ "VCPKG_GIT_COMMIT_ID:\\s= *(?<currentDigest>.*?)\\n"
],
"currentValueTemplate": "master"= ;,
"depNameTemplate": "vcpkg&qu= ot;,

To view, visit change 1642. To unsubsc= ribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I933227aa4bc4f05b58d0e754b43= 30da807504d01
Gerrit-Change-Number: 1642
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --Xn2F3anYaKI=--