Skip to content

Commit

Permalink
Add windows ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tao558 committed Mar 19, 2021
1 parent aa5920c commit 3dd7ba6
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down

0 comments on commit 3dd7ba6

Please sign in to comment.