Skip to content

Commit

Permalink
updating build os
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Oct 5, 2023
1 parent 64c7ce8 commit 4bf127b
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ]
os: [ ubuntu-22.04, macos-11 ]
python: [ 3.9 ]
plat: [ x86_64 ]
parallel: [ mpi, serial, serial-pytest, any-symm-pytest ]
Expand All @@ -47,13 +47,13 @@ jobs:
python -m pip install mkl==2021.4 mkl-include intel-openmp numpy 'cmake>=3.19' pybind11==2.10.1
- name: install requirements (linux / mpi)
if: matrix.parallel == 'mpi' && matrix.os == 'ubuntu-20.04'
if: matrix.parallel == 'mpi' && matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get install libopenmpi-dev
python -m pip install mpi4py
- name: build gtest (linux)
if: matrix.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-22.04'
run: |
lscpu
sudo apt-get install libgtest-dev
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
make -j 2
- name: build test (serial, linux)
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-20.04'
if: matrix.parallel == 'serial' && matrix.os == 'ubuntu-22.04'
env:
MKLROOT: ~/.local
run: |
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
./block2_tests
- name: run test (serial-pytest, linux)
if: matrix.parallel == 'serial-pytest' && matrix.os == 'ubuntu-20.04'
if: matrix.parallel == 'serial-pytest' && matrix.os == 'ubuntu-22.04'
run: |
python -m pip install pytest 'pyscf==2.1.0' 'scipy==1.10.1'
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
Expand All @@ -142,7 +142,7 @@ jobs:
py.test -s pyblock2/unit_test/*.py
- name: run test (any-symm-pytest, linux)
if: matrix.parallel == 'any-symm-pytest' && matrix.os == 'ubuntu-20.04'
if: matrix.parallel == 'any-symm-pytest' && matrix.os == 'ubuntu-22.04'
run: |
python -m pip install pytest 'pyscf==2.1.0' 'scipy==1.10.1'
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
Expand Down Expand Up @@ -178,16 +178,22 @@ jobs:

strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ]
os: [ ubuntu-22.04, macos-11, macos-12 ]
python: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
manylinux: [ 2014 ]
plat: [ x86_64, arm64 ]
parallel: [ mpi, serial ]
exclude:
- os: macos-11
parallel: mpi
- os: ubuntu-20.04
- os: ubuntu-22.04
plat: arm64
- os: macos-11
plat: arm64
- os: macos-12
plat: x86_64
- os: macos-12
parallel: mpi
fail-fast: false

steps:
Expand Down Expand Up @@ -236,7 +242,7 @@ jobs:
delocate-wheel -k dist/*.whl
- name: build wheels (macos-arm64)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macos-11' && matrix.plat == 'arm64'
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macos-12' && matrix.plat == 'arm64'
env:
TAG_STRING: ${{ github.event.ref }}
MACOSX_DEPLOYMENT_TARGET: '11.0'
Expand All @@ -256,7 +262,7 @@ jobs:
git clone https://github.com/Homebrew/brew arm-brew
cd arm-brew && git checkout 3.6.16 && cd ..
./arm-brew/bin/brew update
OMPGZ=$(./arm-brew/bin/brew fetch --force --bottle-tag=arm64_big_sur libomp | grep "Downloaded to" | awk '{print $3}')
OMPGZ=$(./arm-brew/bin/brew fetch --force --bottle-tag=arm64_monterey libomp | grep "Downloaded to" | awk '{print $3}')
./arm-brew/bin/brew install ${OMPGZ}
export OMPROOT=$(./arm-brew/bin/brew --prefix libomp)
echo ${OMPROOT}
Expand All @@ -270,7 +276,7 @@ jobs:
delocate-wheel --require-archs=arm64 -k dist/*.whl
- name: prepare build wheels (manylinux)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04'
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-22.04'
env:
TAG_STRING: ${{ github.event.ref }}
run: |
Expand All @@ -279,7 +285,7 @@ jobs:
cp ./.github/actions/build-wheel/Dockerfile.manylinux${{ matrix.manylinux }} ./.github/actions/build-wheel/Dockerfile
- name: build wheels (manylinux)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04'
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-22.04'
uses: ./.github/actions/build-wheel
with:
python-version: ${{ matrix.python }}
Expand All @@ -302,7 +308,7 @@ jobs:
pypi:
name: pypi
needs: [build, test]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')
environment:
name: github-pages
Expand Down Expand Up @@ -367,7 +373,7 @@ jobs:
publish:
name: publish
needs: [build, test]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 4bf127b

Please sign in to comment.