diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc68b408..6689982c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,9 @@ jobs: tests: name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}-python-${{ matrix.python-version }}-${{ matrix.castxml-epic }} runs-on: ${{ matrix.os }} - + defaults: + run: + shell: bash strategy: fail-fast: false matrix: @@ -64,6 +66,14 @@ jobs: castxml-epic: 0 cppstd: "-std=c++98" + - os: windows-latest + compiler: gcc + version: "7" + python-version: 3.8 + castxml: "castxml" + castxml-epic: 0 + cppstd: "-std=c++98" + steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -80,18 +90,30 @@ jobs: if: matrix.os == 'macos-latest' run: | wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/5d937e938f7b882a3a3e7941e68f8312d0898aaf2082e00003dd362b1ba70b98b0a08706a1be28e71652a6a0f1e66f89768b5eaa20e5a100592d5b3deefec3f0/download | tar zxf - -C ~/ + - name: Setup castxml for Windows + if: matrix.os == 'windows-latest' + run: | + curl https://data.kitware.com/api/v1/file/hashsum/sha512/bdd1e2c3b203019f758681067bb4dd68cb37abc930fee6b4b5d181bd805236352f888d061f32c7f93bde2eac2caa1265b93bbccff6656f98989dafd08f55847b/download --output C:\castxml.zip - name: Setup castxml config - if: matrix.compiler == 'gcc' && matrix.version == '7' + if: matrix.compiler == 'gcc' && matrix.version == '7' && matrix.os != 'windows-latest' run: mv unittests/configs/gcc7.cfg unittests/xml_generator.cfg; - name: Install Python lib and test libs run: | pip install .[test] - - name: Run tests + - name: Run tests for Mac and Linux + if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-18.04' run: | export PATH=~/castxml/bin:$PATH coverage run -m unittests.test_all coverage combine coverage xml + - name: Run tests for Windows + if: matrix.os == 'windows-latest' + run: | + export PATH="C:\castxml\bin;$PATH" + coverage run -m unittests.test_all + coverage combine + coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: