Skip to content

Commit fd2fa96

Browse files
committed
upgrade gh actions
1 parent b04a024 commit fd2fa96

File tree

2 files changed

+74
-40
lines changed

2 files changed

+74
-40
lines changed

.github/actions/build-wheel/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ elif [ "${PYTHON_VERSION}" = "3.11" ]; then
2121
PY_VER=cp311-cp311
2222
elif [ "${PYTHON_VERSION}" = "3.12" ]; then
2323
PY_VER=cp312-cp312
24-
elif [ "${PYTHON_VERSION}" = "3.13-dev" ]; then
24+
elif [ "${PYTHON_VERSION}" = "3.13" ]; then
2525
PY_VER=cp313-cp313
2626
fi
2727

.github/workflows/build.yml

Lines changed: 73 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
os: [ ubuntu-20.04, macos-13, macos-14, windows-2022 ]
27-
python: [ '3.13-dev' ]
26+
os: [ ubuntu-24.04, macos-13, macos-14, windows-2022 ]
27+
python: [ '3.13' ]
2828
plat: [ x86_64 ]
2929
parallel: [ mpi, serial, serial-pytest, any-symm-pytest, main-test ]
3030
exclude:
@@ -35,7 +35,7 @@ jobs:
3535
- os: windows-2022
3636
parallel: mpi
3737
include:
38-
- os: ubuntu-20.04
38+
- os: ubuntu-24.04
3939
python: '3.12'
4040
plat: wasm
4141
parallel: serial
@@ -48,21 +48,21 @@ jobs:
4848
python-version: ${{ matrix.python }}
4949

