Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just test compilation on MSVC for windows #44

Merged
merged 4 commits into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .github/workflows/CI-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,26 @@ jobs:
strategy:
fail-fast: false
matrix:
OS: [ ubuntu-latest, windows-latest ]
compiler: [ {cpp: g++, c: gcc}, {cpp: clang++, c: clang} ]

name: Build & Test ${{ matrix.os }} ${{ matrix.compiler.c }}
include:
- OS: ubuntu-latest
cpp_compiler: g++
c_compiler: gcc

- OS: ubuntu-latest
cpp_compiler: clang++
c_compiler: clang

- OS: windows-latest
cpp_compiler: cl
c_compiler: cl

name: Build & Test ${{ matrix.os }} ${{ matrix.c_compiler }}

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

env:
CC: ${{ matrix.compiler.c }}
CXX: ${{ matrix.compiler.cpp }}
CC: ${{ matrix.c_compiler }}
CXX: ${{ matrix.cpp_compiler }}

steps:
# this Action should follow steps to set up Python build environment
Expand Down Expand Up @@ -83,13 +93,13 @@ jobs:

- name: Generate Coverage Report
# only need to do this for one combination of OS and compiler
if: ${{ matrix.OS == 'ubuntu-latest' && matrix.compiler.c == 'gcc' }}
if: ${{ matrix.OS == 'ubuntu-latest' && matrix.c_compiler == 'gcc' }}
working-directory: ${{github.workspace}}/build
run: gcovr --json -o nuTens_coverage.json -r .. -f "../nuTens/*"

- name: Upload coverage reports to Codecov
# only need to do this for one combination of OS and compiler
if: ${{ matrix.OS == 'ubuntu-latest' && matrix.compiler.c == 'gcc' }}
if: ${{ matrix.OS == 'ubuntu-latest' && matrix.c_compiler == 'gcc' }}
uses: codecov/[email protected]
with:
verbose: true
Expand Down
Loading