|
1 | 1 | on: [push, pull_request]
|
2 | 2 | jobs:
|
3 |
| - test: |
4 |
| - runs-on: ubuntu-18.04 |
| 3 | + tests: |
| 4 | + name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}-python-${{ matrix.python-version }}-${{ matrix.castxml-epic }} |
| 5 | + runs-on: ${{ matrix.os }} |
| 6 | + |
5 | 7 | strategy:
|
| 8 | + fail-fast: false |
6 | 9 | matrix:
|
7 |
| - python-version: [3.5, 3.6, 3.7, 3.8] |
8 |
| - env: |
9 |
| - XML_GENERATOR: castxml |
10 |
| - CPPSTD: -std=c++98 |
| 10 | + include: |
| 11 | + - os: ubuntu-18.04 |
| 12 | + compiler: gcc |
| 13 | + version: "7" |
| 14 | + python-version: 3.5 |
| 15 | + castxml: "castxml" |
| 16 | + castxml-epic: 0 |
| 17 | + cppstd: "-std=c++98" |
| 18 | + |
| 19 | + - os: ubuntu-18.04 |
| 20 | + compiler: gcc |
| 21 | + version: "7" |
| 22 | + python-version: 3.6 |
| 23 | + castxml: "castxml" |
| 24 | + castxml-epic: 0 |
| 25 | + cppstd: "-std=c++98" |
| 26 | + |
| 27 | + - os: ubuntu-18.04 |
| 28 | + compiler: gcc |
| 29 | + version: "7" |
| 30 | + python-version: 3.7 |
| 31 | + castxml: "castxml" |
| 32 | + castxml-epic: 0 |
| 33 | + cppstd: "-std=c++98" |
| 34 | + |
| 35 | + - os: ubuntu-18.04 |
| 36 | + compiler: gcc |
| 37 | + version: "7" |
| 38 | + python-version: 3.8 |
| 39 | + castxml: "castxml" |
| 40 | + castxml-epic: 0 |
| 41 | + cppstd: "-std=c++98" |
| 42 | + |
| 43 | + - os: ubuntu-18.04 |
| 44 | + compiler: gcc |
| 45 | + version: "7" |
| 46 | + python-version: 3.8 |
| 47 | + castxml: "castxml" |
| 48 | + castxml-epic: 1 |
| 49 | + cppstd: "-std=c++98" |
| 50 | + |
| 51 | + - os: ubuntu-18.04 |
| 52 | + compiler: gcc |
| 53 | + version: "7" |
| 54 | + python-version: 3.8 |
| 55 | + castxml: "castxml" |
| 56 | + castxml-epic: 1 |
| 57 | + cppstd: "-std=c++11" |
| 58 | + |
| 59 | + - os: macos-latest |
| 60 | + compiler: xcode |
| 61 | + version: "default" |
| 62 | + python-version: 3.8 |
| 63 | + castxml: "castxml" |
| 64 | + castxml-epic: 0 |
| 65 | + cppstd: "-std=c++98" |
| 66 | + |
11 | 67 | steps:
|
12 |
| - - uses: actions/checkout@v2 |
13 |
| - - name: Set up Python ${{ matrix.python-version }} |
14 |
| - uses: actions/setup-python@v1 |
15 |
| - with: |
16 |
| - python-version: ${{ matrix.python-version }} |
17 |
| - # You can test your matrix by printing the current Python version |
18 |
| - - name: Display Python version |
19 |
| - run: python -c "import sys; print(sys.version)" |
20 |
| - - name: Setup castxml |
21 |
| - run: | |
22 |
| - wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/f43ef30267c850872cf1e8ea8594c5dc6a1beb7c343d63875662ee7c648dac4f9214c915499ef2e1148f2b5f866e4c518ca1a21fb5055baba7d62f4f69097ba0/download | tar zxf - -C ~/ |
23 |
| - - name: Setup Python test libs |
24 |
| - run: | |
25 |
| - pip install coveralls |
26 |
| - pip install coverage |
27 |
| - pip install pycodestyle |
28 |
| - - name: Run tests |
29 |
| - run: | |
30 |
| - export PATH=~/castxml/bin:$PATH |
31 |
| - python setup.py install |
32 |
| - coverage run -m unittests.test_all |
33 |
| - coverage combine |
34 |
| - - name: Upload coverage to Codecov |
35 |
| - uses: codecov/codecov-action@v1 |
36 |
| - with: |
37 |
| - token: ${{ secrets.CODECOV_TOKEN }} |
38 |
| - file: .coverage |
39 |
| - flags: unittests |
40 |
| - env_vars: OS,PYTHON |
41 |
| - name: codecov-umbrella |
42 |
| - fail_ci_if_error: true |
| 68 | + - uses: actions/checkout@v2 |
| 69 | + - name: Set up Python ${{ matrix.python-version }} |
| 70 | + uses: actions/setup-python@v1 |
| 71 | + with: |
| 72 | + python-version: ${{ matrix.python-version }} |
| 73 | + - name: Display Python version |
| 74 | + run: python -c "import sys; print(sys.version)" |
| 75 | + - name: Setup castxml for Linux |
| 76 | + if: matrix.os == 'ubuntu-18.04' && matrix.castxml == 'castxml' |
| 77 | + run: | |
| 78 | + wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/f43ef30267c850872cf1e8ea8594c5dc6a1beb7c343d63875662ee7c648dac4f9214c915499ef2e1148f2b5f866e4c518ca1a21fb5055baba7d62f4f69097ba0/download | tar zxf - -C ~/ |
| 79 | + - name: Setup castxml for Mac |
| 80 | + if: matrix.os == 'macos-latest' |
| 81 | + run: | |
| 82 | + wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/88c9b5954ca7417f7b519f3006dc6fe4bd194af0837168edc30007a41eaae6d4eee97cef2a72747432af14941c7f60333b77c25e208b2540dcde2d61e0d0e6f3/download | tar zxf - -C ~/ |
| 83 | + - name: Setup castxml config |
| 84 | + if: matrix.compiler == 'gcc' && matrix.version == '7' |
| 85 | + run: mv unittests/configs/gcc7.cfg unittests/xml_generator.cfg; |
| 86 | + - name: Setup Python test libs |
| 87 | + run: | |
| 88 | + pip install coveralls |
| 89 | + pip install coverage |
| 90 | + pip install pycodestyle |
| 91 | + - name: Run tests |
| 92 | + run: | |
| 93 | + export PATH=~/castxml/bin:$PATH |
| 94 | + python setup.py install |
| 95 | + coverage run -m unittests.test_all |
| 96 | + coverage combine |
| 97 | + - name: Upload coverage to Codecov |
| 98 | + uses: codecov/codecov-action@v1 |
| 99 | + with: |
| 100 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 101 | + file: .coverage |
| 102 | + flags: unittests |
| 103 | + env_vars: OS,PYTHON |
| 104 | + name: codecov-umbrella |
| 105 | + fail_ci_if_error: true |
0 commit comments