@@ -26,14 +26,17 @@ concurrency:
2626 group : ${{ github.workflow }}-${{ github.ref }}
2727 cancel-in-progress : true
2828
29+ env :
30+ FORCE_COLOR : 1
31+
2932jobs :
3033 build :
3134
3235 strategy :
3336 fail-fast : false
3437 matrix :
3538 os : [
36- " macos-latest " ,
39+ " macos-14 " ,
3740 " ubuntu-latest" ,
3841 ]
3942 python-version : [
@@ -47,11 +50,21 @@ jobs:
4750 " 3.8" ,
4851 ]
4952 include :
50- - python-version : " 3.9 "
53+ - python-version : " 3.11 "
5154 PYTHONOPTIMIZE : 1
5255 REVERSE : " --reverse"
53- - python-version : " 3.8 "
56+ - python-version : " 3.10 "
5457 PYTHONOPTIMIZE : 2
58+ # M1 only available for 3.10+
59+ - os : " macos-latest"
60+ python-version : " 3.9"
61+ - os : " macos-latest"
62+ python-version : " 3.8"
63+ exclude :
64+ - os : " macos-14"
65+ python-version : " 3.9"
66+ - os : " macos-14"
67+ python-version : " 3.8"
5568
5669 runs-on : ${{ matrix.os }}
5770 name : ${{ matrix.os }} Python ${{ matrix.python-version }}
@@ -65,17 +78,28 @@ jobs:
6578 python-version : ${{ matrix.python-version }}
6679 allow-prereleases : true
6780 cache : pip
68- cache-dependency-path : " .ci/*.sh"
81+ cache-dependency-path : |
82+ ".ci/*.sh"
83+ "pyproject.toml"
6984
7085 - name : Build system information
7186 run : python3 .github/workflows/system-info.py
7287
88+ - name : Cache libimagequant
89+ if : startsWith(matrix.os, 'ubuntu')
90+ uses : actions/cache@v4
91+ id : cache-libimagequant
92+ with :
93+ path : ~/cache-libimagequant
94+ key : ${{ runner.os }}-libimagequant-${{ hashFiles('depends/install_imagequant.sh') }}
95+
7396 - name : Install Linux dependencies
7497 if : startsWith(matrix.os, 'ubuntu')
7598 run : |
7699 .ci/install.sh
77100 env :
78101 GHA_PYTHON_VERSION : ${{ matrix.python-version }}
102+ GHA_LIBIMAGEQUANT_CACHE_HIT : ${{ steps.cache-libimagequant.outputs.cache-hit }}
79103
80104 - name : Install macOS dependencies
81105 if : startsWith(matrix.os, 'macOS')
@@ -127,7 +151,7 @@ jobs:
127151 - name : Upload coverage
128152 uses : codecov/codecov-action@v3
129153 with :
130- flags : ${{ matrix.os == 'macos -latest' && 'GHA_macOS ' || 'GHA_Ubuntu ' }}
154+ flags : ${{ matrix.os == 'ubuntu -latest' && 'GHA_Ubuntu ' || 'GHA_macOS ' }}
131155 name : ${{ matrix.os }} Python ${{ matrix.python-version }}
132156 gcov : true
133157
0 commit comments