Build Status #455
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
name: Build Status | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
paths-ignore: | |
- LICENSE | |
- NOTICE | |
- README.md | |
- "docs/wiki/**" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- LICENSE | |
- NOTICE | |
- README.md | |
- "docs/wiki/**" | |
workflow_dispatch: | |
inputs: | |
ci-full: | |
description: "Run Full CI" | |
required: false | |
type: boolean | |
default: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
id-token: write # for pypi test release | |
jobs: | |
#################################### | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~/##########\~~~~~~~~~~~~# | |
#~~~~~~~~~|#|~~~~~~~|#|~~~~~~~~~~~~# | |
#~~~~~~~~~|#|~~~~~~~|#|~~~~~~~~~~~~# | |
#~~~~~~~~~|#|~~~~~~~|#|~~~~~~~~~~~~# | |
#~~~~~~~~~|#|~~~~~~~|#|~~~~~~~~~~~~# | |
#~~~~~~~~~|#|~~~~~~~|#|~~~~~~~~~~~~# | |
#~~~~~~~~~\##########/~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Stage One - Initialize the build # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# This is so we can inspect the latest commit message from | |
# both push and pull_request events (there is no | |
# github.event.head_commit.message otherwise on pull | |
# requests) | |
initialize: | |
runs-on: ubuntu-22.04 | |
outputs: | |
COMMIT_MESSAGE: ${{ steps.setup.outputs.COMMIT_MSG }} | |
FULL_RUN: ${{ steps.setuppush.outputs.FULL_RUN || steps.setuppr.outputs.FULL_RUN || steps.setupmanual.outputs.FULL_RUN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# for pull_request so we can do HEAD^2 | |
fetch-depth: 2 | |
- name: Get Commit Message | |
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B HEAD | tr '\n' ' ')" >> $GITHUB_ENV | |
if: ${{ github.event_name == 'push' }} | |
- name: Get Commit Message | |
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B HEAD^2 | tr '\n' ' ')" >> $GITHUB_ENV | |
if: ${{ github.event_name == 'pull_request' }} | |
- name: Display and Setup Build Args (Push) | |
id: setuppush | |
run: | | |
echo "Commit Message: $COMMIT_MSG" | |
echo "Full Run: $FULL_RUN" | |
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT | |
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT | |
env: | |
FULL_RUN: ${{ startsWith(github.ref_name, 'v') || contains(github.event.head_commit.message, '[ci-full]') }} | |
if: ${{ github.event_name == 'push' }} | |
- name: Display and Setup Build Args (PR) | |
id: setuppr | |
run: | | |
echo "Commit Message: $COMMIT_MSG" | |
echo "Full Run: $FULL_RUN" | |
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT | |
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT | |
env: | |
FULL_RUN: ${{ contains(github.event.pull_request.title, '[ci-full]') || contains(env.COMMIT_MSG, '[ci-full]') }} | |
if: ${{ github.event_name == 'pull_request' }} | |
- name: Display and Setup Build Args (Manual) | |
id: setupmanual | |
run: | | |
echo "Commit Message: $COMMIT_MSG" | |
echo "Full Run: $FULL_RUN" | |
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT | |
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT | |
env: | |
FULL_RUN: ${{ github.event.inputs.ci-full }} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
################################### | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~~/#######|~~~~~~~~~~~~~# | |
#~~~~~~~~~~/########|~~~~~~~~~~~~~# | |
#~~~~~~~~~/###/~|###|~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~|###|~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~|###|~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~|###|~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~|###|~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Stage One - Lint Python / C++ # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
lint: | |
needs: | |
- initialize | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- 3.9 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python | |
with: | |
version: '${{ matrix.python-version }}' | |
- name: Install python dependencies | |
run: make requirements | |
- name: Python Lint Steps (Linux) | |
run: make lint | |
############################ | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~/########\~~~~~~~# | |
#~~~~~~~|###|~~~\###\~~~~~~# | |
#~~~~~~~~~~~~~~/###/~~~~~~~# | |
#~~~~~~~~~~~~/###/~~~~~~~~~# | |
#~~~~~~~~~~/###/~~~~~~~~~~~# | |
#~~~~~~~~/###/~~~~~~~~~~~~~# | |
#~~~~~~|#############|~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Stage Two - Build Python # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
build: | |
needs: | |
- initialize | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md | |
- macos-12 # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
- macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md | |
# - windows-2022 # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
cibuildwheel: | |
- "cp38" | |
- "cp39" | |
- "cp310" | |
- "cp311" | |
is-full-run: | |
- ${{ needs.initialize.outputs.FULL_RUN == 'true' }} | |
exclude: | |
############################ | |
# Things to always exclude # | |
############################ | |
# Skip when cibuildwheel != python version | |
# to avoid duplication | |
- python-version: "3.8" | |
cibuildwheel: "cp39" | |
- python-version: "3.8" | |
cibuildwheel: "cp310" | |
- python-version: "3.8" | |
cibuildwheel: "cp311" | |
- python-version: "3.9" | |
cibuildwheel: "cp38" | |
- python-version: "3.9" | |
cibuildwheel: "cp310" | |
- python-version: "3.9" | |
cibuildwheel: "cp311" | |
- python-version: "3.10" | |
cibuildwheel: "cp38" | |
- python-version: "3.10" | |
cibuildwheel: "cp39" | |
- python-version: "3.10" | |
cibuildwheel: "cp311" | |
- python-version: "3.11" | |
cibuildwheel: "cp38" | |
- python-version: "3.11" | |
cibuildwheel: "cp39" | |
- python-version: "3.11" | |
cibuildwheel: "cp310" | |
############################################## | |
# Things to exclude if not a full matrix run # | |
############################################## | |
# mac arm builds support py3.10+ | |
- os: macos-14 | |
python-version: "3.8" | |
- os: macos-14 | |
python-version: "3.9" | |
# windows is slow, so dont build unless its a full run | |
# - is-full-run: false | |
# os: windows-2022 | |
# avoid unnecessary use of mac resources | |
- is-full-run: false | |
os: macos-12 | |
- is-full-run: false | |
os: macos-14 | |
python-version: "3.8" | |
- is-full-run: false | |
os: macos-14 | |
python-version: "3.9" | |
- is-full-run: false | |
os: macos-14 | |
python-version: "3.10" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python | |
with: | |
version: '${{ matrix.python-version }}' | |
- name: Set up Caches | |
uses: ./.github/actions/setup-caches | |
with: | |
cibuildwheel: '${{ matrix.cibuildwheel }}' | |
- name: Set up dependencies | |
uses: ./.github/actions/setup-dependencies | |
with: | |
cibuildwheel: '${{ matrix.cibuildwheel }}' | |
if: ${{ runner.os == 'macOS' }} | |
######## | |
# Linux | |
- name: Python Wheel Steps (Linux - cibuildwheel) | |
run: make dist-py-cibw | |
env: | |
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*" | |
CIBW_ENVIRONMENT_LINUX: CSP_MANYLINUX="ON" CCACHE_DIR="/host/home/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="/host${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="/host${{ env.VCPKG_DOWNLOADS }}" | |
CIBW_BUILD_VERBOSITY: 3 | |
if: ${{ runner.os == 'Linux' }} | |
######## | |
# Macos | |
- name: Python Build Steps (Macos x86) | |
run: make dist-py-cibw | |
env: | |
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*" | |
CIBW_ENVIRONMENT_MACOS: CC="/usr/local/bin/gcc-13" CXX="/usr/local/bin/g++-13" CCACHE_DIR="/Users/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="${{ env.VCPKG_DOWNLOADS }}" | |
CIBW_ARCHS_MACOS: x86_64 | |
CIBW_BUILD_VERBOSITY: 3 | |
if: ${{ matrix.os == 'macos-12' }} | |
- name: Python Build Steps (Macos arm) | |
run: make dist-py-cibw | |
env: | |
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*" | |
CIBW_ENVIRONMENT_MACOS: PATH="/opt/homebrew/opt/bison/bin/:$PATH" CC="/opt/homebrew/bin/gcc-13" CXX="/opt/homebrew/bin/g++-13" LDFLAGS="-Wl,-ld_classic" CCACHE_DIR="/Users/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="${{ env.VCPKG_DOWNLOADS }}" | |
CIBW_ARCHS_MACOS: arm64 | |
CIBW_BUILD_VERBOSITY: 3 | |
if: ${{ matrix.os == 'macos-14' }} | |
########## | |
# Windows | |
- name: Python Build Steps (Windows vc14.3) | |
run: make dist-py-cibw | |
env: | |
CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64" | |
CMAKE_GENERATOR: Visual Studio 17 2022 | |
CIBW_ENVIRONMENT_WINDOWS: TODO="todo" | |
if: ${{ matrix.os == 'windows-2022' }} | |
# Check dist files | |
- name: Check Wheels | |
run: make dist-check | |
# Upload artifacts | |
- name: Upload Wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} | |
path: dist/*.whl | |
############################# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~/########\~~~~~~~# | |
#~~~~~~~~~|##|~~~~|##|~~~~~~# | |
#~~~~~~~~~~~~~~~~~|##|~~~~~~# | |
#~~~~~~~~~~~~~|######|~~~~~~# | |
#~~~~~~~~~~~~~~~~~|##|~~~~~~# | |
#~~~~~~~~~|##|~~~~|##|~~~~~~# | |
#~~~~~~~~~\#########/~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Stage Three - Build SDist # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
build_sdist: | |
needs: | |
- initialize | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- 3.9 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python | |
with: | |
version: '${{ matrix.python-version }}' | |
- name: Install python dependencies | |
run: make requirements | |
# Build SDist | |
- name: Python SDist Steps | |
run: make dist-py-sdist | |
# Check dist files | |
- name: Check sdist | |
run: make dist-check | |
# Upload artifacts | |
- name: Upload SDist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: csp-sdist | |
path: dist/*.tar.gz | |
############################# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~|##|~~~~|##|~~~~~~~~# | |
#~~~~~~~|##|~~~~|##|~~~~~~~~# | |
#~~~~~~~|##|~~~~|##|~~~~~~~~# | |
#~~~~~~~|##########|~~~~~~~~# | |
#~~~~~~~~~~~~~~~|##|~~~~~~~~# | |
#~~~~~~~~~~~~~~~|##|~~~~~~~~# | |
#~~~~~~~~~~~~~~~|##|~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Stage Four - Test Python # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
test: | |
needs: | |
- initialize | |
- build | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
- macos-12 | |
- macos-14 | |
# - windows-2022 | |
python-version: | |
- 3.8 | |
- 3.9 | |
- "3.10" | |
- 3.11 | |
is-full-run: | |
- ${{ needs.initialize.outputs.FULL_RUN == 'true' }} | |
exclude: | |
############################################## | |
# Things to exclude if not a full matrix run # | |
############################################## | |
# mac arm builds support py3.10+ | |
- os: macos-14 | |
python-version: "3.8" | |
- os: macos-14 | |
python-version: "3.9" | |
# Exclude windows builds | |
# - is-full-run: false | |
# os: windows-2022 | |
# Exclude macOS builds for now | |
- os: macos-12 | |
# is-full-run: false # FIXME https://github.com/Point72/csp/issues/33 | |
- os: macos-14 | |
# is-full-run: false # FIXME https://github.com/Point72/csp/issues/33 | |
# Exclude Python 3.8, 3.10, 3.11 builds | |
- is-full-run: false | |
python-version: 3.8 | |
- is-full-run: false | |
python-version: 3.9 | |
- is-full-run: false | |
python-version: "3.10" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python | |
with: | |
version: '${{ matrix.python-version }}' | |
- name: Install python dependencies | |
run: make requirements | |
- name: Install test dependencies (Linux) | |
shell: bash | |
run: sudo apt-get install graphviz | |
if: ${{ runner.os == 'Linux' }} | |
- name: Install test dependencies (Mac) | |
shell: bash | |
run: brew install graphviz | |
if: ${{ runner.os == 'macOS' }} | |
# Download artifact | |
- name: Download wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} | |
- name: Install wheel (Linux) | |
run: python -m pip install -U *manylinux2014*.whl --target . | |
if: ${{ runner.os == 'Linux' }} | |
- name: Install wheel (OSX x86) | |
run: python -m pip install -U *x86*.whl --target . | |
if: ${{ runner.os == 'macOS' && runner.arch == 'X64' }} | |
- name: Install wheel (OSX arm) | |
run: python -m pip install -U *arm64*.whl --target . | |
if: ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }} | |
- name: Install wheel (windows) | |
run: python -m pip install -U (Get-ChildItem .\*.whl | Select-Object -Expand FullName) --target . | |
if: ${{ runner.os == 'Windows' }} | |
# Run tests | |
- name: Python Test Steps | |
run: make test | |
######################################## | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~|##########|~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~|##########|~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~|##########|~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Stage Four - Build / test the SDist # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
test_sdist: | |
needs: | |
- initialize | |
- build_sdist | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
- 3.9 | |
runs-on: ${{ matrix.os }} | |
if: ${{ needs.initialize.outputs.FULL_RUN == 'true' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python | |
with: | |
version: '${{ matrix.python-version }}' | |
- name: Set up Caches | |
uses: ./.github/actions/setup-caches | |
with: | |
cibuildwheel: 'cp39' | |
# Python | |
- name: Install python dependencies | |
run: make requirements | |
# Download sdist | |
- uses: actions/download-artifact@v4 | |
with: | |
name: csp-sdist | |
path: dist/ | |
# Install sdist | |
- name: Install sdist | |
run: python -m pip install -U -vvv dist/csp*.tar.gz --target . | |
env: | |
CCACHE_DIR: /home/runner/work/csp/csp/.ccache | |
VCPKG_DEFAULT_BINARY_CACHE: /home/runner/vcpkg_cache | |
VCPKG_DOWNLOADS: /home/runner/vcpkg_download_cache | |
# Test sdist | |
- name: Run tests against from-scratch sdist build | |
run: make test | |
env: | |
CSP_TEST_SKIP_EXAMPLES: "1" | |
################################# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~|##########|~~~~~~~~~~# | |
#~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~|##########|~~~~~~~~~~# | |
#~~~~~~~~~|##|~~~~|##|~~~~~~~~~~# | |
#~~~~~~~~~|##|~~~~|##|~~~~~~~~~~# | |
#~~~~~~~~~|##########|~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# Test Dependencies/Regressions # | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
test_dependencies: | |
needs: | |
- initialize | |
- build | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
python-version: | |
- 3.9 | |
package: | |
- "sqlalchemy>=2" | |
- "sqlalchemy<2" | |
- "numpy==1.19.5" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python | |
with: | |
version: '${{ matrix.python-version }}' | |
- name: Install python dependencies | |
run: make requirements | |
- name: Install test dependencies | |
shell: bash | |
run: sudo apt-get install graphviz | |
# Download artifact | |
- name: Download wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} | |
- name: Install wheel | |
run: python -m pip install -U *manylinux2014*.whl --target . | |
- name: Install package - ${{ matrix.package }} | |
run: python -m pip install -U "${{ matrix.package }}" | |
# Run tests | |
- name: Python Test Steps | |
run: make test TEST_ARGS="-k TestDBReader" | |
if: ${{ contains( 'sqlalchemy', matrix.package )}} | |
- name: Python Test Steps | |
run: make test | |
if: ${{ contains( 'numpy', matrix.package )}} | |
############################# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
#~~~~~~|#############|~~~~~~# | |
#~~~~~~|#|~~~~~~~~|##|~~~~~~# | |
#~~~~~~|#|~~~~~~~~|##|~~~~~~# | |
#~~~~~~|#############|~~~~~~# | |
#~~~~~~|#|~~~~~~~~|##|~~~~~~# | |
#~~~~~~|#|~~~~~~~~|##|~~~~~~# | |
#~~~~~~|#############|~~~~~~# | |
#~Upload Release Artifacts~~# | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~# | |
# only publish artifacts on tags, but otherwise this always runs | |
# Note this whole workflow only triggers on release tags (e.g. "v0.1.0") | |
publish_release_artifacts: | |
# build must complete and all tests must pass | |
# before release artifacts can be uploaded | |
needs: | |
- build_sdist | |
- build | |
- test | |
- test_sdist | |
- test_dependencies | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Download wheels and sdist | |
uses: actions/download-artifact@v4 | |
with: | |
name: | |
merge-multiple: true | |
path: ./dist | |
- name: Display structure of downloaded files | |
run: ls -R ./dist | |
- name: Publish to github releases | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
generate_release_notes: true | |
files: dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |