Skip to content

Update pdoc requirement from ~=14.0 to ~=14.1 #249

Update pdoc requirement from ~=14.0 to ~=14.1

Update pdoc requirement from ~=14.0 to ~=14.1 #249

Workflow file for this run

name: Build
on: [push, workflow_dispatch]
permissions: read-all
jobs:
delete-old-artifacts:
permissions:
actions: write
if: github.actor == 'calendulish'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: calendulish/purge-artifacts-action@7f45b429560cfdf0ae26758e1b069b806489e094 # v1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 0
linux-build:
if: ${{ always() }}
needs: delete-old-artifacts
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.11'
python-exec: /opt/python/cp311-cp311/bin/python
- python-version: '3.10'
python-exec: /opt/python/cp310-cp310/bin/python
- python-version: '3.9'
python-exec: /opt/python/cp39-cp39/bin/python
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
image: quay.io/pypa/manylinux2014_x86_64
options: -v ${{ github.workspace }}:/work -e TERM=$TERM
shell: bash
run: |
yum install epel-release -y
yum install aria2 -y
rm -f /usr/bin/python /bin/python
ln -s ${{ matrix.python-exec }} /usr/bin/python
/work/tools/Linux/dist_script.sh
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: linux_${{ matrix.python-version }}
path: |
build/*.zip
dist/
if-no-files-found: error
retention-days: 90
if: github.actor == 'calendulish'
rpi-build:
if: ${{ always() }}
needs: delete-old-artifacts
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.python-version }}
strategy:
matrix:
include:
- arch: 'armv7'
distro: 'archarm_latest'
- arch: 'aarch64'
distro: 'archarm_latest'
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: uraimo/run-on-arch-action@566a22b3d945876cb275a973cbf25df8aa010179 # v2
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
setup: mkdir -p "${PWD}/artifacts"
dockerRunArgs: --volume "${PWD}/artifacts:/artifacts"
env: |
release_name: "stlib-RPI-${{ matrix.arch }}"
shell: /bin/sh
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm python python-build tar
python -m build --sdist --wheel
pushd build
mv lib.linux* "${release_name}"
tar -vvcf "${release_name}.zip" "${release_name}"
popd
cp -rfv build/ /artifacts/
cp -rfv dist/ /artifacts/
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: rpi_${{ matrix.arch }}
path: |
artifacts/build/*.zip
artifacts/dist/
if-no-files-found: error
retention-days: 90
if: github.actor == 'calendulish'
windows-build:
if: ${{ always() }}
needs: delete-old-artifacts
runs-on: windows-2022
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
defaults:
run:
shell: cmd
working-directory: .\\tools\Windows
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: ${{ matrix.python-version }}
- run: dist_script_native.cmd
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: windows_${{ matrix.python-version }}
path: |
build/*.zip
dist/
if-no-files-found: error
retention-days: 90
if: github.actor == 'calendulish'
msys-build:
if: ${{ always() }}
needs: delete-old-artifacts
runs-on: windows-2022
defaults:
run:
shell: cmd
working-directory: .\\tools\Windows
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- run: update_dev_environment.cmd
- run: dist_script.cmd
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: msys
path: |
build/*.zip
dist/
if-no-files-found: error
retention-days: 90
if: github.actor == 'calendulish'
deploy:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
if: startsWith(github.ref, 'refs/tags/')
needs: [linux-build, rpi-build, windows-build, msys-build]
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
draft: true
files: |
linux_3.9/dist/*.whl
linux_3.10/dist/*.whl
linux_3.11/dist/*.whl
windows_3.9/dist/*.whl
windows_3.10/dist/*.whl
windows_3.11/dist/*.whl
rpi_aarch64/dist/*.whl
rpi_armv7/dist/*.whl
msys/dist/*.whl
pypi-upload:
if: startsWith(github.ref, 'refs/tags/')
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.11'
- run: python -m pip install patchelf auditwheel
- run: python ./tools/auditwheel_.py repair --plat manylinux2014_x86_64 linux_3.11/dist/stlib-*cp311*.whl
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.10'
- run: python -m pip install patchelf auditwheel
- run: python ./tools/auditwheel_.py repair --plat manylinux2014_x86_64 linux_3.10/dist/stlib-*cp310*.whl
#- run: python ./tools/auditwheel_.py repair --plat manylinux2014_armv7l rpi_armv7/dist/stlib-*cp310*.whl
#- run: python ./tools/auditwheel_.py repair --plat manylinux2014_aarch64 rpi_aarch64/dist/stlib-*cp310*.whl
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.9'
- run: python -m pip install patchelf auditwheel
- run: python ./tools/auditwheel_.py repair --plat manylinux2014_x86_64 linux_3.9/dist/stlib-*cp39*.whl
- run: mv windows_3.9/dist/stlib-*win_amd64.whl wheelhouse/
- run: mv windows_3.10/dist/stlib-*win_amd64.whl wheelhouse/
- run: mv windows_3.11/dist/stlib-*win_amd64.whl wheelhouse/
- run: mv linux_3.11/dist/stlib-*.tar.gz wheelhouse/
- uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: wheelhouse/
verbose: true
print-hash: true
generate-badges:
permissions:
contents: write
if: ${{ always() && github.actor == 'calendulish' }}
needs: [linux-build, rpi-build, windows-build, msys-build]
runs-on: ubuntu-latest
env:
linux-badge-color: ${{ needs.linux-build.result == 'success' && 'green' || 'red' }}
windows-badge-color: ${{ needs.windows-build.result == 'success' && 'green' || 'red' }}
rpi-badge-color: ${{ needs.rpi-build.result == 'success' && 'green' || 'red' }}
msys-badge-color: ${{ needs.msys-build.result == 'success' && 'green' || 'red' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0
with:
NAME: stlib-linux-build
LABEL: 'Linux build'
STATUS: ${{ needs.linux-build.result }}
COLOR: ${{ env.linux-badge-color }}
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
REPOSITORY: calendulish/.github
ACTOR: calendulish
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0
with:
NAME: stlib-rpi-build
LABEL: 'RPI build'
STATUS: ${{ needs.rpi-build.result }}
COLOR: ${{ env.rpi-badge-color }}
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
REPOSITORY: calendulish/.github
ACTOR: calendulish
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0
with:
NAME: stlib-windows-build
LABEL: 'Windows build'
STATUS: ${{ needs.windows-build.result }}
COLOR: ${{ env.windows-badge-color }}
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
REPOSITORY: calendulish/.github
ACTOR: calendulish
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0
with:
NAME: stlib-msys-build
LABEL: 'Msys build'
STATUS: ${{ needs.msys-build.result }}
COLOR: ${{ env.msys-badge-color }}
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
REPOSITORY: calendulish/.github
ACTOR: calendulish