Skip to content

Commit

Permalink
test [wheel]
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed May 2, 2024
1 parent dea0b00 commit a3e7a90
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
ref: ${{ github.event.workflow_run.head_sha }}

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
NEW_COMMITS: ${{ steps.check-commits.outputs.NEW_COMMITS }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get latest commit SHA
id: get-latest-commit-sha
Expand Down Expand Up @@ -45,14 +45,12 @@ jobs:
id-token: write
if: ${{ startsWith(github.ref, 'refs/tags') }}
steps:
- name: Download wheel files from artifacts
id: download-artifact
uses: dawidd6/action-download-artifact@v2
- name: Download wheel files
uses: actions/download-artifact@v4
with:
workflow: wheels.yml
commit: ${{ github.event.workflow_run.head_sha }}
name: dist
path: dist
pattern: snapatac2-*
merge-multiple: true

- name: Delete Release
env:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: codecov/codecov-action@v3

- name: Upload wheel files as artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheel-files
path: ./wheel_files/snapatac2*.whl
Expand All @@ -64,14 +64,12 @@ jobs:
id-token: write
#if: ${{ startsWith(github.ref, 'refs/tags') }}
steps:
- name: Download wheel files from artifacts
id: download-artifact
uses: dawidd6/action-download-artifact@v2
- name: Download wheel files
uses: actions/download-artifact@v4
with:
workflow: wheels.yml
commit: ${{ github.event.workflow_run.head_sha }}
name: dist
path: dist
pattern: snapatac2-*
merge-multiple: true

- name: Publish to PyPI
uses: pypa/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1
uses: actions/checkout@v4

- uses: ./.github/actions/setup-rust
with:
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,26 @@ jobs:
- uses: ./.github/actions/setup-rust

# Used to host cibuildwheel
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

- if: runner.os != 'Linux'
name: Setup env when not using docker
run: python -m pip install --upgrade wheel setuptools setuptools-rust

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5
run: python -m pip install cibuildwheel==2.17.0

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse snapatac2-python

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: snapatac2-${{ matrix.python_version }}-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

make_sdist:
name: Build source distribution
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }} || inputs.nightly
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
name: Install Python
Expand All @@ -70,7 +66,7 @@ jobs:
run: maturin sdist
working-directory: snapatac2-python

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: snapatac2-sdist
path: snapatac2-python/target/wheels/*.tar.gz

0 comments on commit a3e7a90

Please sign in to comment.