Skip to content

Check and use return value of fread(), also check ftell() #184

Check and use return value of fread(), also check ftell()

Check and use return value of fread(), also check ftell() #184

Workflow file for this run

name: C/C++ CI
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
push:
branches: trunk
paths:
- '**'
- '!**.md'
- '!docs/**'
- '!**.yml'
- '**/c-cpp.yml'
pull_request:
branches: trunk
paths:
- '**'
- '!**.md'
- '!docs/**'
- '!**.yml'
- '**/c-cpp.yml'
jobs:
linux:
strategy:
fail-fast: false
matrix:
cc: [gcc-9, gcc-11, clang-13, clang-14]
runs-on: ubuntu-latest
env:
CC: ${{ matrix.cc }}
steps:
- uses: actions/checkout@v4
- name: Fix kernel mmap rnd bits
# Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
# high-entropy ASLR in much newer kernels that GitHub runners are
# using leading to random crashes: https://reviews.llvm.org/D148280
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Install dependencies
run: |
# sudo apt remove -y firefox
sudo apt update
# sudo apt upgrade -y
sudo apt install -y meson ninja-build $CC
- name: Build
run: |
meson setup _build -Db_sanitize=address,undefined -Db_lundef=false
cd _build
ninja
- name: Test
run: cd _build && meson test -v
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: brew install meson
- run: |
meson setup _build -Db_sanitize=address,undefined -Db_lundef=false
cd _build
ninja
meson test -v