Skip to content

Commit

Permalink
CI: clean up configuration file, add badge to README
Browse files Browse the repository at this point in the history
  • Loading branch information
fkutzner committed Apr 14, 2024
1 parent 20f97af commit a2811bf
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 77 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Builds and tests

on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false

matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc-13, clang-15, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc-13
cpp_compiler: g++-13
- os: ubuntu-latest
c_compiler: clang-15
cpp_compiler: clang++-15
exclude:
- os: windows-latest
c_compiler: gcc-13
- os: windows-latest
c_compiler: clang-15
- os: ubuntu-latest
c_compiler: cl

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
77 changes: 0 additions & 77 deletions .github/workflows/cmake-multi-platform.yml

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Builds and tests](https://github.com/ipasir2/ipasir2-cpp/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/ipasir2/ipasir2-cpp/actions/workflows/cmake-multi-platform.yml)

# ipasir2-cpp

C++ porcelain for IPASIR-2
Expand Down

0 comments on commit a2811bf

Please sign in to comment.