-
Notifications
You must be signed in to change notification settings - Fork 75
Add python release build #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9352a07
Add python release build
wallies 221ef39
workflow dispatch
wallies eae9692
simple
wallies d62b935
maturin requires
wallies 62d48f7
add release
wallies 5f6924b
fix publish pipeline
wallies ca90a25
update maturin args
wallies dd2824f
test
wallies 7c4b15c
maturin config
wallies d4ac30e
build
wallies e1e47e2
maturin
wallies a3f60c6
add publish to pypi and scorecard
wallies 2d7c212
Merge remote-tracking branch 'upstream/master' into github-action-wheels
wallies 0abc1c9
dont fail if test token doesnt exist
wallies 4d2fe40
run scorecard earlier
wallies 382f2bd
use new trusted publisher workflow
wallies 200628a
add index crates to allow list
wallies f57b030
add uploads.github.com to allowlist for codeql
wallies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains hidden or 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 hidden or 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,178 @@ | ||
name: Test & Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
# on: | ||
# pull_request: | ||
# branches: | ||
# - master | ||
|
||
jobs: | ||
create-release: | ||
permissions: | ||
contents: write # for actions/create-release to create a release | ||
name: create-release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
release_version: ${{ env.RELEASE_VERSION }} | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504 # v1 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Get the release version from the tag | ||
shell: bash | ||
if: env.RELEASE_VERSION == '' | ||
run: | | ||
# See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027 | ||
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
echo "version is: ${{ env.RELEASE_VERSION }}" | ||
|
||
- name: Create GitHub release | ||
id: release | ||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
release_name: ${{ env.RELEASE_VERSION }} | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
needs: create-release | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
- uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf | ||
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a | ||
with: | ||
python-version: 3.8 | ||
architecture: x64 | ||
|
||
- uses: messense/maturin-action@20111a7c286a91434bdd7f612314a38ff6c091ad | ||
env: | ||
PYO3_PYTHON: python3.8 | ||
with: | ||
target: x86_64 | ||
manylinux: auto | ||
command: build | ||
args: --release --sdist -o dist | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
- name: Upload release binaries | ||
uses: alexellis/upload-assets@eaab1472d5c2f0df3115cac81136f03e7e61f771 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
asset_paths: '["./dist/tantivy-*"]' | ||
|
||
windows: | ||
runs-on: windows-latest | ||
needs: create-release | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
- uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf | ||
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a | ||
with: | ||
python-version: 3.8 | ||
|
||
- uses: messense/maturin-action@20111a7c286a91434bdd7f612314a38ff6c091ad | ||
env: | ||
PYO3_PYTHON: python3.8 | ||
with: | ||
command: build | ||
args: --release -o dist | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
- name: Upload release binaries | ||
uses: alexellis/upload-assets@eaab1472d5c2f0df3115cac81136f03e7e61f771 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
asset_paths: '["./dist/tantivy-*"]' | ||
|
||
macos: | ||
runs-on: macos-latest | ||
needs: create-release | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
- uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf | ||
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a | ||
with: | ||
python-version: 3.8 | ||
architecture: x64 | ||
|
||
- uses: messense/maturin-action@20111a7c286a91434bdd7f612314a38ff6c091ad | ||
env: | ||
PYO3_PYTHON: python3.8 | ||
with: | ||
command: build | ||
args: --release -o dist --universal2 | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
- name: Upload release binaries | ||
uses: alexellis/upload-assets@eaab1472d5c2f0df3115cac81136f03e7e61f771 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
asset_paths: '["./dist/tantivy-*"]' | ||
|
||
# release-pypy: | ||
# name: Release | ||
# runs-on: ubuntu-latest | ||
# needs: [ macos, windows, linux ] | ||
# steps: | ||
# - name: Harden Runner | ||
# uses: step-security/harden-runner@74b568e8591fbb3115c70f3436a0c6b0909a8504 | ||
# with: | ||
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
# - uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # 3.0.0 | ||
# with: | ||
# name: wheels | ||
|
||
# - name: Publish to PyPI Tests | ||
# uses: messense/maturin-action@20111a7c286a91434bdd7f612314a38ff6c091ad | ||
# env: | ||
# MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
# with: | ||
# command: upload | ||
# args: --repository-url=https://test.pypi.org/legacy/ --skip-existing * | ||
|
||
# - name: Publish to PyPI | ||
# uses: messense/maturin-action@20111a7c286a91434bdd7f612314a38ff6c091ad | ||
# env: | ||
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
# with: | ||
# command: upload | ||
# args: --skip-existing * |
This file contains hidden or 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,7 +1,10 @@ | ||
[build-system] | ||
requires = ["maturin"] | ||
requires = ["maturin>=0.13,<0.14"] | ||
build-backend = "maturin" | ||
|
||
[project] | ||
name = "tantivy" | ||
requires-python = ">=3.7" | ||
|
||
[tool.maturin] | ||
bindings = "pyo3" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.