Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 4 additions & 57 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,59 +51,6 @@ jobs:
echo "run=false" >> $GITHUB_OUTPUT
fi

build_sdist_pecos_rslib:
needs: check_pr_push
if: |
always() &&
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
(github.event_name != 'pull_request' || github.event.pull_request.merged == true || github.event.action == 'opened' || github.event.action == 'synchronize')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha || github.sha }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Remove conflicting README.md
run: |
if [ -f crates/pecos-python/README.md ]; then
mv crates/pecos-python/README.md crates/pecos-python/README.md.bak
echo "Moved conflicting README.md to README.md.bak"
else
echo "No conflicting README.md found"
fi

- name: Build pecos-rslib SDist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
working-directory: python/pecos-rslib

- name: Restore README.md
if: always()
run: |
if [ -f crates/pecos-python/README.md.bak ]; then
mv crates/pecos-python/README.md.bak crates/pecos-python/README.md
echo "Restored README.md from backup"
else
echo "No README.md backup found"
fi

- name: Test pecos-rslib SDist
run: |
pip install --force-reinstall --verbose python/pecos-rslib/dist/*.tar.gz
python -c 'import pecos_rslib; print(pecos_rslib.__version__)'

- name: Upload pecos-rslib SDist
uses: actions/upload-artifact@v4
with:
name: sdist-pecos-rslib
path: python/pecos-rslib/dist/*.tar.gz

build_wheels_pecos_rslib:
needs: check_pr_push
Expand Down Expand Up @@ -173,7 +120,7 @@ jobs:
path: python/pecos-rslib/dist/*.whl

build_sdist_quantum_pecos:
needs: [check_pr_push, build_sdist_pecos_rslib, build_wheels_pecos_rslib]
needs: [check_pr_push, build_wheels_pecos_rslib]
if: |
always() &&
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
Expand Down Expand Up @@ -204,7 +151,7 @@ jobs:

- name: Build PECOS RNG
run: |
cd clibs/pecos-rng && mkdir build && cd build/ && cmake ..
cd clib/pecos-rng && mkdir build && cd build/ && cmake ..
make && cd .. && pip install .
env:
NANOBIND_DIR: python -m nanobind --include_dir
Expand All @@ -226,7 +173,7 @@ jobs:
path: python/quantum-pecos/dist/*.tar.gz

build_wheels_quantum_pecos:
needs: [check_pr_push, build_wheels_pecos_rslib, build_sdist_quantum_pecos]
needs: [check_pr_push, build_wheels_pecos_rslib]
if: |
always() &&
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
Expand Down Expand Up @@ -261,7 +208,7 @@ jobs:

- name: Build PECOS RNG
run: |
cd clibs/pecos-rng && mkdir build && cd build/ && cmake ..
cd clib/pecos-rng && mkdir build && cd build/ && cmake ..
make && cd .. && pip install .
env:
NANOBIND_DIR: python -m nanobind --include_dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: |
export NANOBIND_CMAKE_DIR=$(uv run -- python -m nanobind --cmake_dir)
export NANOBIND_DIR=$(uv run -- python -m nanobind --include_dir)
cd clibs/pecos-rng && mkdir build && cd build/ && cmake .. -DCMAKE_PREFIX_PATH=$NANOBIND_CMAKE_DIR
cd clib/pecos-rng && mkdir build && cd build/ && cmake .. -DCMAKE_PREFIX_PATH=$NANOBIND_CMAKE_DIR
cmake --build . && cd ..
uv pip install .

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ cython_debug/
.idea/

# Prevent subdirectory virtual environments
clibs/*/.venv/
clibs/*/uv.lock
clib/*/.venv/
clib/*/uv.lock
Loading
Loading