Skip to content

Allow disabling use of float and double (#53) #142

Allow disabling use of float and double (#53)

Allow disabling use of float and double (#53) #142

Workflow file for this run

name: CMake
on:
push:
branches:
- main
- 'releases/**'
pull_request:
jobs:
build:
strategy:
matrix:
runs-on: ['ubuntu-latest']
cxx: ['g++', 'clang++']
config: ['DEBUG', 'RELEASE']
cxxflags: ['-Wall -Werror -pedantic']
cmake-defines: ['']
include:
- runs-on: 'ubuntu-latest'
cxx: 'g++'
config: 'DEBUG'
cxxflags: '-Wall -Werror -pedantic'
cmake-defines: '-DNANOFMT_FLOAT=OFF'
- runs-on: 'windows-latest'
cxx: cl.exe
config: 'DEBUG'
cxxflags: /W4 /WX
- runs-on: 'windows-latest'
cxx: cl.exe
config: 'RELEASE'
cxxflags: /W4 /WX
runs-on: ${{ matrix.runs-on }}
name: Build (${{ matrix.cxx }}, ${{ matrix.config }})
steps:
- uses: actions/checkout@v2
- name: Configure
env:
CXX: ${{ matrix.cxx }}
CXXFLAGS: ${{ matrix.cxxflags }}
run: cmake -B ${{ github.workspace }}/build ${{ matrix.cmake-defines }} -DCMAKE_BUILD_TYPE=${{ matrix.config }}
- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.config }}
- name: Test
working-directory: ${{ github.workspace }}/build
run: ctest --no-tests=error -C ${{ matrix.config }}
- name: Install
working-directory: ${{ github.workspace }}/build
if: ${{ matrix.config }} == 'RELEASE'
run: cmake --install ${{ github.workspace }}/build --prefix ${{ github.workspace }}/install --config ${{ matrix.config }}
- name: Archive
uses: actions/upload-artifact@v2
if: ${{ matrix.config }} == 'RELEASE'
with:
name: build-${{ matrix.compiler }}
path: ${{ github.workspace }}/install