Skip to content

Commit

Permalink
Run clang and gcc tests in separate actions in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Petua41 committed Nov 27, 2024
1 parent 3e88939 commit 4a57f13
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
19 changes: 18 additions & 1 deletion .github/composite-actions/download-libraries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,39 @@ inputs:
description: 'Install boost'
default: true

install-clang:
type: boolean
description: 'Install clang'
default: false

install-gcc:
type: boolean
description: 'Install gcc'
default: true

runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
- name: Install build tools
run: |
sudo apt-get update -y
sudo apt-get install gcc-10 g++-10 cmake build-essential -y
sudo apt-get install cmake build-essential -y
shell: bash

- name: Install GCC
run: |
sudo apt-get install gcc-10 g++-10 -y
shell: bash
if: inputs.install-gcc != 'false'

- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
shell: bash
if: inputs.install-clang != 'false'

- name: Make lib directory
run: |
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
#- examples/**
workflow_dispatch:
jobs:
run_tests:
run_tests_gcc:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -42,25 +42,43 @@ jobs:
uses: ./.github/composite-actions/download-libraries
- name: Download datasets
uses: ./.github/composite-actions/download-datasets
- name: Build (GCC)
- name: Build
run: |
if [[ "${{matrix.cfg.BUILD_TYPE}}" == "Debug" ]]; then
./build.sh --debug --sanitizer=${{ matrix.cfg.SANITIZER }} --compiler=g++-10 --c-compiler=gcc-10
else
./build.sh
fi
- name: Test (GCC)
- name: Test
working-directory: ${{github.workspace}}/build/target
shell: bash
run: ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*'
- name: Build (Clang)
run_tests_clang:
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- { BUILD_TYPE: Release }
- { BUILD_TYPE: Debug }
- { BUILD_TYPE: Debug, SANITIZER : ADDRESS }
- { BUILD_TYPE: Debug, SANITIZER : UB }
steps:
- uses: actions/checkout@v3
- name: Download libraries
uses: ./.github/composite-actions/download-libraries
with:
install-clang: true
install-gcc: false
- name: Download datasets
uses: ./.github/composite-actions/download-datasets
- name: Build
run: |
if [[ "${{matrix.cfg.BUILD_TYPE}}" == "Debug" ]]; then
./build.sh --debug --sanitizer=${{ matrix.cfg.SANITIZER }} --compiler=clang++-18 --c-compiler=clang-18
else
./build.sh
fi
- name: Test (Clang)
- name: Test
working-directory: ${{github.workspace}}/build/target
shell: bash
run: ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*'

0 comments on commit 4a57f13

Please sign in to comment.