Skip to content

add all targets to all containers #14

add all targets to all containers

add all targets to all containers #14

Workflow file for this run

name: Deploy Python
concurrency: ADO-twine
on:
workflow_dispatch:
push:
tags: "python-v*"
jobs:
python-checks:
uses: ./.github/workflows/python.yml
rust-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Test fizzbuzzo3
run: cargo test --package fizzbuzzo3
wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
# CIBW_CONFIG_SETTINGS: "--build-option=--py-limited-api=cp38" # speeds up process at cost of less specific wheels
CIBW_BEFORE_ALL_LINUX: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal"
CIBW_BEFORE_ALL_MACOS: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal"
CIBW_BEFORE_ALL: "rustup target add all"
CIBW_ENVIRONMENT_LINUX: PATH="$HOME/.cargo/bin:$PATH" # other OS directly update environment from rustup.sh
CIBW_SKIP: "*-musllinux_i686" # No musllinux-i686 rust compiler available.
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
publish:
environment: ADO-Packages
needs: [python-checks, rust-checks, wheels, sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Install tooling
run: python -m pip install twine keyring artifacts-keyring
- name: Upload to ADO
env:
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/MusicalNinjas/FizzBuzz/_packaging/FizzBuzz/pypi/upload/
TWINE_USERNAME: FizzBuzz
TWINE_PASSWORD: ${{ secrets.ADO_TOKEN }}
run: twine upload --non-interactive dist/*