1616 matrix :
1717 # Since macos-latest changed from 12.7.4 to 14.4.1,
1818 # the minimum python version that matches a 14.4.1 version of macos is 3.10,
19- # so we limit the macos version to macos-12.
20- os : [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
19+ # If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
20+ # after macos-13 python 3.7 is no longer supported.
21+ # so we limit the macos version to macos-13.
22+ os : [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
2123 # not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
2224 python-version : [3.7, 3.8]
2325
@@ -29,13 +31,13 @@ jobs:
2931 # So we make the version number of python 3.7 for MacOS more specific.
3032 # refs: https://github.com/actions/setup-python/issues/682
3133 - name : Set up Python ${{ matrix.python-version }}
32- if : (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11 ' && matrix.python-version == '3.7')
34+ if : (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13 ' && matrix.python-version == '3.7')
3335 uses : actions/setup-python@v4
3436 with :
3537 python-version : " 3.7.16"
3638
3739 - name : Set up Python ${{ matrix.python-version }}
38- if : (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11 ' || matrix.python-version != '3.7')
40+ if : (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13 ' || matrix.python-version != '3.7')
3941 uses : actions/setup-python@v4
4042 with :
4143 python-version : ${{ matrix.python-version }}
4547 python -m pip install --upgrade pip
4648
4749 - name : Installing pytorch for macos
48- if : ${{ matrix.os == 'macos-11 ' || matrix.os == 'macos-latest' }}
50+ if : ${{ matrix.os == 'macos-13 ' || matrix.os == 'macos-latest' }}
4951 run : |
5052 python -m pip install torch torchvision torchaudio
5153
@@ -149,7 +151,7 @@ jobs:
149151 python scripts/get_data.py download_data --file_name rl_data.zip --target_dir tests/.data/rl
150152
151153 - name : Install Lightgbm for MacOS
152- if : ${{ matrix.os == 'macos-11 ' || matrix.os == 'macos-latest' }}
154+ if : ${{ matrix.os == 'macos-13 ' || matrix.os == 'macos-latest' }}
153155 run : |
154156 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
155157 HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
@@ -161,16 +163,11 @@ jobs:
161163
162164 # Run after data downloads
163165 - name : Check Qlib ipynb with nbconvert
164- # Running the nbconvert check on a macos-11 system results in a "Kernel died" error, so we've temporarily disabled macos-11 here.
165- if : ${{ matrix.os != 'macos-11' }}
166166 run : |
167167 # add more ipynb files in future
168168 jupyter nbconvert --to notebook --execute examples/workflow_by_code.ipynb
169169
170170 - name : Test workflow by config (install from source)
171- # On macos-11 system, it will lead to "Segmentation fault: 11" error,
172- # which may be caused by the excessive memory overhead of macos-11 system, so we disable macos-11 temporarily here.
173- if : ${{ matrix.os != 'macos-11' }}
174171 run : |
175172 python -m pip install numba
176173 python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
0 commit comments