Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Mar 21, 2024
1 parent bbdc755 commit bcb6709
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 134 deletions.
135 changes: 2 additions & 133 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
name: Build + Release Wheels

on:
workflow_dispatch:
inputs:
use_qemu:
description: "Use qemu for builds with targets requiring emulation"
required: true
default: true
llvm_version:
description: "LLVM version to build"
required: false
default: ""
wheel_version:
description: "Version of the wheel packaging (appended to LLVM version)"
required: false
default: "0"
deploy_to_testpypi:
description: "Whether the build should be deployed to test.pypi.org instead regular PyPI"
required: true
default: false
on: push

env:
USE_QEMU: ${{ github.event.inputs.use_qemu == 'true' }}
Expand All @@ -31,20 +13,7 @@ jobs:

strategy:
matrix:
arch: ["aarch64", "ppc64le", "s390x", "x86_64", "i686"]
skip: ["*manylinux*", "*musllinux*"]
include:
# initially generate all 10 matrix combinations with qemu on ubuntu:
- os: ubuntu-latest
use_qemu: true
# modify the x86_64 and i686 jobs generated above to disable qemu
- os: ubuntu-latest
arch: "x86_64"
use_qemu: false
- os: ubuntu-latest
arch: "i686"
use_qemu: false
# additional runs (they define skip="" to ensure they cannot be combined with any matrix combinations)
- os: windows-latest
arch: "AMD64"
use_qemu: false
Expand All @@ -53,15 +22,6 @@ jobs:
arch: "x86"
use_qemu: false
skip: ""
- os: macos-latest
arch: "x86_64"
use_qemu: false
skip: ""
# SSC self-hosted mac arm64 runner
- os: macos-arm64-ssc
arch: "arm64"
use_qemu: false
skip: ""

steps:
- uses: actions/checkout@v4
Expand All @@ -77,100 +37,9 @@ jobs:
echo "${{ github.event.inputs.llvm_version }}.${{ github.event.inputs.wheel_version }}" > clang-format_version.txt
cat clang-format_version.txt
- name: Set up QEMU
uses: docker/[email protected]
if: runner.os == 'Linux' && ((matrix.use_qemu) && fromJSON(env.USE_QEMU))

- name: Build wheels
uses: pypa/[email protected]
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_SKIP: "${{ matrix.skip }}"

- uses: actions/upload-artifact@v4
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
with:
name: artifacts-wheels-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build-sdist:
name: Build source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Override LLVM version (${{ github.event.inputs.llvm_version }})
if: github.event.inputs.llvm_version
run: |
echo "${{ github.event.inputs.llvm_version }}.${{ github.event.inputs.wheel_version }}" > clang-format_version.txt
cat clang-format_version.txt
- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: artifacts-sdist
path: dist/*.tar.gz

test-sdist:
name: Test build from source distribution
needs: [build-sdist]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'

- uses: actions/download-artifact@v4
with:
name: artifacts-sdist
path: sdist

- name: Install from SDist
run:
pip install sdist/*.tar.gz

- name: Install test requirements
run:
python -m pip install -r requirements-dev.txt

- name: Set up Git identity
run: |
git config --global user.name Name
git config --global user.email [email protected]
- name: Run test suite
run:
python -m pytest

upload_pypi:
name: Upload to PyPI
needs: [build-wheels, build-sdist, test-sdist]
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.repository_owner == 'ssciwr'

steps:
- uses: actions/download-artifact@v4
with:
pattern: artifacts-*
merge-multiple: true
path: dist

- name: Upload to PyPI
uses: pypa/[email protected]
if: github.event.inputs.deploy_to_testpypi == 'false'

- name: Upload to TestPyPI
uses: pypa/[email protected]
if: github.event.inputs.deploy_to_testpypi == 'true'
with:
repository_url: https://test.pypi.org/legacy/
CIBW_SKIP: "${{ matrix.skip }}"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ wheel.py-api = "py2.py3"
cmake.version = ">=3.16.0"
ninja.version = ">=1.10.0"
cmake.verbose = true
logging.level = "INFO"
logging.level = "DEBUG"

[tool.cibuildwheel]
# Super-verbose output for debugging purpose
Expand Down

0 comments on commit bcb6709

Please sign in to comment.