pdqhash-python CI/CD #73
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
name: pdqhash-python CI/CD | |
on: workflow_dispatch | |
jobs: | |
build: | |
name: Build Windows and MacOS Package | |
strategy: | |
matrix: | |
python: ['3.8', '3.9', '3.10', '3.11'] | |
os: [windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
id: python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Cache Environment | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }} | |
- name: Initialize | |
run: make init | |
- name: Test | |
run: make test | |
- name: Package | |
run: make package | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist/* | |
build-linux: | |
name: Build Linux Package | |
strategy: | |
matrix: | |
python: ['3.8', '3.9', '3.10', '3.11'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Build Manylinux Wheels | |
run: docker run --rm -v ${{ github.workspace }}:/io --workdir /io quay.io/pypa/manylinux_2_28_x86_64 make PYTHON_VERSION=${{ matrix.python }} manylinux-wheel | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: linux-wheels | |
path: dist/ |