Skip to content

Commit

Permalink
check that 18.1.6 still builds on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Jun 11, 2024
1 parent 9b20a6d commit 520f1b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 156 deletions.
156 changes: 1 addition & 155 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,6 @@ name: Build + Release Wheels

on:
push:
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+'
- 'v?[0-9]+.[0-9]+.[0-9]+.[0-9]+'
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

env:
USE_QEMU: ${{ github.event.inputs.use_qemu == 'true' }}

jobs:
build-wheels:
Expand All @@ -34,43 +10,16 @@ jobs:

strategy:
matrix:
arch: ["aarch64", "ppc64le", "s390x", "x86_64", "i686"]
platform: ["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
- os: windows-latest
platform: "win"
arch: "AMD64"
use_qemu: false
- os: windows-latest
platform: "win"
arch: "x86"
use_qemu: false
- os: macos-13
platform: "macos"
arch: "x86_64"
use_qemu: false
- os: macos-14
platform: "macos"
arch: "arm64"
use_qemu: false

steps:
- uses: actions/checkout@v4
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)

- name: Support long paths
if: runner.os == 'Windows' && ((!matrix.use_qemu) || fromJSON(env.USE_QEMU))
if: runner.os == 'Windows'
run: git config --system core.longpaths true

- name: Set up msvc on Windows
Expand All @@ -79,112 +28,9 @@ jobs:
with:
arch: ${{ matrix.arch }}

- 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: 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 }}"
# restrict to a single Python version as wheel does not depend on Python:
CIBW_BUILD: "cp311-${{ matrix.platform }}*"

- uses: actions/upload-artifact@v4
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
with:
name: artifacts-wheels-${{ matrix.platform }}-${{ matrix.arch }}
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
contents: 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/

- name: GitHub release for tagged commits
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
2 changes: 1 addition & 1 deletion clang-format_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.1.7.0
18.1.6.0

0 comments on commit 520f1b5

Please sign in to comment.