Skip to content

Commit d16f2ba

Browse files
committed
* Fixing issue with reporting of job success and differentiation of badges.
1 parent 3488b22 commit d16f2ba

6 files changed

Lines changed: 106 additions & 97 deletions

File tree

‎.github/workflows/clang.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Clang Build/Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
clang:
11+
uses: ./.github/workflows/cmake-reusable.yml
12+
with:
13+
os: ubuntu-latest
14+
c_compiler: clang
15+
cxx_compiler: clang++
16+
build_dir_name: build-clang

‎.github/workflows/cmake-multi-platform.yml‎

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Reusable CMake Build and Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
c_compiler:
10+
required: true
11+
type: string
12+
cxx_compiler:
13+
required: true
14+
type: string
15+
build_dir_name:
16+
required: true
17+
type: string
18+
19+
jobs:
20+
build-and-test:
21+
runs-on: ${{ inputs.os }}
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set reusable strings
27+
id: strings
28+
shell: bash
29+
run: |
30+
echo "build-output-dir=${{ github.workspace }}/${{ inputs.build_dir_name }}" >> "$GITHUB_OUTPUT"
31+
32+
- name: Configure CMake
33+
run: >
34+
cmake
35+
-B ${{ steps.strings.outputs.build-output-dir }}
36+
-DCMAKE_C_COMPILER=${{ inputs.c_compiler }}
37+
-DCMAKE_CXX_COMPILER=${{ inputs.cxx_compiler }}
38+
-DCMAKE_BUILD_TYPE=Release
39+
-S ${{ github.workspace }}
40+
41+
- name: Build
42+
run: >
43+
cmake
44+
--build ${{ steps.strings.outputs.build-output-dir }}
45+
--config Release
46+
47+
- name: Test
48+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
49+
run: >
50+
ctest
51+
--build-config Release
52+
--output-on-failure

‎.github/workflows/gcc.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: GCC Build/Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
gcc:
11+
uses: ./.github/workflows/cmake-reusable.yml
12+
with:
13+
os: ubuntu-latest
14+
c_compiler: gcc
15+
cxx_compiler: g++
16+
build_dir_name: build-gcc

‎.github/workflows/msvc.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MSVC Build/Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
msvc:
11+
uses: ./.github/workflows/cmake-reusable.yml
12+
with:
13+
os: windows-latest
14+
c_compiler: cl
15+
cxx_compiler: cl
16+
build_dir_name: build-msvc

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# **fuzzy_cpp**
2-
[![GCC](https://github.com/benmccart/fuzzy_cpp/actions/workflows/cmake-multi-platform.yml/badge.svg?branch=main&job=GCC)](
3-
https://github.com/benmccart/fuzzy_cpp/actions/workflows/cmake-multi-platform.yml
2+
[![GCC](https://github.com/benmccart/fuzzy_cpp/actions/workflows/gcc.yml/badge.svg?branch=main)](
3+
https://github.com/benmccart/fuzzy_cpp/actions/workflows/gcc.yml
44
)
5-
[![Clang](https://github.com/benmccart/fuzzy_cpp/actions/workflows/cmake-multi-platform.yml/badge.svg?branch=main&job=Clang)](
6-
https://github.com/benmccart/fuzzy_cpp/actions/workflows/cmake-multi-platform.yml
5+
[![Clang](https://github.com/benmccart/fuzzy_cpp/actions/workflows/clang.yml/badge.svg?branch=main)](
6+
https://github.com/benmccart/fuzzy_cpp/actions/workflows/clang.yml
77
)
8-
[![MSVC](https://github.com/benmccart/fuzzy_cpp/actions/workflows/cmake-multi-platform.yml/badge.svg?branch=main&job=MSVC)](
9-
https://github.com/benmccart/fuzzy_cpp/actions/workflows/cmake-multi-platform.yml
8+
[![MSVC](https://github.com/benmccart/fuzzy_cpp/actions/workflows/msvc.yml/badge.svg?branch=main)](
9+
https://github.com/benmccart/fuzzy_cpp/actions/workflows/msvc.yml
1010
)
1111

1212
A header only C++ library for use in a number of problem domains. Applications include control systems, simulations, or any other problem domain where a solution can be modeled with linguistic rules by a domain expert. The library is modeled after fundamental concepts presented in _FUZZY LOGIC : Intelligence, Control, and Information_ by John Yen and Reza Langari.

0 commit comments

Comments
 (0)