Merge pull request #1985 from isuruf/flint23 #620
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test symengine | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.OS }} | |
name: "${{ matrix.BUILD_TYPE }}-${{ matrix.OS }}-${{ matrix.CC }} (${{ toJSON(matrix) }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_LATEST_GCC: yes | |
WITH_COVERAGE: yes | |
WITH_MPC: yes | |
USE_GLIBCXX_DEBUG: yes | |
OS: ubuntu-22.04 | |
CC: gcc | |
EXTRA_APT_PACKAGES: g++-12 gcc-12 | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_COVERAGE: yes | |
TEST_IN_TREE: yes | |
WITH_FLINT: yes | |
WITH_FLINT_DEV: yes | |
WITH_MPC: yes | |
CC: gcc | |
OS: ubuntu-20.04 | |
# Debug build (with BFD) | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Debug build (with BFD and SYMENGINE_THREAD_SAFE) | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_SYMENGINE_THREAD_SAFE: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Debug build (with BFD, ECM, PRIMESIEVE and MPC) | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_ECM: yes | |
WITH_PRIMESIEVE: yes | |
WITH_MPC: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Debug build (with BFD, Flint and Arb and INTEGER_CLASS from flint) | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_ARB: yes | |
INTEGER_CLASS: flint | |
WITH_MPC: yes | |
TEST_IN_TREE: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Debug build (with BFD, MPFR and INTEGER_CLASS from gmpxx) | |
- BUILD_TYPE: Debug | |
WITH_SYMENGINE_RCP: yes | |
WITH_MPFR: yes | |
INTEGER_CLASS: gmpxx | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Debug build (with BFD and INTEGER_CLASS from boostmp) | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
INTEGER_CLASS: boostmp | |
OS: ubuntu-22.04 | |
WITH_LATEST_GCC: yes | |
CC: gcc | |
EXTRA_APT_PACKAGES: g++-12 gcc-12 | |
# Debug build shared lib (with BFD) | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
BUILD_SHARED_LIBS: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Release build (with BFD) | |
- WITH_BFD: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Release shared build (with BFD) | |
- WITH_BFD: yes | |
BUILD_SHARED_LIBS: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
# Release build (recent LLVM+clang) | |
- BUILD_TYPE: Release | |
OS: ubuntu-20.04 | |
CC: clang | |
WITH_LLVM: 13 | |
EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' | |
EXTRA_APT_PACKAGES: clang-13 llvm-13 | |
## In-tree builds (we just check a few configurations to make sure they work): | |
# Debug build | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
TEST_IN_TREE: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
- TEST_CLANG_FORMAT: yes | |
OS: ubuntu-20.04 | |
CC: gcc | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_PIRANHA: yes | |
BUILD_SHARED_LIBS: yes | |
CC: gcc | |
OS: ubuntu-22.04 | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_PIRANHA: yes | |
INTEGER_CLASS: piranha | |
CC: gcc | |
OS: ubuntu-22.04 | |
- BUILD_TYPE: Debug | |
WITH_BFD: yes | |
WITH_LLVM: 12 | |
WITH_COVERAGE: yes | |
CC: clang | |
OS: ubuntu-20.04 | |
- BUILD_TYPE: Release | |
WITH_BENCHMARKS: yes | |
WITH_BENCHMARKS_GOOGLE: yes | |
WITH_LLVM: 14 | |
CC: clang | |
OS: ubuntu-22.04 | |
- BUILD_TYPE: Debug | |
WITH_LLVM: 5.0 | |
OS: macos-latest | |
CC: clang | |
- BUILD_TYPE: Release | |
WITH_LLVM: 5.0 | |
OS: macos-latest | |
CC: clang | |
- BUILD_TYPE: Debug | |
OS: macos-latest | |
CC: gcc | |
- BUILD_TYPE: Release | |
OS: macos-latest | |
CC: gcc | |
- BUILD_TYPE: Debug | |
WITH_SANITIZE: address | |
WITH_LLVM: 12 | |
WITH_COTIRE: no | |
CC: clang | |
OS: ubuntu-20.04 | |
- BUILD_TYPE: Debug | |
WITH_SANITIZE: undefined | |
WITH_LLVM: 12 | |
CC: clang | |
OS: ubuntu-20.04 | |
- BUILD_TYPE: Debug | |
WITH_SANITIZE: memory | |
WITH_SYMENGINE_RCP: yes | |
WITH_BFD: no | |
WITH_COTIRE: no | |
EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' | |
EXTRA_APT_PACKAGES: clang-15 | |
INTEGER_CLASS: boostmp | |
CC: clang | |
OS: ubuntu-22.04 | |
- CONDA_ENV_FILE: symengine/utilities/matchpycpp/environment.yml | |
CC: gcc | |
OS: ubuntu-20.04 | |
- MSYSTEM: MINGW64 | |
ARCH: x86_64 | |
OS: windows-2019 | |
BUILD_TYPE: Release | |
- MSYSTEM: MINGW64 | |
ARCH: x86_64 | |
OS: windows-2019 | |
BUILD_TYPE: Debug | |
- MSYSTEM: MINGW32 | |
ARCH: i686 | |
OS: windows-2019 | |
BUILD_TYPE: Release | |
WITH_MPFR: yes | |
- MSYSTEM: MINGW32 | |
ARCH: i686 | |
OS: windows-2019 | |
BUILD_TYPE: Debug | |
WITH_MPFR: yes | |
WITH_MPC: yes | |
env: | |
USE_GLIBCXX_DEBUG: ${{ matrix.USE_GLIBCXX_DEBUG }} | |
WITH_MPFR: ${{ matrix.WITH_MPFR }} | |
WITH_LLVM: ${{ matrix.WITH_LLVM }} | |
WITH_BENCHMARKS: ${{ matrix.WITH_BENCHMARKS }} | |
WITH_BENCHMARKS_GOOGLE: ${{ matrix.WITH_BENCHMARKS_GOOGLE }} | |
WITH_SYMENGINE_RCP: ${{ matrix.WITH_SYMENGINE_RCP }} | |
TEST_IN_TREE: ${{ matrix.TEST_IN_TREE }} | |
WITH_SYMENGINE_THREAD_SAFE: ${{ matrix.WITH_SYMENGINE_THREAD_SAFE }} | |
WITH_PRIMESIEVE: ${{ matrix.WITH_PRIMESIEVE }} | |
INTEGER_CLASS: ${{ matrix.INTEGER_CLASS }} | |
WITH_ARB: ${{ matrix.WITH_ARB }} | |
WITH_PIRANHA: ${{ matrix.WITH_PIRANHA }} | |
CONDA_ENV_FILE: ${{ matrix.CONDA_ENV_FILE }} | |
WITH_BFD: ${{ matrix.WITH_BFD }} | |
WITH_FLINT: ${{ matrix.WITH_FLINT }} | |
EXTRA_APT_REPOSITORY: ${{ matrix.EXTRA_APT_REPOSITORY }} | |
EXTRA_APT_PACKAGES: ${{ matrix.EXTRA_APT_PACKAGES }} | |
TEST_CLANG_FORMAT: ${{ matrix.TEST_CLANG_FORMAT }} | |
WITH_ECM: ${{ matrix.WITH_ECM }} | |
WITH_LATEST_GCC: ${{ matrix.WITH_LATEST_GCC }} | |
OS: ${{ matrix.OS }} | |
WITH_FLINT_DEV: ${{ matrix.WITH_FLINT_DEV }} | |
CC: ${{ matrix.CC }} | |
WITH_COTIRE: ${{ matrix.WITH_COTIRE }} | |
WITH_COVERAGE: ${{ matrix.WITH_COVERAGE }} | |
BUILD_TYPE: ${{ matrix.BUILD_TYPE }} | |
WITH_SANITIZE: ${{ matrix.WITH_SANITIZE }} | |
WITH_MPC: ${{ matrix.WITH_MPC }} | |
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }} | |
OPTIONS: ${{ matrix.BUILD_TYPE }}-${{ matrix.OS }}-${{ matrix.CC }}-${{ matrix.USE_GLIBCXX_DEBUG }}-${{ matrix.WITH_MPFR }}-${{ matrix.WITH_LLVM }}-${{ matrix.WITH_BENCHMARKS }}-${{ matrix.WITH_BENCHMARKS_GOOGLE }}-${{ matrix.WITH_SYMENGINE_RCP }}-${{ matrix.TEST_IN_TREE }}-${{ matrix.WITH_SYMENGINE_THREAD_SAFE }}-${{ matrix.WITH_PRIMESIEVE }}-${{ matrix.INTEGER_CLASS }}-${{ matrix.WITH_ARB }}-${{ matrix.WITH_PIRANHA }}-${{ matrix.CONDA_ENV_FILE }}-${{ matrix.WITH_BFD }}-${{ matrix.WITH_FLINT }}-${{ matrix.TEST_CLANG_FORMAT }}-${{ matrix.WITH_ECM }}-${{ matrix.WITH_LATEST_GCC }}-${{ matrix.WITH_FLINT_DEV }}-${{ matrix.WITH_COTIRE }}-${{ matrix.WITH_COVERAGE }}-${{ matrix.WITH_SANITIZE }}-${{ matrix.WITH_MPC }}-${{ matrix.BUILD_SHARED_LIBS }} | |
CCACHE_DIR: 'D:\a\_temp\msys\msys64\home\runneradmin\.ccache' | |
steps: | |
- name: Setup msys2 | |
uses: msys2/setup-msys2@v2 | |
if: matrix.MSYSTEM != '' | |
with: | |
msystem: ${{ matrix.MSYSTEM }} | |
update: true | |
install: mingw-w64-${{ matrix.ARCH }}-gcc mingw-w64-${{ matrix.ARCH }}-cmake mingw-w64-${{ matrix.ARCH }}-ccache python make git | |
- name: Set ccache dir | |
if: matrix.MSYSTEM == '' | |
run: echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV | |
- name: Cache ccache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ccache-${{ github.job }}-${{ env.OPTIONS }}-${{ runner.os }}-${{ github.sha }} | |
restore-keys: ccache-${{ github.job }}-${{ env.OPTIONS }}-${{ runner.os }}- | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Build and test symengine | |
shell: msys2 {0} | |
if: matrix.MSYSTEM != '' | |
run: | | |
source bin/test_symengine_unix.sh | |
- name: Build and test symengine | |
shell: bash | |
if: matrix.MSYSTEM == '' | |
run: | | |
source bin/test_symengine_unix.sh |