-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* skbuild * dynamic version, remove metadata.{hh,cc} * adapt workflow * working on ci * bit less verbose * ci * force ninja * add dependabot * fix * files for setuptools_scm * ci * refresh publish.yml * add flags for visual studio compiler * try with msvc * auto-ize * test verbosely * no openmp on windows * clang-cl w/o openmp * dobule quotes * quotes * quotes * quotes * openmp is not the problem on windows, apparently * install eigen * trigger * single quotes * cibuildwheel * install a recent eigen on linux * environment * tinker * cancel older * no pypy * env vars * env * Add fallback version * forward slashed * foo * Eigen3_ROOT * remove continue-on-error * reorg a bit * reorg * reorg * reorg * reorg * dammit * NO_EXTRAS * auto-ize * decltype instead of auto * Update .github/workflows/ci.yml * fix warning * eigen3 path on windows * eigen3 path on windows * eigen3 path on windows * setup-miniconda conf * update checkout action * update ci.yml * update ci.yml * testing command * testing command * non-shallow clone in ci.yml * skip test_fields * skip test_fields * skip all test that use cache * fetch eigen3 for sdist * skip C compiler checks when fetching Eigen * blasted eigen * blasted eigen * Try aarch64 ppc64le * One job per wheel * fix action version * skip CPython 3.12 * chore: update action versions * chore: update action versions * chore: update toml and publish.yml * fix: option available only in latest scikit-build-core * fix: step name * fix: skip musl, do 3.12 * chore: exclude more variants * chore: exclude aarch64 on linux * test: wheel upload * test: wheel upload * fix: use tarball for eigen * use correct action --------- Co-authored-by: Maximilian Scheurer <[email protected]>
- Loading branch information
1 parent
d1bc43f
commit 1d2d0be
Showing
37 changed files
with
514 additions
and
654 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git_archival.txt export-subst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
# cibuildwheel updates often and cannot be tracked by | ||
# a major version tag like 'v1'. Mute updates since | ||
# this is not a critical component | ||
- dependency-name: "pypa/cibuildwheel*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,140 @@ | ||
name: Publish package | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: | ||
- published | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
FORCE_COLOR: 3 | ||
|
||
jobs: | ||
publish: | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
python-version: '3.7' | ||
- name: Install setuptools and wheel | ||
run: | | ||
python -m pip install --user setuptools wheel | ||
- name: Build a source tarball | ||
fetch-depth: 0 # such that setuptools_scm can do its job correctly | ||
|
||
- name: Build SDist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
generate-wheels-matrix: | ||
name: Generate wheels matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
include: ${{ steps.set-matrix.outputs.include }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install cibuildwheel | ||
run: pipx install cibuildwheel==2.19.2 | ||
- id: set-matrix | ||
run: | | ||
pip install pytest numpy h5py scipy pandas scikit-build pybind11 | ||
pip install git+https://gitlab.com/reinholdt/polarizationsolver.git@master | ||
python setup.py install | ||
pytest --pyargs cppe | ||
python setup.py sdist | ||
- name: Publish distribution 📦 to Test PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
MATRIX=$( | ||
{ | ||
cibuildwheel --print-build-identifiers --platform linux \ | ||
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ | ||
&& cibuildwheel --print-build-identifiers --platform macos \ | ||
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \ | ||
&& cibuildwheel --print-build-identifiers --platform windows \ | ||
| jq -nRc '{"only": inputs, "os": "windows-latest"}' | ||
} | jq -sc | ||
) | ||
echo "Full build matrix" | ||
echo "$MATRIX" | ||
echo "include=$MATRIX" >> $GITHUB_OUTPUT | ||
env: | ||
CIBW_ARCHS_LINUX: x86_64 # aarch64 # skipping as h5py stopped providing pre-build wheels for aarch64 on PyPI | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
CIBW_ARCHS_WINDOWS: AMD64 | ||
# skip musl builds | ||
CIBW_SKIP: "*-musllinux_*" | ||
# disable free-threaded support | ||
CIBW_FREE_THREADED_SUPPORT: False | ||
# exclude latest Python beta | ||
CIBW_PRERELEASE_PYTHONS: False | ||
|
||
build_wheels: | ||
name: Build ${{ matrix.only }} | ||
needs: generate-wheels-matrix | ||
strategy: | ||
matrix: | ||
include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # such that setuptools_scm can do its job correctly | ||
|
||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
# this will set the system compiler | ||
- name: Set Windows env | ||
if: matrix.os == 'windows-latest' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- uses: pypa/[email protected] | ||
env: | ||
# skip testing PyPy builds | ||
CIBW_TEST_SKIP: "pp*" | ||
|
||
CIBW_ENVIRONMENT_LINUX: > | ||
SKBUILD_CMAKE_ARGS="-DENABLE_ARCH_FLAGS=OFF;-DENABLE_OPENMP=OFF" | ||
CIBW_ENVIRONMENT_MACOS: > | ||
SKBUILD_CMAKE_ARGS="-DENABLE_ARCH_FLAGS=OFF;-DENABLE_OPENMP=OFF" | ||
CIBW_ENVIRONMENT_WINDOWS: > | ||
SKBUILD_CMAKE_ARGS="-GNinja;-DCMAKE_CXX_COMPILER=clang-cl;-DENABLE_ARCH_FLAGS=OFF;-DENABLE_OPENMP=OFF" | ||
with: | ||
only: ${{ matrix.only }} | ||
|
||
- name: Verify clean directory | ||
run: git diff --exit-code | ||
shell: bash | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
upload_all: | ||
name: Upload if release | ||
needs: | ||
- build_wheels | ||
- build_sdist | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
#if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,6 @@ __pycache__ | |
*.egg-info | ||
*.eggs | ||
.ipynb_checkpoints/ | ||
|
||
# autogenerated by setuptools-scm | ||
_version.py |
Oops, something went wrong.