Skip to content

Updated CI to add Ubuntu 24.04. #45

Updated CI to add Ubuntu 24.04.

Updated CI to add Ubuntu 24.04. #45

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *'
jobs:
Linux:
name: Linux
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.cxx == 'g++' && matrix.os == 'ubuntu-20.04' }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
cxx: [g++, clang++]
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- name: Before script
run: |
wget -qO - https://raw.github.com/tdulcet/Linux-System-Information/master/info.sh | bash -s --
sudo apt-get update -y
sudo apt-get install -y cppcheck
$CXX --version
- name: Script
run: |
ARGS=( -std=gnu++17 -Wall -g -Og )
if [[ $CXX =~ ^clang ]]; then
ARGS+=( -fsanitize=address,undefined,integer )
else
ARGS+=( -fsanitize=address,undefined )
fi
$CXX "${ARGS[@]}" numbers.cpp -o numbers -DFACTOR='"factor"'
./numbers --help
$CXX "${ARGS[@]}" numbers.cpp -o numbers
./numbers --help
$CXX "${ARGS[@]}" numbers.cpp -o gmp_numbers -DHAVE_GMP -DFACTOR='"factor"' -lgmpxx -lgmp
./gmp_numbers --help
$CXX "${ARGS[@]}" numbers.cpp -o gmp_numbers -DHAVE_GMP -lgmpxx -lgmp
./gmp_numbers --help
- name: Cppcheck
run: cppcheck --enable=all .
- name: Clang-Tidy
if: ${{ matrix.cxx == 'clang++' }}
run: clang-tidy -checks='bugprone-*,cert-*,clang-analyzer-*,misc-*,-misc-no-recursion,modernize-*,-modernize-use-trailing-return-type,performance-*,portability-*,readability-const-return-type,readability-container-*,readability-duplicate-include,readability-else-after-return,readability-make-member-function-cons,readability-non-const-parameter,readability-redundant-*,readability-simplify-*,readability-string-compare,readability-use-*' -header-filter='.*' *.cpp -- -Wall -O3 -std=gnu++17 -DHAVE_GMP