Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jibsen committed Nov 1, 2023
1 parent 0700514 commit 66619c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/scv-ci-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ on: [push, pull_request]
jobs:
windows:
name: Windows ${{ matrix.config.name }}
runs-on: windows-latest
runs-on: windows-2022

strategy:
matrix:
config:
- name: MSVC x64
generator: Visual Studio 16 2019
generator: Visual Studio 17 2022
cmake-flags: -A x64

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Configure
run: cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.cmake-flags }} -B build
Expand Down Expand Up @@ -44,13 +44,13 @@ jobs:
cmake-flags: -DCMAKE_C_FLAGS_DEBUG='-O1 -g -fsanitize=address -fno-omit-frame-pointer'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Configure
run: cmake ${{ matrix.config.cmake-flags }} -DCMAKE_BUILD_TYPE=Debug -B build

- name: Build
run: cd build && make VERBOSE=1
run: cd build && cmake --build . --verbose

- name: Test
run: cd build && ctest -V --output-on-failure --interactive-debug-mode 0
Expand All @@ -60,13 +60,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Configure
run: cmake -DCMAKE_C_FLAGS_DEBUG='-g -O0 --coverage' -DCMAKE_BUILD_TYPE=Debug -B build

- name: Build
run: cd build && make VERBOSE=1
run: cd build && cmake --build . --verbose

- name: Test
run: cd build && ctest -V --output-on-failure --interactive-debug-mode 0
Expand All @@ -75,6 +75,6 @@ jobs:
run: cd build && gcov -b CMakeFiles/scv.dir/scv.c.gcno -o CMakeFiles/scv.dir

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ./build/scv.c.gcov
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(CTest)

if(MSVC)
add_compile_options(/W3)
else()
elseif(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -Wextra -pedantic)
endif()

Expand All @@ -16,6 +16,9 @@ target_include_directories(scv PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR
if(BUILD_TESTING)
add_executable(test_scv test/test_scv.c)
target_link_libraries(test_scv PRIVATE scv)
if(MSVC)
target_compile_definitions(test_scv PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()

add_test(test_scv test_scv)
endif()

0 comments on commit 66619c1

Please sign in to comment.