Skip to content

[MIN] CFD_API static >= C99 #38

[MIN] CFD_API static >= C99

[MIN] CFD_API static >= C99 #38

name: Compile and Run cfd.h tests
on: [push, pull_request]
jobs:
ubuntu:
strategy:
matrix:
cc: [gcc, clang]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt update && sudo apt install -y ${{ matrix.cc }}
- name: Compile cfd tests
run: ${{ matrix.cc }} -O2 -std=c89 -pedantic -Wall -Wextra -Werror -Wvla -Wconversion -Wdouble-promotion -Wsign-conversion -Wuninitialized -Winit-self -Wunused -Wunused-macros -Wunused-local-typedefs -o cfd_test_${{ matrix.cc }} tests/cfd_test.c
- name: Run cfd tests
run: ./cfd_test_${{ matrix.cc }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ubuntu-latest-${{ matrix.cc }}-cfd_test
path: cfd_test_${{ matrix.cc }}
macos:
strategy:
matrix:
cc: [clang]
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Compile cfd tests
run: ${{ matrix.cc }} -O2 -std=c89 -pedantic -Wall -Wextra -Werror -Wvla -Wconversion -Wdouble-promotion -Wsign-conversion -Wuninitialized -Winit-self -Wunused -Wunused-macros -Wunused-local-typedefs -o cfd_test_${{ matrix.cc }} tests/cfd_test.c
- name: Run cfd tests
run: ./cfd_test_${{ matrix.cc }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: macos-latest-${{ matrix.cc }}-cfd_test
path: cfd_test_${{ matrix.cc }}
windows:
strategy:
matrix:
cc: [gcc, clang]
os: [windows-latest, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Compile cfd tests
run: ${{ matrix.cc }} -O2 -std=c89 -pedantic -Wall -Wextra -Werror -Wvla -Wconversion -Wdouble-promotion -Wsign-conversion -Wuninitialized -Winit-self -Wunused -Wunused-macros -Wunused-local-typedefs -D_CRT_SECURE_NO_WARNINGS -o cfd_test_${{ matrix.cc }}.exe tests/cfd_test.c
- name: Run cfd tests
run: .\cfd_test_${{ matrix.cc }}.exe
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.cc }}-cfd_test
path: cfd_test_${{ matrix.cc }}.exe