11name : workflow
22
3- on :
4- push :
5- branches :
6- - main
7- tags :
8- - v[0-9].[0-9]+.[0-9]+
9- pull_request :
10- branches :
11- - main
3+ on : push
124
135jobs :
146 build :
157 name : Install and build
168 runs-on : ${{ matrix.os }}
179 strategy :
1810 matrix :
19- os : ['ubuntu-latest', 'windows-latest', 'macos-latest']
20- python-version : ['3.7', '3.8']
11+ os : [ubuntu-latest, windows-latest, macos-latest]
12+ python-version : [3.7, 3.8]
13+ compas-version-specifier : [false]
14+ include :
15+ -
16+ os : windows-latest
17+ python-version : 3.7
18+ compas-version-specifier : ==0.17.2
2119
2220 steps :
2321 -
@@ -32,21 +30,25 @@ jobs:
3230
3331 -
3432 name : Install
33+ shell : bash
3534 run : |
3635 python -m pip install --upgrade pip
3736 python -m pip install wheel # https://stackoverflow.com/questions/34819221
3837 python -m pip install cython --install-option='--no-cython-compile'
38+ if [[ $COMPAS_VERSION_SPECIFIER != 'false' ]] ; then
39+ python -m pip install "compas$COMPAS_VERSION_SPECIFIER"
40+ fi
3941 python -m pip install --no-cache-dir -e .[dev]
42+ env :
43+ COMPAS_VERSION_SPECIFIER : ${{ matrix.compas-version-specifier }}
4044
4145 -
4246 name : Test
43- run : |
44- invoke test
47+ run : invoke test
4548
4649 -
4750 name : Build docs
48- run : |
49- invoke docs
51+ run : invoke docs
5052
5153 -
5254 name : Upload docs for other jobs
@@ -60,15 +62,22 @@ jobs:
6062
6163 -
6264 name : Build package
65+ run : invoke build
66+
67+ -
68+ name : Check if semver-tag
69+ id : check-tag
70+ shell : bash
6371 run : |
64- invoke build
72+ if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
73+ echo ::set-output name=match::true
74+ fi
6575
6676 -
6777 name : Upload package artifacts for other jobs
6878 uses : actions/upload-artifact@v2
6979 if : >-
70- github.event_name == 'push' &&
71- startsWith(github.ref, 'refs/tags') &&
80+ steps.check-tag.outputs.match == 'true' &&
7281 matrix.python-version == '3.8' &&
7382 matrix.os == 'ubuntu-latest'
7483 with :
0 commit comments