Reapply "gh actions: silence missing tzdata warning on android build" #4121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compiler Compatibility | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
tags: | |
description: 'Test scenario tags' | |
required: false | |
type: boolean | |
pull_request: | |
branches: [master, develop] | |
paths-ignore: | |
- '**/*.md' | |
- '.circleci/**' | |
- '.cirrus.yml' | |
push: | |
branches: [master, develop] | |
paths-ignore: | |
- '**/*.md' | |
- '.circleci/**' | |
- '.cirrus.yml' | |
schedule: | |
- cron: '0 16 * * *' | |
concurrency: | |
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }} | |
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }} | |
env: | |
CACHE_EPOCH: 130-2 | |
GOPROXY: direct | |
jobs: | |
win-compiler-compatible-2022: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86] | |
crt-linkage: [dynamic] | |
build_type: [Debug, RelWithDebInfo] | |
runs-on: windows-2022 | |
env: | |
BUILD_TYPE: '${{ matrix.build_type }}' | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout with shallow submodules | |
run: | | |
# unshallow must come first otherwise submodule may be get unshallowed | |
git fetch --tags --unshallow | |
git submodule update --init --depth 1 | |
- name: Cache toolchain, nasm, nsis and wixtoolset 3 | |
id: toolchain-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
third_party/nasm | |
third_party/llvm-build/Release+Asserts | |
third_party/wix311 | |
third_party/nsis | |
key: ${{ runner.os }}-toolchain-nsis-${{ hashFiles('CLANG_REVISION') }}-v${{ env.CACHE_EPOCH }} | |
- name: Cache msvc curl | |
id: curl-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
third_party/libcurl-vc16-arm64-release-static-ipv6-sspi-schannel | |
third_party/libcurl-vc16-x64-release-static-ipv6-sspi-schannel | |
third_party/libcurl-vc16-x86-release-static-ipv6-sspi-schannel | |
key: ${{ runner.os }}-msvc-dynamic-curl-vc16-${{ matrix.arch }}-v2 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.20.0' | |
cache-dependency-path: | | |
tools/go.sum | |
third_party/boringssl/src/go.sum | |
- name: Build build tool | |
run: | | |
cd tools | |
go build | |
- name: "Install dependency: clang, nasm, nsis and wixtoolset 3" | |
if: ${{ steps.toolchain-cache.outputs.cache-hit != 'true' }} | |
run: | | |
scripts\download-toolchain.bat | |
- name: "Install dependency: curl" | |
if: ${{ steps.curl-cache.outputs.cache-hit != 'true' }} | |
run: | | |
scripts\download-curl-msvc.bat ${{ matrix.arch }} | |
- name: "Install dependency: cmake (chocolatey)" | |
run: | | |
REM choco install -y cmake.portable --version=3.29.8 | |
cmake --version | |
- name: "Install dependency: ninja (chocolatey)" | |
run: | | |
choco install -y ninja | |
ninja --version | |
- name: Build Binary | |
run: | | |
set VCToolsVersion= | |
set Winsdk=10.0.22621.0 | |
set "WindowsSDKVersion=%Winsdk%\" | |
if "${{ matrix.arch }}" == "arm64" (call :SetNewVCToolsVersion) | |
set vsdevcmd=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat | |
set "VSCMD_START_DIR=%CD%" | |
set Platform=${{ matrix.arch }} | |
call "%vsdevcmd%" -arch=%Platform% -host_arch=amd64 -winsdk=%Winsdk% -no_logo -vcvars_ver=%VCToolsVersion% | |
tools\build -msvc-tgt-arch=${{ matrix.arch }} -msvc-crt-linkage=${{ matrix.crt-linkage }} -use-libcxx=false -build-test || exit /b | |
exit /b 0 | |
:SetNewVCToolsVersion | |
set VCToolsVersion= | |
- name: Run tests | |
run: | | |
cd build-msvc-${{ matrix.arch }}-${{ matrix.crt-linkage }} | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4 || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a --ipv6_mode || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 --ipv6_mode || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h --ipv6_mode || exit /b | |
yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http --ipv6_mode || exit /b | |
mingw64-compiler-compatible-crosscompiling: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [i686, x86_64] | |
build_type: [Debug, RelWithDebInfo] | |
runs-on: ubuntu-22.04 | |
env: | |
BUILD_TYPE: '${{ matrix.build_type }}' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout with shallow submodules | |
run: | | |
# unshallow must come first otherwise submodule may be get unshallowed | |
git fetch --tags --unshallow | |
git submodule update --init --depth 1 | |
- name: Cache toolchain | |
id: toolchain-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
third_party/nasm | |
third_party/llvm-build/Release+Asserts | |
third_party/wix311 | |
third_party/nsis | |
key: ${{ runner.os }}-toolchain-nsis-${{ hashFiles('CLANG_REVISION') }}-v${{ env.CACHE_EPOCH }} | |
- name: Cache mingw64 llvm sysroot | |
id: sysroot-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
third_party/llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64 | |
key: ${{ runner.os }}-mingw64-sysroot-third_party-llvm-20240619-ucrt-v1 | |
- name: Cache mingw64 curl | |
id: curl-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
third_party/curl-8.4.0_7-win64a-mingw | |
third_party/curl-8.4.0_7-win64-mingw | |
third_party/curl-8.4.0_7-win32-mingw | |
key: ${{ runner.os }}-mingw64-curl-and-aarch64-v1 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.20.0' | |
cache-dependency-path: | | |
tools/go.sum | |
third_party/boringssl/src/go.sum | |
- name: Build build tool | |
run: | | |
cd tools | |
go build | |
- name: "Install dependency: prebuilt clang and clang-tidy binaries" | |
if: ${{ steps.toolchain-cache.outputs.cache-hit != 'true' }} | |
run: | | |
./scripts/download-clang-prebuilt-binaries.py | |
rm -f third_party/llvm-build/Release+Asserts/*.tgz | |
- name: "Install dependency: llvm-mingw sysroot" | |
if: ${{ steps.sysroot-cache.outputs.cache-hit != 'true' }} | |
run: | | |
pushd third_party | |
curl -L -O https://github.com/mstorsjo/llvm-mingw/releases/download/20240619/llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz | |
tar -xf llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64.tar.xz | |
rm -vf llvm-mingw-*.xz | |
popd | |
- name: "Install dependency: curl" | |
if: ${{ steps.curl-cache.outputs.cache-hit != 'true' }} | |
run: | | |
./scripts/download-curl-mingw.sh i686 | |
./scripts/download-curl-mingw.sh x86_64 | |
./scripts/download-curl-mingw.sh aarch64 | |
- name: Change ubuntu mirror | |
run: | | |
sudo sed -i 's/azure.archive.ubuntu.com/azure.archive.ubuntu.com/g' /etc/apt/sources.list | |
sudo apt-get update -qq | |
- name: Populate depedencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y cmake ninja-build nasm zip | |
- name: Populate dependencie (cmake, overwrite) | |
run: | | |
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.29.8/cmake-3.29.8-linux-x86_64.tar.gz | |
sudo tar -C /usr/local --strip-components=1 -xf cmake-3.29.8-linux-x86_64.tar.gz | |
cmake --version | |
rm -f *.tar.gz | |
- name: Populate depedencies (i686) | |
if: ${{ matrix.arch == 'i686' }} | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update -qq | |
sudo apt-get install -y wine wine32 | |
- name: Populate depedencies (x86_64) | |
if: ${{ matrix.arch == 'x86_64' }} | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y wine wine64 | |
- name: Patch libcxx for windows xp | |
if: ${{ matrix.arch == 'i686' || matrix.arch == 'x86_64' }} | |
run: | | |
pushd third_party/libc++/trunk | |
patch -p1 < ../winxp.patch | |
popd | |
pushd third_party/libc++abi/trunk | |
patch -p1 < ../winxp.patch | |
popd | |
echo "BUILD_OPTIONS=-mingw-allow-xp -enable-lto=false" >> $GITHUB_ENV | |
- name: Build Binary | |
run: | | |
./tools/build --variant gui --arch ${{ matrix.arch }} --system mingw -build-test \ | |
--clang-path $PWD/third_party/llvm-mingw-20240619-ucrt-ubuntu-20.04-x86_64 -no-packaging \ | |
${{ env.BUILD_OPTIONS }} | |
- name: Populate depedencies (Tests-i686) | |
if: ${{ matrix.arch == 'i686' }} | |
run: | | |
# copy curl dll required by yass_test | |
cp -v third_party/curl-8.4.0_7-win32-mingw/bin/libcurl.dll build-mingw-winxp-${{ matrix.arch }}/ | |
- name: Populate depedencies (Tests-x86_64) | |
if: ${{ matrix.arch == 'x86_64' }} | |
run: | | |
# copy curl dll required by yass_test | |
cp -v third_party/curl-8.4.0_7-win64-mingw/bin/libcurl-x64.dll build-mingw-winxp-${{ matrix.arch }}/ | |
- name: Run tests | |
if: ${{ matrix.arch == 'i686' || matrix.arch == 'x86_64' }} | |
run: | | |
cd build-mingw-winxp-${{ matrix.arch }} | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4 | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a --ipv6_mode | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 --ipv6_mode | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h --ipv6_mode | |
wine yass_test.exe --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http --ipv6_mode | |
linux-compiler-compatible: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [clang] | |
build_type: [Debug, RelWithDebInfo] | |
cxxruntime: [libc++] | |
runs-on: ubuntu-22.04 | |
env: | |
BUILD_TYPE: '${{ matrix.build_type }}' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout with shallow submodules | |
run: | | |
# unshallow must come first otherwise submodule may be get unshallowed | |
git fetch --tags --unshallow | |
git submodule update --init --depth 1 | |
- name: Cache toolchain (v17.0.6) | |
id: clang17-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
third_party/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 | |
key: ${{ runner.os }}-toolchain-clang17-v${{ env.CACHE_EPOCH }} | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.20.0' | |
cache-dependency-path: | | |
tools/go.sum | |
third_party/boringssl/src/go.sum | |
- name: Build build tool | |
run: | | |
cd tools | |
go build | |
- name: "Install dependency: clang 17" | |
if: ${{ steps.clang17-cache.outputs.cache-hit != 'true' }} | |
run: | | |
curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz | |
tar -C third_party -xvf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz \ | |
clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/lib/clang/17/include \ | |
clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/bin/{clang,clang++,clang-17,ld.lld,lld,llvm-ar,llvm-ranlib} | |
rm -f *.xz | |
- name: Change ubuntu mirror | |
run: | | |
sudo sed -i 's/azure.archive.ubuntu.com/azure.archive.ubuntu.com/g' /etc/apt/sources.list | |
sudo apt-get update -qq | |
- name: Populate depedencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y cmake ninja-build libgtk-3-dev libncurses5 gettext | |
- name: Populate dependencie (cmake, overwrite) | |
run: | | |
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.29.8/cmake-3.29.8-linux-x86_64.tar.gz | |
sudo tar -C /usr/local --strip-components=1 -xf cmake-3.29.8-linux-x86_64.tar.gz | |
cmake --version | |
rm -f *.tar.gz | |
- name: Populate depedencies (test purposes) | |
run: sudo apt-get update -qq && sudo apt-get install -y libcurl4-openssl-dev | |
- name: Set build options | |
run: | | |
if [ "${{ matrix.compiler }}" = "clang" ]; then | |
echo "CC=${{ github.workspace }}/third_party/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/bin/clang" >> $GITHUB_ENV | |
echo "CXX=${{ github.workspace }}/third_party/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/bin/clang++" >> $GITHUB_ENV | |
fi | |
if [ "${{ matrix.cxxruntime }}" = "libc++" ]; then | |
echo build_opts="${{ env.build_opts }} -use-libcxx=1" >> $GITHUB_ENV | |
else | |
echo build_opts="${{ env.build_opts }} -use-libcxx=0" >> $GITHUB_ENV | |
fi | |
- name: Build Binary | |
run: | | |
./tools/build -no-packaging ${{ env.build_opts }} -build-test | |
- name: Run tests | |
run: | | |
cd build-linux-amd64 | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4 | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a --ipv6_mode | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 --ipv6_mode | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h --ipv6_mode | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http --ipv6_mode | |
mac-compiler-compatible: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-15] | |
build_type: [Debug, RelWithDebInfo] | |
runs-on: ${{ matrix.os }} | |
env: | |
BUILD_TYPE: '${{ matrix.build_type }}' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout with shallow submodules | |
run: | | |
# unshallow must come first otherwise submodule may be get unshallowed | |
git fetch --tags --unshallow | |
git submodule update --init --depth 1 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.20.0' | |
cache-dependency-path: | | |
tools/go.sum | |
third_party/boringssl/src/go.sum | |
- name: Build build tool | |
run: | | |
cd tools | |
go build | |
- name: Populate depedencies | |
run: | | |
# brew update | |
# brew install ninja cmake p7zip | |
brew install ninja | |
- name: Set up Xcode to 16.0 | |
run: | | |
sudo xcode-select -s /Applications/Xcode_16.0.app | |
- name: Build Binary | |
run: | | |
export CC=$(xcrun --find clang) | |
export CXX=$(xcrun --find clang++) | |
./tools/build -no-packaging -build-test | |
- name: Run tests | |
run: | | |
cd build-darwin-arm64 | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4 | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks4a --ipv6_mode | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5 --ipv6_mode | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type socks5h --ipv6_mode | |
./yass_test --gtest_shuffle --gtest_repeat=10 --gtest_throw_on_failure --proxy_type http --ipv6_mode |