Skip to content

Update

Update #454

Workflow file for this run

name: Tester
on:
push:
paths-ignore: 'docs/**'
pull_request:
paths-ignore: 'docs/**'
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler:
- {
id: gcc,
c: gcc-13,
cxx: g++-13,
}
- {
id: clang,
c: clang-16,
cxx: clang++-16,
}
build_type: [debug, release]
name: 🐧-${{ matrix.compiler.id }}-${{ matrix.build_type }}
steps:
- name: Скачиваем репозиторий
uses: actions/checkout@v4
with:
fetch-depth: 0
path: repo
- name: Генерируем проекты
run: |
cmake repo -B build -G "Unix Makefiles" \
-D CMAKE_C_COMPILER=${{ matrix.compiler.c }} -D CMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D DV_BIG_INT_BUILD_TESTER=1 -D DV_BIG_INT_UB_SANITIZER=1
- name: Компилируем
run: |
cmake --build build
- name: CTest
run: |
ctest --verbose --test-dir build --timeout 60
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
compiler: [vs, mingw]
build_type: [debug, release]
name: 🔲-${{ matrix.compiler }}-${{ matrix.build_type }}
steps:
- name: Устанавливаем MinGW
if: matrix.compiler == 'mingw'
uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain
- name: Добавляем в PATH путь к MinGW
if: matrix.compiler == 'mingw'
shell: bash
run: echo "${RUNNER_TEMP}/msys64/mingw64/bin" >> $GITHUB_PATH
- name: Скачиваем репозиторий
uses: actions/checkout@v4
with:
fetch-depth: 0
path: repo
- name: Генерируем проекты
shell: bash
run: |
args=(repo -B build -D DV_BIG_INT_BUILD_TESTER=1 -D DV_BIG_INT_UB_SANITIZER=1)
if [ "${{ matrix.compiler }}" == "vs" ]
then
args+=(-G "Visual Studio 17 2022")
else
args+=(-G "MinGW Makefiles")
args+=(-D CMAKE_BUILD_TYPE=${{ matrix.build_type }})
fi
cmake "${args[@]}"
- name: Компилируем
shell: bash
run: |
args=(--build build)
if [ "${{ matrix.compiler }}" == "vs" ]
then
args+=(--config ${{ matrix.build_type }})
fi
cmake "${args[@]}"
- name: CTest
shell: bash
run: |
args=(--verbose --test-dir build --timeout 60)
if [ "${{ matrix.compiler }}" == "vs" ]
then
args+=(-C ${{ matrix.build_type }})
fi
ctest "${args[@]}"