Skip to content

Update big_int.cpp

Update big_int.cpp #24

Workflow file for this run

# Copyright (c) the Dviglo project
# Copyright (c) 2008-2023 the Urho3D project
# License: MIT
name: CI/CD
on:
push:
pull_request:
jobs:
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)
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 {0}
run: |
args=(--test-dir build --timeout 60)
if [ "${{ matrix.compiler }}" == "vs" ]
then
args+=(-C ${{ matrix.build_type }})
fi
ctest "${args[@]}"
exit_code=$?
if (( $exit_code != 0 ))
then
echo "$(cat ${GITHUB_WORKSPACE}/build/Testing/Temporary/LastTest.log)"
exit $exit_code
fi
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- {
id: gcc,
c: gcc-13,
cxx: g++-13,
}
- {
id: clang,
c: clang-13,
cxx: clang++-13,
}
build_type:
- {
id: debug,
value: debug,
}
- {
id: release,
value: release,
}
name: 🐧-${{ matrix.compiler.id }}-${{ matrix.build_type.id }}
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.value }}
- name: Компилируем
run: |
cmake --build build
- name: CTest
shell: bash {0}
run: |
ctest --test-dir build --timeout 60
exit_code=$?
if (( $exit_code != 0 ))
then
echo "$(cat ${GITHUB_WORKSPACE}/build/Testing/Temporary/LastTest.log)"
exit $exit_code
fi