Skip to content

Commit fa9ddda

Browse files
committed
Merge remote-tracking branch 'origin/master' into dev-1.2
2 parents b712458 + c9725c2 commit fa9ddda

57 files changed

Lines changed: 1416 additions & 2112 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-console.yml

Lines changed: 72 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@ on:
1212
description: 'Git ref (SHA or branch) to build from. If omitted, uses the default checkout.'
1313
required: false
1414
type: string
15+
version:
16+
description: 'Version override. If omitted, the build resolves it via git describe.'
17+
required: false
18+
type: string
1519
workflow_call:
1620
inputs:
1721
ref:
1822
description: 'Git ref (SHA or branch) to build from. If omitted, uses the default checkout.'
1923
required: false
2024
type: string
25+
version:
26+
description: 'Version override. If omitted, the build resolves it via git describe.'
27+
required: false
28+
type: string
2129

2230
jobs:
2331
# =============================================================================
@@ -39,7 +47,8 @@ jobs:
3947
- ephemeral-limit-memory-8192
4048
- ephemeral-limit-cpu-6
4149
container:
42-
image: adguard/core-libs:2.11
50+
# 2.12 is the first image with zig, which the musl-cross-* presets use.
51+
image: adguard/core-libs:2.12
4352
permissions:
4453
contents: read
4554
id-token: write
@@ -62,13 +71,28 @@ jobs:
6271
secret/data/ci-secrets/gpg-signing gpgPassword | GPG_PASSWORD
6372
6473
- name: Configure Conan
74+
shell: bash
6575
run: |
76+
# The image's bundled Conan is too old to know about newer compiler
77+
# versions (e.g. the zig wrapper now reports as Clang 22), so install
78+
# an upgraded Conan into a venv. It reuses the image's Conan cache.
79+
python3 -m venv venv
80+
source ./venv/bin/activate
81+
pip install conan
6682
conan remote add --index 0 art ${{ vars.CONAN_REPO_URL }} || true
6783
84+
# The build resolves the version via git describe. A manual `version`
85+
# input forces an override (version.cmake reads the TT_CLIENT_VERSION env
86+
# var), which also drives the artifact name below.
6887
- name: Detect version
6988
id: version
7089
run: |
71-
VERSION=$(git describe --tags --match 'v*' | sed -e 's/^v//')
90+
if [ -n "${{ inputs.version }}" ]; then
91+
VERSION="${{ inputs.version }}"
92+
echo "TT_CLIENT_VERSION=${VERSION}" >> "$GITHUB_ENV"
93+
else
94+
VERSION=$(git describe --tags --match 'v*' | sed -e 's/^v//')
95+
fi
7296
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
7397
7498
- name: Import GPG key
@@ -79,41 +103,26 @@ jobs:
79103
env:
80104
GPG_KEY: devteam@adguard.com
81105
VERSION: ${{ steps.version.outputs.version }}
106+
# The image already provides the Conan dependencies.
107+
SKIP_BOOTSTRAP: 1
82108
shell: bash
83109
run: |
84110
set -x -e
111+
source ./venv/bin/activate
85112
86113
mkdir -p artifacts
87114
ARTIFACTS_DIR=${PWD}/artifacts
88115
89116
rustup +nightly component add rust-src
90117
118+
# One musl-cross-<arch> preset per architecture; see CMakePresets.json.
91119
ARCHES="x86_64 aarch64 armv7 mips mipsel"
92120
for ARCH in $ARCHES; do
93-
EABI=
94-
SF=
95-
case ${ARCH} in
96-
armv7) EABI=eabi ;;
97-
mips) SF=sf ;;
98-
mipsel) SF=sf ;;
99-
esac
100-
101-
# Rust adds -lunwind when statically linking; create symlink
102-
p="$(${ARCH}-linux-musl${EABI}${SF}-gcc -print-file-name=libgcc_eh.a)" && \
103-
[ "$p" != "libgcc_eh.a" ] && ln -sf "$(basename "$p")" "$(dirname "$p")/libunwind.a"
104-
105-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja \
106-
-DCMAKE_C_COMPILER=${ARCH}-linux-musl${EABI}${SF}-gcc \
107-
-DCMAKE_CXX_COMPILER=${ARCH}-linux-musl${EABI}${SF}-g++ \
108-
-DCMAKE_SYSTEM_PROCESSOR=${ARCH} \
109-
-DCMAKE_SYSTEM_NAME=Linux \
110-
-DCMAKE_CROSSCOMPILING=ON \
111-
-S . -B build_${ARCH}
112-
cmake --build build_${ARCH} --target trusttunnel_client
113-
cmake --build build_${ARCH} --target setup_wizard
121+
BUILD_DIR=cmake-build-musl-cross-${ARCH}-relwithdebinfo
122+
make PRESET=musl-cross-${ARCH}-relwithdebinfo all
114123
115124
NAME=trusttunnel_client-v${VERSION}-linux-${ARCH}
116-
pushd build_${ARCH}/trusttunnel
125+
pushd ${BUILD_DIR}/trusttunnel
117126
llvm-strip trusttunnel_client
118127
llvm-strip setup_wizard
119128
gpg --default-key "${GPG_KEY}" --detach-sig \
@@ -141,8 +150,10 @@ jobs:
141150
env:
142151
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
143152
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
153+
shell: bash
144154
run: |
145155
set -x
156+
source ./venv/bin/activate
146157
conan remote login art "$ARTIFACTORY_USER" --password "$ARTIFACTORY_API_KEY" || true
147158
conan upload -r art -c "*" 2>&1 | grep --line-buffered "Uploading" || true
148159
@@ -182,10 +193,18 @@ jobs:
182193
pip install conan
183194
conan remote add --index 0 art ${{ vars.CONAN_REPO_URL }} || true
184195
196+
# The build resolves the version via git describe. A manual `version`
197+
# input forces an override (version.cmake reads the TT_CLIENT_VERSION env
198+
# var), which also drives the artifact name below.
185199
- name: Detect version
186200
id: version
187201
run: |
188-
VERSION=$(git describe --tags --match 'v*' | sed -e 's/^v//')
202+
if [ -n "${{ inputs.version }}" ]; then
203+
VERSION="${{ inputs.version }}"
204+
echo "TT_CLIENT_VERSION=${VERSION}" >> "$GITHUB_ENV"
205+
else
206+
VERSION=$(git describe --tags --match 'v*' | sed -e 's/^v//')
207+
fi
189208
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
190209
191210
- name: Import GPG key
@@ -205,21 +224,20 @@ jobs:
205224
- name: Build universal binary
206225
env:
207226
VERSION: ${{ steps.version.outputs.version }}
227+
# The runner image already provides the Conan dependencies.
228+
SKIP_BOOTSTRAP: 1
208229
run: |
209230
set -x -e
210231
source ./venv/bin/activate
211232
233+
# Both slices use the clang-relwithdebinfo preset, so each one gets its
234+
# own BUILD_DIR instead of the preset's default directory.
212235
ARCHES="x86_64 arm64"
213236
for ARCH in $ARCHES; do
214-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja \
215-
-DCMAKE_C_COMPILER=clang \
216-
-DCMAKE_CXX_COMPILER=clang++ \
217-
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
218-
-DCMAKE_OSX_ARCHITECTURES=${ARCH} \
219-
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
220-
-S . -B build_${ARCH}
221-
cmake --build build_${ARCH} --target trusttunnel_client
222-
cmake --build build_${ARCH} --target setup_wizard
237+
make PRESET=clang-relwithdebinfo \
238+
ARCH=${ARCH} \
239+
BUILD_DIR=build_${ARCH} \
240+
all
223241
done
224242
225243
mkdir -p build_universal
@@ -325,6 +343,13 @@ jobs:
325343
run: |
326344
$ErrorActionPreference = 'Stop'
327345
346+
# The build resolves the version via git describe. A manual `version`
347+
# input forces an override (version.cmake reads the TT_CLIENT_VERSION
348+
# env var).
349+
if ('${{ inputs.version }}' -ne '') {
350+
$Env:TT_CLIENT_VERSION = '${{ inputs.version }}'
351+
}
352+
328353
& conan remote add --index 0 art $Env:CONAN_REPO_URL
329354
330355
# Save vcvars to switch between them
@@ -342,16 +367,14 @@ jobs:
342367
function Build([string]$BuildDir, $VcvarsEnv, [string]$ArchName) {
343368
& {
344369
$VcvarsEnv | foreach { setvar $_ }
345-
New-Item -ItemType Directory -Force -Path $BuildDir | Out-Null
346-
pushd $BuildDir
347-
& cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo `
348-
-DCMAKE_C_COMPILER="cl.exe" `
349-
-DCMAKE_CXX_COMPILER="cl.exe" `
350-
-G Ninja ..
370+
# GNU make is not part of the Windows image, so the Windows job
371+
# drives the msvc-relwithdebinfo preset through cmake directly.
372+
# Every architecture uses the same preset, so each one is
373+
# configured into its own directory.
374+
& cmake --preset msvc-relwithdebinfo -B $BuildDir
351375
if (!$?) { exit 1 }
352-
& ninja trusttunnel_client setup_wizard
376+
& cmake --build $BuildDir --target trusttunnel_client setup_wizard
353377
if (!$?) { exit 1 }
354-
popd
355378
}
356379
357380
# Collect the unsigned executables; they are signed by the reusable
@@ -421,7 +444,13 @@ jobs:
421444
run: |
422445
set -e -x
423446
424-
VERSION=$(git describe --tags --match 'v*' | sed -e 's/^v//')
447+
# Match the version the build stamped: the manual `version` input
448+
# overrides git describe (same as the build-windows job).
449+
if [ -n "${{ inputs.version }}" ]; then
450+
VERSION="${{ inputs.version }}"
451+
else
452+
VERSION=$(git describe --tags --match 'v*' | sed -e 's/^v//')
453+
fi
425454
426455
mkdir -p artifacts
427456

.github/workflows/deploy-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- ephemeral-limit-memory-8192
4040
- ephemeral-limit-cpu-6
4141
container:
42-
image: adguard/core-libs:2.11
42+
image: adguard/core-libs:2.12
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@v6

.github/workflows/run-browser-integration-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- ephemeral-limit-memory-8192
2222
- ephemeral-limit-cpu-6
2323
container:
24-
image: adguard/core-libs:2.11
24+
image: adguard/core-libs:2.12
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v6
@@ -57,7 +57,7 @@ jobs:
5757
- ephemeral-limit-memory-8192
5858
- ephemeral-limit-cpu-6
5959
container:
60-
image: adguard/core-libs-testing:2.11.0
60+
image: adguard/core-libs-testing:2.12.0
6161
options: --privileged
6262
steps:
6363
- name: Checkout
@@ -76,7 +76,7 @@ jobs:
7676
env:
7777
ARTIFACTORY_URL: ${{ vars.ARTIFACTORY_URL }}
7878
run: |
79-
curl -O ${ARTIFACTORY_URL}/adguard-pods/binaries/agvpn_helper/agvpn_helper-linux.tar.gz
79+
curl -fsSL -O ${ARTIFACTORY_URL}/artifactory/adguard-pods/binaries/agvpn_helper/agvpn_helper-linux.tar.gz
8080
tar -C output --strip-components=1 -xvf agvpn_helper-linux.tar.gz
8181
8282
- name: Run browser tests

.github/workflows/run-integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- ephemeral-limit-memory-8192
2222
- ephemeral-limit-cpu-6
2323
container:
24-
image: adguard/core-libs:2.11
24+
image: adguard/core-libs:2.12
2525
steps:
2626
- name: Checkout client
2727
uses: actions/checkout@v6
@@ -70,7 +70,7 @@ jobs:
7070
- ephemeral-limit-memory-8192
7171
- ephemeral-limit-cpu-6
7272
container:
73-
image: adguard/core-libs-testing:2.11.0
73+
image: adguard/core-libs-testing:2.12.0
7474
options: --privileged
7575
strategy:
7676
fail-fast: false

.github/workflows/run-live-integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- ephemeral-limit-memory-8192
2222
- ephemeral-limit-cpu-6
2323
container:
24-
image: adguard/core-libs:2.11
24+
image: adguard/core-libs:2.12
2525
steps:
2626
- name: Checkout client
2727
uses: actions/checkout@v6
@@ -70,7 +70,7 @@ jobs:
7070
- ephemeral-limit-memory-8192
7171
- ephemeral-limit-cpu-6
7272
container:
73-
image: adguard/core-libs-testing:2.11.0
73+
image: adguard/core-libs-testing:2.12.0
7474
options: --privileged
7575
strategy:
7676
fail-fast: false

.github/workflows/run-live-unit-tests.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,26 @@ jobs:
2121
- ephemeral-limit-memory-8192
2222
- ephemeral-limit-cpu-6
2323
container:
24-
image: adguard/core-libs:2.11
24+
image: adguard/core-libs:2.12
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v6
2828

2929
- name: Build and run live unit tests
3030
env:
3131
CONAN_REPO_URL: ${{ vars.CONAN_REPO_URL }}
32+
# Builds go through the CMake presets; see CMakePresets.json.
33+
PRESET: clang-relwithdebinfo
34+
CMAKE_ARGS: -DVPNLIBS_ENABLE_LIVE_TESTS=ON
35+
# The image already provides the Conan dependencies.
36+
SKIP_BOOTSTRAP: 1
3237
run: |
3338
set -x -e
3439
3540
python3 -m pip install conan --upgrade
3641
conan remote add --index 0 art ${CONAN_REPO_URL} || true
3742
38-
export LDFLAGS=-fuse-ld=lld
39-
mkdir -p /build_no_asan && cd /build_no_asan
40-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
41-
-DCMAKE_C_COMPILER=clang \
42-
-DCMAKE_CXX_COMPILER=clang++ \
43-
-DVPNLIBS_ENABLE_LIVE_TESTS=ON \
44-
-DCMAKE_CXX_FLAGS='-stdlib=libc++' \
45-
${GITHUB_WORKSPACE}
46-
47-
make -j 4 live_tests
48-
ctest --output-on-failure -L live -E test_vpn_client_live
43+
make test-live
4944
5045
- name: Upload to Conan and cleanup
5146
if: always()

0 commit comments

Comments
 (0)