Added library example for double arrays #46
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: | |
- .clang-format | |
- CMakeLists.txt | |
- cmake/** | |
- src/** | |
pull_request: | |
branches: [ "main" ] | |
types: [synchronize, opened, reopened, ready_for_review] | |
paths: | |
- .clang-format | |
- CMakeLists.txt | |
- cmake/** | |
- src/** | |
concurrency: | |
group: Build-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
check_formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install clang-format | |
run: sudo apt-get update && sudo apt-get -qqy install clang-format | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check Formatting | |
run: find src -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\)$' | xargs clang-format -n -Werror | |
build: | |
needs: check_formatting | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
build_type: [Debug, Release] | |
runs-on: ${{ matrix.os }} | |
env: | |
BUILD_DIR: ${{github.workspace}}/build-${{ matrix.build_type }} | |
CMAKE_BUILD_TYPE: ${{ matrix.build_type }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure | |
run: cmake -B "${{github.workspace}}/build-${{ matrix.build_type }}" | |
- name: Build | |
run: cmake --build "${{github.workspace}}/build-${{ matrix.build_type }}" --config ${{ matrix.build_type }} | |
- name: Test | |
working-directory: ${{github.workspace}}/build-${{ matrix.build_type }} | |
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure |