-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e42fb8d
commit 6557f09
Showing
2 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,85 @@ | ||
name: Build Wheels | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
python-ci: | ||
if: github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags') | ||
uses: ./.github/workflows/python_ci.yaml | ||
|
||
build_matrix: | ||
strategy: | ||
matrix: | ||
python_version: [3.9, 3.11] | ||
|
||
name: Build Python ${{ matrix.python_version }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: python | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get build metadata | ||
id: metadata | ||
run: | | ||
export VERSION="$(basename ${{ github.ref_name }})" | ||
echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
- name: Create builds directory | ||
working-directory: python | ||
run: | | ||
mkdir builds | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "${{ matrix.python_version }}" | ||
|
||
- name: Pip install | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pip-tools | ||
- name: Compile requirements | ||
working-directory: python | ||
run: | | ||
pip-compile pyproject.toml --output-file requirements.txt | ||
- name: Build Windows | ||
working-directory: python | ||
env: | ||
PLATFORM: win_amd64 | ||
ARTIFACT_NAME: sift_stack_py-${{ steps.metadata.outputs.version }}-py${{ matrix.python_version }}-win_amd64 | ||
run: | | ||
pip download -r requirements.txt -d dist --platform=${PLATFORM} --only-binary=:all: --python-version=${{ matrix.python_version }} | ||
python setup.py bdist_wheel | ||
zip ${ARTIFACT_NAME}.zip dist -r | ||
sha1sum ${ARTIFACT_NAME}.zip | cut -f1 -d' ' > ${ARTIFACT_NAME}.sha1 | ||
mv ${ARTIFACT_NAME}.zip builds | ||
mv ${ARTIFACT_NAME}.sha1 builds | ||
rm -rf dist | ||
- name: Build Linux | ||
working-directory: python | ||
env: | ||
PLATFORM: manylinux_2_17_x86_64 | ||
ARTIFACT_NAME: sift_stack_py-${{ steps.metadata.outputs.version }}-py${{ matrix.python_version }}-manylinux_2_17_x86_64 | ||
run: | | ||
pip download -r requirements.txt -d dist --platform=${PLATFORM} --only-binary=:all: --python-version=${{ matrix.python_version }} | ||
python setup.py bdist_wheel | ||
zip ${ARTIFACT_NAME}.zip dist -r | ||
sha1sum ${ARTIFACT_NAME}.zip | cut -f1 -d' ' > ${ARTIFACT_NAME}.sha1 | ||
mv ${ARTIFACT_NAME}.zip builds | ||
mv ${ARTIFACT_NAME}.sha1 builds | ||
rm -rf dist | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sift_stack_py-${{ steps.metadata.outputs.version }}-py${{ matrix.python_version }} | ||
path: python/builds |
This file contains 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