diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml new file mode 100644 index 00000000..81d4dbf3 --- /dev/null +++ b/.github/workflows/build_wheels.yml @@ -0,0 +1,29 @@ +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, macos-12] + + steps: + - uses: actions/checkout@v4 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.16.5 + env: + CIBW_ARCHS_LINUX: "x86_64" + CIBW_ARCHS_MACOS: "x86_64" + with: + package-dir: pyscfadlib + output-dir: pyscfadlib/wheelhouse + config-file: "{package}/pyproject.toml" + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: pyscfadlib/wheelhouse/*.whl diff --git a/pyscfadlib/pyproject.toml b/pyscfadlib/pyproject.toml index afb9a001..a15c2c0e 100644 --- a/pyscfadlib/pyproject.toml +++ b/pyscfadlib/pyproject.toml @@ -2,7 +2,7 @@ build-verbosity = 1 container-engine = "docker" manylinux-x86_64-image = "manylinux2014" -skip = ["pp*", "*musllinux*"] +skip = ["pp*", "*musllinux*", "*universal2", "*arm64"] [tool.cibuildwheel.linux] archs = ["x86_64"] @@ -12,3 +12,6 @@ before-all = [ "yum install -y openblas-devel.x86_64", ] repair-wheel-command = "auditwheel -v repair -w {dest_dir} {wheel}" + +[tool.cibuildwheel.macos] +archs = ["x86_64"]