Merge pull request #22 from SGSSGene/fix/improve_construction2 #209
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: "Linux and MacOS" | |
on: | |
push: | |
branches: | |
# Push events to branches matching refs/heads/master | |
- 'main' | |
pull_request: | |
concurrency: | |
group: ${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
TZ: Europe/Berlin | |
jobs: | |
build: | |
name: ${{ matrix.os }} / ${{ matrix.compiler }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
osname: ["MacOS 11", "Ubuntu 22.04"] | |
compiler: ["gcc13 (c++20)", "gcc12 (c++20)", "gcc11 (c++20)", "gcc13 (c++20, Debug)", "clang14"] | |
include: | |
- osname: "Ubuntu 22.04" | |
os: ubuntu-22.04 | |
cmake_flags: "" | |
threads: 2 | |
- osname: "MacOS 11" | |
os: macos-11 | |
cmake_flags: "-DFMC_USE_SDSL=NO" | |
threads: 3 | |
- compiler: "gcc13 (c++20)" | |
cxx: "g++-13" | |
cc: "gcc-13" | |
build_type: Release | |
brew_pkgs: gcc@13 | |
- compiler: "gcc12 (c++20)" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
build_type: Release | |
brew_pkgs: gcc@12 | |
- compiler: "gcc11 (c++20)" | |
cxx: "g++-11" | |
cc: "gcc-11" | |
build_type: Release | |
brew_pkgs: gcc@11 | |
- compiler: "gcc13 (c++20, Debug)" | |
cxx: "g++-13" | |
cc: "gcc-13" | |
build_type: Debug | |
brew_pkgs: gcc@13 | |
- compiler: "clang14" | |
cxx: "clang++-14" | |
cc: "clang-14" | |
build_type: Release | |
brew_pkgs: llvm@14 | |
exclude: | |
- osname: "MacOS 11" | |
compiler: "clang14" | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
path: fmc | |
fetch-depth: 1 | |
- name: Install Tools on Mac | |
run: | | |
touch ${HOME}/.activate_brew | |
brew update-reset | |
brew install --force-bottle --overwrite fmt boost cmake ${{ matrix.brew_pkgs }} pkg-config | |
if: matrix.osname == 'MacOS 11' | |
- name: Install Tools on Ubuntu | |
run: | | |
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ${HOME}/.activate_brew | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
sudo apt-get update -y | |
sudo apt-get install -y build-essential | |
brew install --force-bottle fmt boost cmake ${{ matrix.brew_pkgs }} pkg-config | |
${{ matrix.cxx }} --version | |
if: matrix.osname == 'Ubuntu 22.04' | |
- name: Tool versions | |
run: | | |
source ${HOME}/.activate_brew | |
cmake --version | |
${{ matrix.cxx }} --version | |
- name: Configure tests | |
env: | |
CXX: ${{ matrix.cxx }} | |
CC: ${{ matrix.cc }} | |
run: | | |
source ${HOME}/.activate_brew | |
mkdir fmc-build | |
cd fmc-build | |
cmake ../fmc -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_flags }} | |
- name: Build tests | |
run: | | |
source ${HOME}/.activate_brew | |
cd fmc-build | |
make -k -j2 | |
- name: Run tests | |
run: | | |
source ${HOME}/.activate_brew | |
cd fmc-build | |
ctest . -j ${{ matrix.threads }} --output-on-failure |