Skip to content

Commit

Permalink
Just test compilation on MSVC for windows (#44)
Browse files Browse the repository at this point in the history
* Give up on trying to get gcc and clang on windows

* will this work??

* it did not... will this??

* not really... maybe now????
  • Loading branch information
ewanwm authored Aug 15, 2024
1 parent eb5cca4 commit e15abe2
Showing 1 changed file with 18 additions and 8 deletions.
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/codecov-action@v4.0.1
with:
verbose: true
Expand Down

0 comments on commit e15abe2

Please sign in to comment.