Archived
CI / macos-15-intel/clang (push) Canceled after 0s
CI / ubuntu-latest/clang (push) Canceled after 0s
CI / ubuntu-latest/linux-g++ (push) Canceled after 0s
CI / macos-latest/clang-small (push) Canceled after 0s
CI / ubuntu-latest/clang-small (push) Canceled after 0s
CI / ubuntu-latest/gcc-small (push) Canceled after 0s
CI / ubuntu-latest/gcc-no-math (push) Canceled after 0s
CI / ubuntu-latest/gcc-freestanding (push) Canceled after 0s
The build fails after the transition to Apple silicon and I don't know why: ``` : && /usr/bin/clang -Oz -g -Werror -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names tools/json2cbor/CMakeFiles/json2cbor.dir/json2cbor.c.o -o tools/json2cbor/json2cbor libtinycbor.a -lcjson -lm && : ld: library 'cjson' not found ``` Homebrew says it installed and CMake says it found it. ``` -- Checking for module 'libcjson' -- Found libcjson, version 1.7.19 ``` I won't investigate. Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
139 lines
4.0 KiB
YAML
139 lines
4.0 KiB
YAML
name: CI
|
|
permissions: read-all
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
|
|
|
|
# When a PR is updated, cancel the jobs from the previous version. Merges
|
|
# do not define head_ref, so use run_id to never cancel those jobs.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
TinyCBOR:
|
|
timeout-minutes: 45
|
|
# Common environment variables
|
|
env:
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
HOMEBREW_NO_ANALYTICS: 1
|
|
|
|
strategy:
|
|
# Always run all jobs in the matrix, even if one fails.
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ ubuntu-latest ]
|
|
build_cfg:
|
|
- name: gcc-no-math
|
|
cmakeflags: >-
|
|
-DCMAKE_C_FLAGS="-Os -Werror"
|
|
-DWITH_FLOATING_POINT=OFF
|
|
-DWITH_FREESTANDING=ON
|
|
- name: gcc-freestanding
|
|
cmakeflags: >-
|
|
-DCMAKE_C_FLAGS="-Os -Werror"
|
|
-DWITH_FREESTANDING=ON
|
|
- name: gcc-small
|
|
cmakeflags: >-
|
|
-DBUILD_TESTING=OFF
|
|
-DCMAKE_C_FLAGS="-Os -Werror"
|
|
- name: clang-small
|
|
cmakeflags: >-
|
|
-DBUILD_TESTING=OFF
|
|
-DCMAKE_C_COMPILER=clang
|
|
-DCMAKE_C_FLAGS="-Oz -g -Werror"
|
|
- name: clang
|
|
cmakeflags: >-
|
|
-DBUILD_SHARED_LIBS=ON
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
-DCMAKE_C_COMPILER=clang
|
|
-DCMAKE_C_FLAGS_DEBUG="-Werror"
|
|
-DCMAKE_CXX_COMPILER=clang++
|
|
-DCMAKE_CXX_FLAGS_DEBUG="-Werror"
|
|
- name: linux-g++
|
|
cmakeflags: >-
|
|
-DBUILD_SHARED_LIBS=ON
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
-DCMAKE_C_COMPILER=gcc
|
|
-DCMAKE_C_FLAGS_DEBUG="-Werror"
|
|
-DCMAKE_CXX_COMPILER=g++
|
|
-DCMAKE_CXX_FLAGS_DEBUG="-Werror"
|
|
include:
|
|
- os: macos-latest
|
|
build_cfg:
|
|
name: clang-small
|
|
cmakeflags: >-
|
|
-DBUILD_TESTING=OFF
|
|
-DCMAKE_C_COMPILER=clang
|
|
-DCMAKE_C_FLAGS="-Oz -g -Werror"
|
|
-DCMAKE_CXX_COMPILER=clang++
|
|
-DCMAKE_CXX_FLAGS="-O2 -g -Werror"
|
|
-DWITH_TOOLS=OFF
|
|
- os: macos-15-intel
|
|
build_cfg:
|
|
name: clang
|
|
cmakeflags: >-
|
|
-DBUILD_SHARED_LIBS=ON
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
-DCMAKE_C_COMPILER=clang
|
|
-DCMAKE_C_FLAGS_DEBUG="-Werror -fsanitize=address"
|
|
-DCMAKE_CXX_COMPILER=clang++
|
|
-DCMAKE_CXX_FLAGS_DEBUG="-Werror -fsanitize=address"
|
|
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"
|
|
-DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address"
|
|
|
|
|
|
# Default job name is too long to be visible in the "Checks" tab.
|
|
name: ${{ matrix.os }}/${{ matrix.build_cfg.name }}
|
|
# The type of runner that the job will run on
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Clone tinycbor
|
|
uses: actions/checkout@v6
|
|
|
|
- name: install Linux software
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
# Need a recent Valgrind, otherwise debug info cannot be read.
|
|
sudo snap install valgrind --classic
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
doxygen \
|
|
cmake \
|
|
libc6-dbg \
|
|
libcjson-dev \
|
|
libfuntools-dev \
|
|
ninja-build \
|
|
qt6-base-dev
|
|
|
|
- name: install macOS software
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
brew install -q \
|
|
cjson \
|
|
cmake \
|
|
ninja \
|
|
qt
|
|
|
|
- name: Compile
|
|
run: |
|
|
set -x
|
|
cmake -S. -Bbuild -GNinja -DBUILD_TESTING=ON \
|
|
${{ matrix.build_cfg.cmakeflags }}
|
|
ninja -C build -v
|
|
if [[ -f build/libtinycbor.a ]]; then
|
|
size build/libtinycbor.a | tee sizes
|
|
fi
|
|
|
|
- name: Execute tests
|
|
run: |
|
|
ctest --output-on-failure --test-dir build
|
|
|
|
- name: Build docs
|
|
if: matrix.build_cfg.docs
|
|
run: ./scripts/update-docs.sh
|