Skip to content

Commit

Permalink
CI: try new linux tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Olivier <[email protected]>
  • Loading branch information
martin-olivier committed Jan 9, 2025
1 parent 324edb3 commit a8b64b7
Showing 1 changed file with 15 additions and 26 deletions.
41 changes: 15 additions & 26 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,25 @@ jobs:
working-directory: build
run: ctest --verbose

unit_tests_32bit_linux:
unit_tests_linux:
strategy:
fail-fast: false
matrix:
cxx-std: [11, 14, 17, 20]
arch: [64bit, 32bit]
action: [tests, valgrind]
include:
- arch: 64bit
docker_arch: amd64
- arch: 32bit
docker_arch: i386

name: debian-latest 32bit (C++${{ matrix.cxx-std }} - gcc)
name: linux ${{ matrix.arch }} ${{ matrix.action }} / C++${{ matrix.cxx-std }} / gcc)
runs-on: ubuntu-latest
container:
image: i386/debian:latest
image: ${{ matrix.docker_arch }}/debian:latest
options: --user root
volumes:
- ${{ github.workspace }}:/workspace
volumes: ${{ github.workspace }}:/workspace

steps:
# https://github.com/actions/upload-artifact/issues/616
Expand All @@ -119,7 +125,7 @@ jobs:
run: apt update

- name: Install build tools
run: apt install -y build-essential cmake
run: apt install -y build-essential cmake valgrind

- name: Generate project files
run: cmake . -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx-std }} -DDYLIB_BUILD_TESTS=ON -DDYLIB_WARNING_AS_ERRORS=ON
Expand All @@ -128,29 +134,12 @@ jobs:
run: cmake --build build

- name: Run unit tests
if: ${{ matrix.action == 'tests'}}
working-directory: build
run: ctest --verbose

memory_check:
name: memory check
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- name: Update packages
run: sudo apt update

- name: Install valgrind
run: sudo apt install -y valgrind

- name: Generate tests build file
run: cmake . -B build -DCMAKE_CXX_STANDARD=20 -DDYLIB_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug

- name: Build unit tests
run: cmake --build build

- name: Run unit tests with valgrind
if: ${{ matrix.action == 'valgrind'}}
working-directory: build
run: valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./unit_tests

Expand All @@ -169,7 +158,7 @@ jobs:
- arch: universal
osx_arch: arm64;x86_64

name: macos-latest ${{ matrix.arch }} ${{ matrix.action }} / C++${{ matrix.cxx-std }} / clang
name: macos ${{ matrix.arch }} ${{ matrix.action }} / C++${{ matrix.cxx-std }} / clang
runs-on: macos-latest

steps:
Expand Down

0 comments on commit a8b64b7

Please sign in to comment.