Skip to content

Commit

Permalink
update nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed Dec 13, 2023
1 parent c22c754 commit e13d69b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ jobs:
if : ${{ needs.check-for-new-commits.outputs.NEW_COMMITS == 'true' }}
uses: kaizhang/SnapATAC2/.github/workflows/wheels.yml@main
with:
wheel: 'true'
wheel: 'true'
nightly: 'true'
38 changes: 32 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# It will build a Python project using CIBW, then upload the wheel and source
# distribution to PyPI.
name: build-wheels

on:
push:

Expand All @@ -11,6 +10,9 @@ on:
wheel:
required: false
type: string
nightly:
required: false
type: string
jobs:
build_wheels:
name: Wheel on ${{ matrix.os }} for ${{ matrix.python_version }}
Expand Down Expand Up @@ -60,7 +62,7 @@ jobs:
make_sdist:
name: Build source distribution
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ startsWith(github.ref, 'refs/tags/') }} || inputs.nightly
steps:
- uses: actions/checkout@v3

Expand All @@ -81,17 +83,41 @@ jobs:
with:
path: snapatac2-python/dist/*.tar.gz

upload_all:
publish:
needs: [build_wheels, make_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || inputs.nightly
steps:
- uses: actions/checkout@v4

- name: Delete Release
if: inputs.nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view nightly > /dev/null 2>&1; then
gh release delete nightly -y --cleanup-tag
fi
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/[email protected]
- name: Publish to PyPI
uses: pypa/[email protected]
if: startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.pypi_password }}
password: ${{ secrets.pypi_password }}

- name: Create nightly release
uses: ncipollo/release-action@v1
if: inputs.nightly
with:
allowUpdates: true
tag: nightly
name: Nightly Release
prerelease: true
removeArtifacts: true
artifacts: "dist/*.whl,dist/*.tar.gz"
7 changes: 3 additions & 4 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ The nightly build is the build from the latest source codes, which includes the
latest features, enhancements, and bug fixes that haven't been released.
The nightly build can be unstable and include some untested features.

After downloading the
{download}`Nightly Build <https://nightly.link/kaizhang/SnapATAC2/workflows/nightly.yml/main/artifact.zip>`,
unzip it and then select the appropriate wheel file for your platform and use `pip install` to install it.
You need to download the appropriate
{download}`wheel file <https://github.com/kaizhang/SnapATAC2/releases/tag/nightly>`
for your platform and use `pip install` to install it.
For example, if you are using a Linux system with Python 3.8, you can use the following command to install it:

```
unzip artifact.zip
pip install snapatac2-x.x.x-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
```

Expand Down

0 comments on commit e13d69b

Please sign in to comment.