|
8 | 8 | strategy: |
9 | 9 | matrix: |
10 | 10 | os: [macOS-latest, ubuntu-22.04, windows-latest] |
11 | | - python-version: [3.9, '3.10', 3.11] |
| 11 | + python-version: [3.9, "3.10", 3.11, 3.12] |
12 | 12 | fail-fast: false |
13 | 13 | runs-on: ${{ matrix.os }} |
14 | 14 | steps: |
15 | | - - uses: actions/checkout@v1 |
16 | | - - name: Environment Variables |
17 | | - run: | |
18 | | - echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV |
19 | | - echo "CI_PACKAGE=colour" >> $GITHUB_ENV |
20 | | - echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV |
21 | | - echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV |
22 | | - echo "MPLBACKEND=AGG" >> $GITHUB_ENV |
23 | | - shell: bash |
24 | | - - name: Set up Python 3.9 for Pre-Commit |
25 | | - uses: actions/setup-python@v1 |
26 | | - with: |
27 | | - python-version: 3.9 |
28 | | - - name: Set up Python ${{ matrix.python-version }} |
29 | | - uses: actions/setup-python@v1 |
30 | | - with: |
31 | | - python-version: ${{ matrix.python-version }} |
32 | | - - name: Install Dependencies (Ubuntu) |
33 | | - if: matrix.os == 'ubuntu-22.04' |
34 | | - run: | |
35 | | - sudo apt-get update |
36 | | - sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev |
37 | | - - name: Install Poetry |
38 | | - env: |
39 | | - POETRY_VERSION: 1.4.0 |
40 | | - run: | |
41 | | - curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - |
42 | | - echo "$HOME/.poetry/bin" >> $GITHUB_PATH |
43 | | - shell: bash |
44 | | - - name: Install Package Dependencies (Ubuntu) |
45 | | - if: matrix.os == 'ubuntu-22.04' |
46 | | - run: | |
47 | | - poetry run python -m pip install --upgrade pip |
48 | | - poetry install |
49 | | - poetry run python -c "import imageio;imageio.plugins.freeimage.download()" |
50 | | - shell: bash |
51 | | - - name: Install Package Dependencies (macOS & Windows) |
52 | | - if: matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' |
53 | | - run: | |
54 | | - poetry run python -m pip install --upgrade pip |
55 | | - poetry install --without graphviz |
56 | | - poetry run python -c "import imageio;imageio.plugins.freeimage.download()" |
57 | | - shell: bash |
58 | | - - name: Install OpenImageIO (macOs) |
59 | | - if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11' |
60 | | - run: | |
61 | | - brew install openimageio |
62 | | - ls /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/ |
63 | | - ln -s /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/OpenImageIO*.so /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/lib/python${{ matrix.python-version }}/site-packages/OpenImageIO.so |
64 | | - shell: bash |
65 | | - - name: Pre-Commit (All Files) |
66 | | - run: | |
67 | | - poetry run pre-commit run --all-files |
68 | | - shell: bash |
69 | | - - name: Test Optimised Python Execution |
70 | | - run: | |
71 | | - poetry run python -OO -c "import $CI_PACKAGE" |
72 | | - shell: bash |
73 | | - - name: Test with Pytest |
74 | | - run: | |
75 | | - poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE |
76 | | - shell: bash |
77 | | - - name: Upload Coverage to coveralls.io |
78 | | - if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11' |
79 | | - run: | |
80 | | - if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi |
81 | | - shell: bash |
| 15 | + - uses: actions/checkout@v1 |
| 16 | + - name: Environment Variables |
| 17 | + run: | |
| 18 | + echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV |
| 19 | + echo "CI_PACKAGE=colour" >> $GITHUB_ENV |
| 20 | + echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV |
| 21 | + echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV |
| 22 | + echo "MPLBACKEND=AGG" >> $GITHUB_ENV |
| 23 | + shell: bash |
| 24 | + - name: Set up Python 3.9 for Pre-Commit |
| 25 | + uses: actions/setup-python@v4 |
| 26 | + with: |
| 27 | + python-version: 3.9 |
| 28 | + - name: Set up Python ${{ matrix.python-version }} |
| 29 | + uses: actions/setup-python@v4 |
| 30 | + with: |
| 31 | + python-version: ${{ matrix.python-version }} |
| 32 | + - name: Install Dependencies (Ubuntu) |
| 33 | + if: matrix.os == 'ubuntu-22.04' |
| 34 | + run: | |
| 35 | + sudo apt-get update |
| 36 | + sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev |
| 37 | + - name: Install Poetry |
| 38 | + env: |
| 39 | + POETRY_VERSION: 1.4.0 |
| 40 | + run: | |
| 41 | + curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - |
| 42 | + echo "$HOME/.poetry/bin" >> $GITHUB_PATH |
| 43 | + shell: bash |
| 44 | + - name: Install Package Dependencies (Ubuntu) |
| 45 | + if: matrix.os == 'ubuntu-22.04' |
| 46 | + run: | |
| 47 | + poetry run python -m pip install --upgrade pip |
| 48 | + poetry install |
| 49 | + poetry run python -c "import imageio;imageio.plugins.freeimage.download()" |
| 50 | + shell: bash |
| 51 | + - name: Install Package Dependencies (macOS & Windows) |
| 52 | + if: matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' |
| 53 | + run: | |
| 54 | + poetry run python -m pip install --upgrade pip |
| 55 | + poetry install --without graphviz |
| 56 | + poetry run python -c "import imageio;imageio.plugins.freeimage.download()" |
| 57 | + shell: bash |
| 58 | + - name: Install OpenImageIO (macOs) |
| 59 | + if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11' |
| 60 | + run: | |
| 61 | + brew install openimageio |
| 62 | + ls /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/ |
| 63 | + ln -s /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/OpenImageIO*.so /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/lib/python${{ matrix.python-version }}/site-packages/OpenImageIO.so |
| 64 | + shell: bash |
| 65 | + - name: Pre-Commit (All Files) |
| 66 | + run: | |
| 67 | + poetry run pre-commit run --all-files |
| 68 | + shell: bash |
| 69 | + - name: Test Optimised Python Execution |
| 70 | + run: | |
| 71 | + poetry run python -OO -c "import $CI_PACKAGE" |
| 72 | + shell: bash |
| 73 | + - name: Test with Pytest |
| 74 | + run: | |
| 75 | + poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE |
| 76 | + shell: bash |
| 77 | + - name: Upload Coverage to coveralls.io |
| 78 | + if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11' |
| 79 | + run: | |
| 80 | + if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi |
| 81 | + shell: bash |
0 commit comments