7
7
name : Unix Build
8
8
strategy :
9
9
matrix :
10
- # os: [ubuntu-18.04, macOS-10.14]
11
- # python-version: [3.6, 3.7]
12
- os : [ubuntu-18.04]
13
- python-version : [3.6]
10
+ os : [ubuntu-18.04, macOS-10.14]
11
+ python-version : [3.6, 3.7]
14
12
runs-on : ${{ matrix.os }}
15
13
steps :
16
14
- uses : actions/checkout@v1
37
35
uses : actions/setup-python@v1
38
36
with :
39
37
python-version : ${{ matrix.python-version }}
40
- # TODO: Remove when "colour-science-0.3.13" is released.
41
- - name : Ubuntu - Update OS & Install APT Dependencies
42
- if : matrix.os == 'ubuntu-18.04'
43
- run : |
44
- sudo apt-get update
45
- sudo apt-get --yes install libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
46
- # - name: Ubuntu - Set up Matplotlib Backend
47
- # if: matrix.os == 'ubuntu-18.04'
48
- # run: |
49
- # mkdir -p ~/.config/matplotlib
50
- # echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc
51
- # - name: macOS - Set up Matplotlib Backend
52
- # if: matrix.os == 'macOS-10.14'
53
- # run: |
54
- # mkdir -p ~/.matplotlib
55
- # echo "backend: Agg" > ~/.matplotlib/matplotlibrc
56
38
- name : Install Poetry
57
39
run : |
58
40
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
62
44
- name : Install Package Dependencies
63
45
run : |
64
46
poetry install
65
- poetry env use $CI_PYTHON_VERSION
66
47
source $(poetry env info -p)/bin/activate
67
48
python -c "import imageio;imageio.plugins.freeimage.download()"
68
- # TODO: Remove when "colour-science-0.3.13" is released.
69
- - name : Ubuntu - Install OpenImageIO
70
- if : matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.6'
71
- run : |
72
- curl -L https://github.com/colour-science/artifacts/suites/233020849/artifacts/44967 -o OpenImageIO-Release-2.0.10.zip
73
- unzip OpenImageIO-Release-2.0.10.zip
74
- sudo cp OpenImageIO-Release-2.0.10/linux64/bin/* /usr/bin/
75
- sudo cp -r OpenImageIO-Release-2.0.10/linux64/lib/* /usr/lib/
76
- sudo rm -rf /usr/lib/python3.6
77
- cp OpenImageIO-Release-2.0.10/linux64/lib/python3.6/site-packages/OpenImageIO.so $(poetry env info -p)/lib/python3.6/site-packages/
78
49
- name : Lint with flake8
79
50
run : |
80
51
source $(poetry env info -p)/bin/activate
@@ -93,73 +64,73 @@ jobs:
93
64
run : |
94
65
if [ "${{ job.status }}" == "Success" ]; then CI_SLACK_NOTIFICATION="$CI_SLACK_SUCCESS_NOTIFICATION"; else CI_SLACK_NOTIFICATION="$CI_SLACK_FAILURE_NOTIFICATION"; fi
95
66
if [ -z "$CI_SLACK_WEBHOOK" ]; then echo \"SLACK_WEBHOOK\" secret is undefined!; else curl -k -d "$CI_SLACK_NOTIFICATION" -X POST $CI_SLACK_WEBHOOK; fi
96
- # windows-build:
97
- # name: Windows Build
98
- # strategy:
99
- # matrix:
100
- # os: [windows-2019]
101
- # python-version: [3.6, 3.7]
102
- # runs-on: ${{ matrix.os }}
103
- # steps:
104
- # - uses: actions/checkout@v1
105
- # with:
106
- # submodules: true
107
- # - name: Environment Variables
108
- # run: |
109
- # set CI_PYTHON_VERSION=${{ matrix.python-version }}
110
- # set CI_PACKAGE=colour_checker_detection
111
- # set CI_SHA=${{ github.sha }}
112
- # set CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
113
- # set CI_SLACK_SUCCESS_NOTIFICATION="payload={\"attachments\": [{\"color\": \"#4CAF50\", \"author_name\": \"Python ${{ matrix.python-version }} build on ${{ matrix.os }}\", \"text\": \"Build for commit *"%CI_SHA:~0,7%"* succeeded!\", \"title\": \"${{ github.repository }}@${{ github.ref }}\", \"title_link\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks\", \"footer\": \"Triggered by ${{ github.actor }}\"}], \"username\":\"Github Actions @ ${{ github.repository }}\", \"channel\":\"#continuous-integration\", \"icon_url\":\"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png\"}"
114
- # set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION:4CAF50=F44336%
115
- # set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION:succeeded=failed%
116
- # set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
117
- # echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
118
- # echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
119
- # echo ::set-env name=CI_SHA::%CI_SHA%
120
- # echo ::set-env name=CI_SLACK_WEBHOOK::%CI_SLACK_WEBHOOK%
121
- # echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::%CI_SLACK_SUCCESS_NOTIFICATION%
122
- # echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::%CI_SLACK_FAILURE_NOTIFICATION%
123
- # echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
124
- # shell: cmd
125
- # - name: Set up Python ${{ matrix.python-version }}
126
- # uses: actions/setup-python@v1
127
- # with:
128
- # python-version: ${{ matrix.python-version }}
129
- # - name: Install Poetry
130
- # run: |
131
- # curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
132
- # python get-poetry.py --preview
133
- # set PATH=%USERPROFILE%\.poetry\bin;%PATH%
134
- # echo ::set-env name=PATH::%PATH%
135
- # shell: cmd
136
- # - name: Install Package Dependencies
137
- # run: |
138
- # call poetry install
139
- # FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
140
- # echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
141
- # call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
142
- # python -c "import imageio;imageio.plugins.freeimage.download()"
143
- # shell: cmd
144
- # - name: Lint with flake8
145
- # run: |
146
- # call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
147
- # flake8 %CI_PACKAGE% --count --show-source --statistics
148
- # shell: cmd
149
- # - name: Test with nosetests
150
- # run: |
151
- # call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
152
- # python -W ignore -m nose -v --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
153
- # shell: cmd
154
- # - name: Upload Coverage to coveralls.io
155
- # if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
156
- # run: |
157
- # call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
158
- # IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
159
- # shell: cmd
160
- # - name: Notify Slack
161
- # if: always()
162
- # run: |
163
- # IF "${{ job.status }}"=="Success" (set CI_SLACK_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION%) ELSE (set CI_SLACK_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION%)
164
- # IF "%CI_SLACK_WEBHOOK%"=="" (echo "SLACK_WEBHOOK" secret is undefined!) ELSE (curl -k -d %CI_SLACK_NOTIFICATION% -X POST %CI_SLACK_WEBHOOK%)
165
- # shell: cmd
67
+ windows-build :
68
+ name : Windows Build
69
+ strategy :
70
+ matrix :
71
+ os : [windows-2019]
72
+ python-version : [3.6, 3.7]
73
+ runs-on : ${{ matrix.os }}
74
+ steps :
75
+ - uses : actions/checkout@v1
76
+ with :
77
+ submodules : true
78
+ - name : Environment Variables
79
+ run : |
80
+ set CI_PYTHON_VERSION=${{ matrix.python-version }}
81
+ set CI_PACKAGE=colour_checker_detection
82
+ set CI_SHA=${{ github.sha }}
83
+ set CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
84
+ set CI_SLACK_SUCCESS_NOTIFICATION="payload={\"attachments\": [{\"color\": \"#4CAF50\", \"author_name\": \"Python ${{ matrix.python-version }} build on ${{ matrix.os }}\", \"text\": \"Build for commit *"%CI_SHA:~0,7%"* succeeded!\", \"title\": \"${{ github.repository }}@${{ github.ref }}\", \"title_link\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks\", \"footer\": \"Triggered by ${{ github.actor }}\"}], \"username\":\"Github Actions @ ${{ github.repository }}\", \"channel\":\"#continuous-integration\", \"icon_url\":\"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png\"}"
85
+ set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION:4CAF50=F44336%
86
+ set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION:succeeded=failed%
87
+ set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
88
+ echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
89
+ echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
90
+ echo ::set-env name=CI_SHA::%CI_SHA%
91
+ echo ::set-env name=CI_SLACK_WEBHOOK::%CI_SLACK_WEBHOOK%
92
+ echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::%CI_SLACK_SUCCESS_NOTIFICATION%
93
+ echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::%CI_SLACK_FAILURE_NOTIFICATION%
94
+ echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
95
+ shell : cmd
96
+ - name : Set up Python ${{ matrix.python-version }}
97
+ uses : actions/setup-python@v1
98
+ with :
99
+ python-version : ${{ matrix.python-version }}
100
+ - name : Install Poetry
101
+ run : |
102
+ curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
103
+ python get-poetry.py --preview
104
+ set PATH=%USERPROFILE%\.poetry\bin;%PATH%
105
+ echo ::set-env name=PATH::%PATH%
106
+ shell : cmd
107
+ - name : Install Package Dependencies
108
+ run : |
109
+ call poetry install
110
+ FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
111
+ echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
112
+ call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
113
+ python -c "import imageio;imageio.plugins.freeimage.download()"
114
+ shell : cmd
115
+ - name : Lint with flake8
116
+ run : |
117
+ call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
118
+ flake8 %CI_PACKAGE% --count --show-source --statistics
119
+ shell : cmd
120
+ - name : Test with nosetests
121
+ run : |
122
+ call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
123
+ python -W ignore -m nose -v --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
124
+ shell : cmd
125
+ - name : Upload Coverage to coveralls.io
126
+ if : matrix.python-version == '3.6' || matrix.python-version == '3.7'
127
+ run : |
128
+ call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
129
+ IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
130
+ shell : cmd
131
+ - name : Notify Slack
132
+ if : always()
133
+ run : |
134
+ IF "${{ job.status }}"=="Success" (set CI_SLACK_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION%) ELSE (set CI_SLACK_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION%)
135
+ IF "%CI_SLACK_WEBHOOK%"=="" (echo "SLACK_WEBHOOK" secret is undefined!) ELSE (curl -k -d %CI_SLACK_NOTIFICATION% -X POST %CI_SLACK_WEBHOOK%)
136
+ shell : cmd
0 commit comments