fix: refresh ubuntu shell env, don't use complete profile, fail fast … #8
Workflow file for this run
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
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" | |
CIBW_BEFORE_ALL_LINUX: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && source $HOME/.cargo/env" | |
CIBW_BEFORE_ALL_MACOS: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y" | |
CIBW_BEFORE_ALL_WINDOWS: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target i686-pc-windows-gnu" | |
# 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 ADO tooling | |
run: python -m pip install 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/* |