Skip to content

Commit

Permalink
Merge pull request #26 from siliconcompiler/use-wheel
Browse files Browse the repository at this point in the history
Use wheel in design build
  • Loading branch information
gadfort committed Apr 13, 2024
2 parents 82c61d6 + 5094a2b commit f04d033
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 18 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/designs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build wheel
run: |
pip install --upgrade pip
pip install --upgrade build
python3 -m build
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/*.whl
retention-days: 7
- uses: hynek/build-and-inspect-python-package@v2

sc_version:
needs: wheel
Expand All @@ -59,7 +47,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: wheel
name: Packages
path: dist

- name: Install gallery
Expand Down Expand Up @@ -98,7 +86,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: wheel
name: Packages
path: dist

- name: Install gallery
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Wheels

on:
workflow_dispatch:
release:
types:
- published

jobs:
build_wheels:
name: Wheels
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true

- uses: hynek/build-and-inspect-python-package@v2

publish:
needs: [build_wheels]
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.14

save:
needs: [publish]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Add wheels to GitHub release artifacts
uses: softprops/action-gh-release@v2
with:
files: dist/*.whl
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
write_to = "scgallery/_version.py"
write_to_template = '__version__ = "{version}" # noqa W292'

[tool.setuptools.packages]
find = {}
[tool.setuptools]
include-package-data = true
packages = [
"scgallery"
]

[project]
name = "scgallery"
name = "sc-gallery"
authors = [
{name = "Peter Gadfort", email = "gadfort@zeroasic.com"},
]
Expand Down Expand Up @@ -57,3 +60,8 @@ exclude = [

[tool.tclint.style]
line-length = 100

[tool.check-wheel-contents]
ignore = [
"W002"
]

0 comments on commit f04d033

Please sign in to comment.