5050
- name: install requirements (linux / macos)
51-
if: (matrix.os == 'macos-13' || matrix.os == 'ubuntu-20.04') && matrix.plat == 'x86_64'
51+
if: (matrix.os == 'macos-13' || matrix.os == 'ubuntu-24.04') && matrix.plat == 'x86_64'
5252
env:
5353
MKLROOT: ~/.local
5454
run: |
5555
python -m pip install pip build twine setuptools --upgrade
5656
python -m pip install mkl==2021.4 mkl-include intel-openmp numpy 'cmake>=3.19' pybind11==2.12.0
5757
5858
- name: install requirements (linux emscripten)
59-
if: matrix.os == 'ubuntu-20.04' && matrix.plat == 'wasm'
59+
if: matrix.os == 'ubuntu-24.04' && matrix.plat == 'wasm'
6060
run: |
6161
python -m pip install pip build twine setuptools --upgrade
6262
python -m pip install pyodide-build numpy 'cmake>=3.19' pybind11==2.12.0
6363
6464
- name: setup emscripten (linux emscripten)
65-
if: matrix.os == 'ubuntu-20.04' && matrix.plat == 'wasm'
65+
if: matrix.os == 'ubuntu-24.04' && matrix.plat == 'wasm'
6666
run: |
6767
git clone -b main https://github.com/emscripten-core/emsdk.git
6868
cd emsdk
@@ -81,7 +81,7 @@ jobs:
8181
python -m pip install numpy 'cmake>=3.19' pybind11==2.12.0
8282
8383
- name: install requirements (linux / mpi)
84-
if: matrix.parallel == 'mpi' && matrix.os == 'ubuntu-20.04'
84+
if: matrix.parallel == 'mpi' && matrix.os == 'ubuntu-24.04'
8585
run: |
8686
sudo apt-get install libopenmpi-dev
8787
python -m pip install mpi4py
@@ -93,13 +93,13 @@ jobs:
9393
python -m pip install intel-openmp==2024.1.0 numpy 'cmake>=3.19' pybind11==2.12.0
9494
9595
- name: Download OpenBLAS (linux emscripten)
96-
if: matrix.os == 'ubuntu-20.04' && matrix.plat == 'wasm'
96+
if: matrix.os == 'ubuntu-24.04' && matrix.plat == 'wasm'
9797
run: |
9898
wget -q https://github.com/pyodide/pyodide/releases/download/0.26.3/xbuildenv-0.26.3.tar.bz2
9999
tar xjf xbuildenv-0.26.3.tar.bz2
100100
101101
- name: build gtest (linux emscripten)
102-
if: matrix.os == 'ubuntu-20.04' && matrix.plat == 'wasm'
102+
if: matrix.os == 'ubuntu-24.04' && matrix.plat == 'wasm'
103103
env:
104104
GTESTROOT: ~/gtest
105105
run: |
@@ -133,10 +133,10 @@ jobs:
133133
cmake --install . --prefix $env:GTEST_ROOT
134134
135135
- name: build gtest (linux)
136-
if: matrix.os == 'ubuntu-20.04' && matrix.plat == 'x86_64'
136+
if: matrix.os == 'ubuntu-24.04' && matrix.plat == 'x86_64'
137137
env:
138-
CC: gcc-9
139-
CXX: g++-9
138+
CC: gcc-14
139+
CXX: g++-14
140140
run: |
141141
lscpu
142142
sudo apt-get install libgtest-dev
@@ -146,10 +146,10 @@ jobs:
146146
sudo cp lib/*.a /usr/lib
147147
148148
- name: fix mkl for amd cpu
149-
if: matrix.os == 'ubuntu-20.04' && matrix.plat == 'x86_64'
149+
if: matrix.os == 'ubuntu-24.04' && matrix.plat == 'x86_64'
150150
env:
151-
CC: gcc-9
152-
CXX: g++-9
151+
CC: gcc-14
152+
CXX: g++-14
153153
run: |
154154
lscpu
155155
export CPUTYPE=$(lscpu | grep 'Vendor ID' | awk '{print $3}')
@@ -188,10 +188,25 @@ jobs:
188188
brew update
189189
brew install libomp
190190
191-
- name: build test (serial-pytest, linux | macos)
191+
- name: build test (serial-pytest, linux)
192+
if: |
193+
(matrix.parallel == 'serial-pytest' || matrix.parallel == 'main-test') &&
194+
matrix.os == 'ubuntu-24.04' && matrix.plat == 'x86_64'
195+
env:
196+
MKLROOT: ~/.local
197+
CC: gcc-14
198+
CXX: g++-14
199+
run: |
200+
mkdir build
201+
cd build
202+
cmake --version
203+
cmake .. -DUSE_MKL=ON -DBUILD_LIB=ON -DLARGE_BOND=ON -DUSE_COMPLEX=ON -DUSE_SG=ON
204+
make -j 2
205+
206+
- name: build test (serial-pytest, macos)
192207
if: |
193208
(matrix.parallel == 'serial-pytest' || matrix.parallel == 'main-test') &&
194-
(matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-13') && matrix.plat == 'x86_64'
209+
matrix.os == 'macos-13' && matrix.plat == 'x86_64'
195210
env:
196211
MKLROOT: ~/.local
197212
MACOSX_DEPLOYMENT_TARGET: '11.0'
@@ -232,8 +247,21 @@ jobs:
232247
cmake -G "Visual Studio 17 2022" -S .. -B . -DUSE_MKL=OFF -DBUILD_LIB=ON -DLARGE_BOND=ON -DUSE_COMPLEX=ON -DUSE_SG=ON
233248
cmake --build . -j 2 --config Release -- '/v:d'
234249
235-
- name: build test (any-symm-pytest, linux | macos)
236-
if: matrix.parallel == 'any-symm-pytest' && (matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-13') && matrix.plat == 'x86_64'
250+
- name: build test (any-symm-pytest, linux)
251+
if: matrix.parallel == 'any-symm-pytest' && matrix.os == 'ubuntu-24.04' && matrix.plat == 'x86_64'
252+
env:
253+
MKLROOT: ~/.local
254+
CC: gcc-14
255+
CXX: g++-14
256+
run: |
257+
mkdir build
258+
cd build
259+
cmake --version
260+
cmake .. -DUSE_MKL=ON -DBUILD_LIB=ON -DLARGE_BOND=ON -DUSE_COMPLEX=ON -DUSE_SU2SZ=OFF -DUSE_SANY=ON
261+
make -j 2
262+
263+
- name: build test (any-symm-pytest, macos)
264+
if: matrix.parallel == 'any-symm-pytest' && matrix.os == 'macos-13' && matrix.plat == 'x86_64'
237265
env:
238266
MKLROOT: ~/.local
239267
MACOSX_DEPLOYMENT_TARGET: '11.0'
@@ -287,7 +315,7 @@ jobs:
287315
cmake --build . -j 2 --config Release -- '/v:d'
288316
289317
- name: build test (serial, linux emscripten)
290-
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-20.04' && matrix.plat == 'wasm'
318+
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-24.04' && matrix.plat == 'wasm'
291319
env:
292320
GTESTROOT: ~/gtest
293321
run: |
@@ -302,11 +330,11 @@ jobs:
302330
emmake make -j 2
303331
304332
- name: build test (serial, linux)
305-
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-20.04' && matrix.plat == 'x86_64'
333+
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-24.04' && matrix.plat == 'x86_64'
306334
env:
307335
MKLROOT: ~/.local
308-
CC: gcc-9
309-
CXX: g++-9
336+
CC: gcc-14
337+
CXX: g++-14
310338
run: |
311339
mkdir build_test
312340
cd build_test
@@ -357,14 +385,14 @@ jobs:
357385
.\block2_tests.exe
358386
359387
- name: run test (serial, linux emscripten)
360-
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-20.04' && matrix.plat == 'wasm'
388+
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-24.04' && matrix.plat == 'wasm'
361389
run: |
362390
source emsdk/emsdk_env.sh
363391
cd build_test
364392
node block2_tests.js
365393
366394
- name: run test (serial, linux)
367-
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-20.04' && matrix.plat == 'x86_64'
395+
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-24.04' && matrix.plat == 'x86_64'
368396
run: |
369397
export CPUTYPE=$(lscpu | grep 'Vendor ID' | awk '{print $3}')
370398
if [ "$CPUTYPE" = "AuthenticAMD" ]; then
@@ -397,7 +425,7 @@ jobs:
397425
python -m pytest -s pyblock2/unit_test/dmrg.py pyblock2/unit_test/dmrg_mpo.py pyblock2/unit_test/dmrg_npdm.py --fd_data=${xpwd}/data
398426
399427
- name: run test (serial-pytest, linux)
400-
if: matrix.parallel == 'serial-pytest' && matrix.os == 'ubuntu-20.04'
428+
if: matrix.parallel == 'serial-pytest' && matrix.os == 'ubuntu-24.04'
401429
run: |
402430
python -m pip install pytest 'pyscf==2.6.2' 'scipy==1.14.1'
403431
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
@@ -435,7 +463,7 @@ jobs:
435463
.\run-test.ps1
436464
437465
- name: run test (main-test, linux)
438-
if: matrix.parallel == 'main-test' && matrix.os == 'ubuntu-20.04'
466+
if: matrix.parallel == 'main-test' && matrix.os == 'ubuntu-24.04'
439467
run: |
440468
python -m pip install pytest 'pyscf==2.6.2' 'scipy==1.14.1'
441469
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
@@ -475,7 +503,7 @@ jobs:
475503
python -m pytest -s pyblock2/unit_test/dmrg.py pyblock2/unit_test/dmrg_mpo.py pyblock2/unit_test/dmrg_npdm.py --symm sany --fd_data=${xpwd}/data
476504
477505
- name: run test (any-symm-pytest, linux)
478-
if: matrix.parallel == 'any-symm-pytest' && matrix.os == 'ubuntu-20.04'
506+
if: matrix.parallel == 'any-symm-pytest' && matrix.os == 'ubuntu-24.04'
479507
run: |
480508
python -m pip install pytest 'pyscf==2.6.2' 'scipy==1.14.1'
481509
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
@@ -520,8 +548,8 @@ jobs:
520548

521549
strategy:
522550
matrix:
523-
os: [ ubuntu-20.04, macos-13, windows-2022, macos-14 ]
524-
python: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev' ]
551+
os: [ ubuntu-24.04, macos-13, windows-2022, macos-14 ]
552+
python: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
525553
manylinux: [ 2014 ]
526554
plat: [ x86_64, arm64 ]
527555
parallel: [ mpi, serial ]
@@ -536,7 +564,7 @@ jobs:
536564
plat: x86_64
537565
- os: macos-14
538566
python: '3.7'
539-
- os: ubuntu-20.04
567+
- os: ubuntu-24.04
540568
plat: arm64
541569
- os: windows-2022
542570
parallel: mpi
@@ -546,12 +574,18 @@ jobs:
546574

547575
steps:
548576
- uses: actions/checkout@v4
549-
- uses: actions/setup-python@v5
577+
- if: matrix.os == 'macos-13' || matrix.os == 'macos-14' || matrix.os == 'windows-2022'
578+
uses: actions/setup-python@v5
550579
with:
551580
python-version: ${{ matrix.python }}
552581

582+
- if: matrix.os == 'ubuntu-24.04'
583+
uses: actions/setup-python@v5
584+
with:
585+
python-version: '3.13'
586+
553587
- name: install requirements (linux / macos)
554-
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-20.04'
588+
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-24.04'
555589
env:
556590
MKLROOT: ~/.local
557591
run: |
@@ -671,7 +705,7 @@ jobs:
671705
delocate-wheel --require-archs=arm64 -k dist/*.whl
672706
673707
- name: prepare build wheels (manylinux)
674-
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04'
708+
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-24.04'
675709
env:
676710
TAG_STRING: ${{ github.event.ref }}
677711
run: |
@@ -680,7 +714,7 @@ jobs:
680714
cp ./.github/actions/build-wheel/Dockerfile.manylinux${{ matrix.manylinux }} ./.github/actions/build-wheel/Dockerfile
681715
682716
- name: build wheels (manylinux)
683-
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04'
717+
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-24.04'
684718
uses: ./.github/actions/build-wheel
685719
with:
686720
python-version: ${{ matrix.python }}
@@ -703,7 +737,7 @@ jobs:
703737
pypi:
704738
name: pypi
705739
needs: [build, test]
706-
runs-on: ubuntu-20.04
740+
runs-on: ubuntu-24.04
707741
if: startsWith(github.ref, 'refs/tags/')
708742
environment:
709743
name: github-pages
@@ -712,7 +746,7 @@ jobs:
712746
- uses: actions/checkout@v4
713747
- uses: actions/setup-python@v5
714748
with:
715-
python-version: '3.13-dev'
749+
python-version: '3.13'
716750

717751
- name: build source dist (serial)
718752
env:
@@ -768,13 +802,13 @@ jobs:
768802
publish:
769803
name: publish
770804
needs: [build, test]
771-
runs-on: ubuntu-20.04
805+
runs-on: ubuntu-24.04
772806
if: startsWith(github.ref, 'refs/tags/v')
773807
steps:
774808
- uses: actions/checkout@v4
775809
- uses: actions/setup-python@v5
776810
with:
777-
python-version: '3.13-dev'
811+
python-version: '3.13'
778812

779813
- name: build source dist (serial)
780814
env:

0 commit comments

Comments
 (0)