From: "plaisthos (Code Review)" Date: Fri, 13 Mar 2026 13:43:14 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <09f8920195dcaeeec2c8adaa54b83fc5cbde84ff-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="XJoauZWsWzk="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: GHA: Cache built crypto libraries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openvpn-devel --XJoauZWsWzk= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable plaisthos has uploaded a new patch set (#2). ( http://gerrit.openvpn.net/c/= openvpn/+/1577?usp=3Demail ) Change subject: GHA: Cache built crypto libraries ...................................................................... GHA: Cache built crypto libraries Change-Id: Ie21fdb01b843a7af09fcd469b08c775eee7e3745 --- M .github/workflows/build.yaml 1 file changed, 45 insertions(+), 8 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/1577/2 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dd8e472..1203d99 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -328,29 +328,41 @@ LDFLAGS: ${{ matrix.ldflags }} CC: ${{matrix.cc}} UBSAN_OPTIONS: print_stacktrace=3D1 + LIBRESSL_VERSION: v4.2.1 steps: - name: Install dependencies run: sudo apt update && sudo apt install -y liblzo2-dev libpam0g-d= ev liblz4-dev linux-libc-dev man2html clang libcmocka-dev python3-docutils = libtool automake autoconf pkg-config libcap-ng-dev libnl-genl-3-dev + - name: Restore libressl from cache + uses: actions/cache@...3010... + id: libressl-cache + with: + path: /opt + key: ${{ matrix.os }}-libressl-${{ env.LIBRESSL_VERSION }} - name: "libressl: checkout" + if: steps.libressl-cache.outputs.cache-hit !=3D 'true' uses: actions/checkout@...2998... # v6.0.2 with: path: libressl # versioning=3Dsemver-coerced repository: libressl/portable - ref: v4.2.1 + ref: ${{ env.LIBRESSL_VERSION }} - name: "libressl: autogen.sh" + if: steps.libressl-cache.outputs.cache-hit !=3D 'true' env: LIBRESSL_GIT_OPTIONS: "--no-single-branch" run: ./autogen.sh working-directory: libressl - name: "libressl: configure" - run: ./configure + if: steps.libressl-cache.outputs.cache-hit !=3D 'true' + run: ./configure --prefix=3D/opt working-directory: libressl - name: "libressl: make all" + if: steps.libressl-cache.outputs.cache-hit !=3D 'true' run: make -j3 working-directory: libressl - name: "libressl: make install" + if: steps.libressl-cache.outputs.cache-hit !=3D 'true' run: sudo make install working-directory: libressl - name: "ldconfig" @@ -360,7 +372,11 @@ - name: autoconf run: autoreconf -fvi - name: configure - run: ./configure --with-crypto-library=3Dopenssl ${{matrix.configu= reflags}} --enable-werror + run: | + OPENSSL_CFLAGS=3D"-I/opt/include" \ + OPENSSL_LIBS=3D"-L/opt/lib -lssl -lcrypto" \ + LDFLAGS=3D"-Wl,-rpath=3D/opt/lib" \ + ./configure --with-crypto-library=3Dopenssl --enable-werror ${{m= atrix.configureflags}} - name: make all run: make -j3 - name: Ensure the build uses LibreSSL @@ -396,27 +412,39 @@ LDFLAGS: ${{ matrix.ldflags }} CC: ${{matrix.cc}} UBSAN_OPTIONS: print_stacktrace=3D1 + PKG_CONFIG_PATH: /opt/lib/pkgconfig + MBEDTLS_VERSION: 4.0.0 steps: - name: Install dependencies run: sudo apt update && sudo apt install -y liblzo2-dev libpam0g-d= ev liblz4-dev linux-libc-dev man2html clang libcmocka-dev python3-docutils = python3-jinja2 python3-jsonschema libtool automake autoconf pkg-config libc= ap-ng-dev libnl-genl-3-dev + - name: Restore mbed TLS from cache + uses: actions/cache@...3010... + id: mbedtls-cache + with: + path: /opt/ + key: ${{ matrix.os }}-mbedtls-${{ env.MBEDTLS_VERSION }} - name: "mbedtls: checkout" + if: steps.mbedtls-cache.outputs.cache-hit !=3D 'true' uses: actions/checkout@...2998... # v6.0.2 with: path: mbedtls submodules: recursive # versioning=3Dsemver-coerced repository: Mbed-TLS/mbedtls - ref: v4.0.0 + ref: v${{ env.MBEDTLS_VERSION }} - uses: lukka/get-cmake@...2999... # v4.2.3 - name: "mbedtls: cmake" - run: cmake -B build + if: steps.mbedtls-cache.outputs.cache-hit !=3D 'true' + run: cmake -B build -DCMAKE_INSTALL_PREFIX=3D/opt working-directory: mbedtls - name: "mbedtls: cmake --build" + if: steps.mbedtls-cache.outputs.cache-hit !=3D 'true' run: cmake --build build working-directory: mbedtls - name: "mbedtls: cmake --install" - run: sudo cmake --install build --prefix /usr + if: steps.mbedtls-cache.outputs.cache-hit !=3D 'true' + run: sudo cmake --install build working-directory: mbedtls - name: Checkout OpenVPN uses: actions/checkout@...2998... # v6.0.2 @@ -426,7 +454,7 @@ run: ./configure --with-crypto-library=3Dmbedtls --enable-werror - name: make all run: make -j3 - - name: Ensure the build uses mbed TLS 4.x + - name: Ensure the build uses mbed TLS ${{ env.MBEDTLS_VERSION }} run: | ./src/openvpn/openvpn --version ./src/openvpn/openvpn --version | grep -q "library versions: mbe= d TLS 4." @@ -463,19 +491,28 @@ CXX: ${{matrix.cxx}} UBSAN_OPTIONS: print_stacktrace=3D1 AWS_LC_INSTALL: /opt/aws-lc + AWS_LC_VERSION: v1.70.0 steps: - name: Install dependencies run: sudo apt update && sudo apt install -y gcc golang make liblzo= 2-dev libpam0g-dev liblz4-dev linux-libc-dev man2html clang libcmocka-dev p= ython3-docutils python3-jinja2 python3-jsonschema libtool automake autoconf= pkg-config libcap-ng-dev libnl-genl-3-dev + - name: Restore AWS-LC from cache + uses: actions/cache@...3010... + id: aws-lc-cache + with: + path: ${{ env.AWS_LC_INSTALL }} + key: ${{ matrix.os }}-aws-lc-${{ env.AWS_LC_VERSION }} - name: "AWS-LC: checkout" + if: steps.aws-lc-cache.outputs.cache-hit !=3D 'true' uses: actions/checkout@...2998... # v6.0.2 with: path: aws-lc # versioning=3Dsemver-coerced repository: aws/aws-lc - ref: v1.70.0 + ref: ${{ env.AWS_LC_VERSION }} - uses: lukka/get-cmake@...2999... # v4.2.3 - name: "AWS-LC: build" + if: steps.aws-lc-cache.outputs.cache-hit !=3D 'true' run: | mkdir build cd build -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1577?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie21fdb01b843a7af09fcd469b08c775eee7e3745 Gerrit-Change-Number: 1577 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-CC: openvpn-devel --XJoauZWsWzk= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

plaisthos uploaded patch set #2 to this change.

View Change

GHA: Cache built crypto libraries

Change-Id: Ie21fdb01b843a7af09= fcd469b08c775eee7e3745
---
M .github/workflows/build.yaml
1 file c= hanged, 45 insertions(+), 8 deletions(-)

git pul=
l ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/1577/2
dif=
f --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index dd8e472..1203d99 100644
--- a/.github/work= flows/build.yaml
+++ b/.github/workflows/build.yaml<= br>@@ -328,29 +328,41 @@
LDFLAGS: ${{ matrix.l= dflags }}
CC: ${{matrix.cc}}
= UBSAN_OPTIONS: print_stacktrace=3D1
+ LIBRESSL_VERSION: v4.2.1

= steps:
- name: Install dependencies
run: sudo apt update && sudo apt install -y lib= lzo2-dev libpam0g-dev liblz4-dev linux-libc-dev man2html clang libcmocka-de= v python3-docutils libtool automake autoconf pkg-config libcap-ng-dev libnl= -genl-3-dev
+ - = name: Restore libressl from cache
+ uses: actions/cache@...3010...
+ id: libressl-cache
+ with:

+ path: /opt
+ key: ${{ matrix.os }}-libress= l-${{ env.LIBRESSL_VERSION }}
- name: "libressl= : checkout"
+ = if: steps.libressl-cache.outputs.cache-hit !=3D 'true'<= br> uses: actions/checkout@...2998... # v6.0.2
with:

path: libressl
= # versioning=3Dsemver-coerced
reposit= ory: libressl/portable
= - ref: v4.2.1
+ if: steps.libressl-cache.outputs.cache-hit !=3D '= ;true'
env:
LIBRESS= L_GIT_OPTIONS: "--no-single-branch"
run:= ./autogen.sh
working-directory: libressl - name: "libressl: configure"
- run: ./configure
+ if: steps.libressl-cache.outp= uts.cache-hit !=3D 'true'
+ run: ./configure --prefix=3D/opt
= working-directory: libressl
- name: "libre= ssl: make all"
+= if: steps.libressl-cache.outputs.cache-hit !=3D 'true'
run: make -j3
working-directo= ry: libressl
- name: "libressl: make install&qu= ot;
+ if: step= s.libressl-cache.outputs.cache-hit !=3D 'true'
= run: sudo make install
working-directory: lib= ressl
- name: "ldconfig"
@= @ -360,7 +372,11 @@
- name: autoconf
run: autoreconf -fvi

- name: configure
- run: ./configure = --with-crypto-library=3Dopenssl ${{matrix.configureflags}} --enable-werror<= /span>
+ run: |
+ OPENSSL_CFLAGS= =3D"-I/opt/include" \
+ OPENSSL_LIBS=3D"-L/opt/lib -lssl -lcrypto" = \
+ LDFLAGS= =3D"-Wl,-rpath=3D/opt/lib" \
+ ./configure --with-crypto-library=3Dopenssl --= enable-werror ${{matrix.configureflags}}
- name: mak= e all
run: make -j3
- name:= Ensure the build uses LibreSSL
@@ -396,27 +412,39 @@
LDFLAGS: ${{ matrix.ldflags }}
CC:= ${{matrix.cc}}
UBSAN_OPTIONS: print_stacktrace=3D1<= /span>
+ PKG_CONFIG_PAT= H: /opt/lib/pkgconfig
+ MBEDTLS_VERSION: 4.0.0

steps= :
- name: Install dependencies
= run: sudo apt update && sudo apt install -y liblzo2-dev libpam0= g-dev liblz4-dev linux-libc-dev man2html clang libcmocka-dev python3-docuti= ls python3-jinja2 python3-jsonschema libtool automake autoconf pkg-config l= ibcap-ng-dev libnl-genl-3-dev
+ - name: Restore mbed TLS from cache
+ uses: actions/cache@...3010...
+ id: mbedtls-ca= che
+ with:
+ path: /opt/<= /span>
+ key: ${{ m= atrix.os }}-mbedtls-${{ env.MBEDTLS_VERSION }}
- nam= e: "mbedtls: checkout"
+ if: steps.mbedtls-cache.outputs.cache-hit !=3D 'tr= ue'
uses: actions/checkout@...2998... # v6.0.2=
with:
path: mbedtls
submodules: recursive
#= versioning=3Dsemver-coerced
repository: Mbed-TL= S/mbedtls
- re= f: v4.0.0
+ = ref: v${{ env.MBEDTLS_VERSION }}
- uses: lukka/get-c= make@...2999... # v4.2.3
- name: "mbedtls: cmak= e"
- run: c= make -B build
+ = if: steps.mbedtls-cache.outputs.cache-hit !=3D 'true'
<= span style=3D"color: hsl(120, 100%, 40%);">+ run: cmake -B build -DC= MAKE_INSTALL_PREFIX=3D/opt

working-directory: mbed= tls
- name: "mbedtls: cmake --build"
+ if: steps.mbedtls= -cache.outputs.cache-hit !=3D 'true'
run: = cmake --build build
working-directory: mbedtls
- name: "mbedtls: cmake --install"
= - run: sudo cmake --instal= l build --prefix /usr
+ if: steps.mbedtls-cache.outputs.cache-hit !=3D 'true'
+ run: sudo cmake= --install build
working-directory: mbedtls=
- name: Checkout OpenVPN
uses: ac= tions/checkout@...2998... # v6.0.2
@@ -426,7 +454,7 @@
run: ./configure --with-crypto-library=3Dmbedtls --ena= ble-werror
- name: make all
= run: make -j3
- -= name: Ensure the build uses mbed TLS 4.x
+ - name: Ensure the build uses mbed TLS ${{ env.= MBEDTLS_VERSION }}
run: |
= ./src/openvpn/openvpn --version
./src/openvpn= /openvpn --version | grep -q "library versions: mbed TLS 4."
@@ -463,19 +491,28 @@
CXX: ${{matrix.cxx= }}
UBSAN_OPTIONS: print_stacktrace=3D1
AWS_LC_INSTALL: /opt/aws-lc

+ AWS_LC_VERSION: v1.70.0
steps:
- name: Install dependencies
run: sudo apt update && sudo apt install -y gc= c golang make liblzo2-dev libpam0g-dev liblz4-dev linux-libc-dev man2html c= lang libcmocka-dev python3-docutils python3-jinja2 python3-jsonschema libto= ol automake autoconf pkg-config libcap-ng-dev libnl-genl-3-dev
+ - name: Restore AWS-LC fro= m cache

+ uses= : actions/cache@...3010...
+ id: aws-lc-cache
+ with:
+ path: ${{ env.AWS_LC_INSTALL }}
+ key: ${{ matrix.os }}-aws-lc-${{ env.= AWS_LC_VERSION }}
- name: "AWS-LC: checkout&quo= t;
+ if: steps= .aws-lc-cache.outputs.cache-hit !=3D 'true'
= uses: actions/checkout@...2998... # v6.0.2
with:=
path: aws-lc
# versi= oning=3Dsemver-coerced
repository: aws/aws-lc
- ref: v1.70.0
+ ref: ${{ en= v.AWS_LC_VERSION }}
- uses: lukka/get-cmake@...3011...= .. # v4.2.3
- name: "AWS-LC: build"=
+ if: steps.aws-lc-c= ache.outputs.cache-hit !=3D 'true'
run: |<= /span>
mkdir build
cd build<= /span>

To view, visit change 1577. To unsubscribe,= or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie21fdb01b843a7af09fcd469b08= c775eee7e3745
Gerrit-Change-Number: 1577
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --XJoauZWsWzk=--