-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating repository to follow calng-format-wheel #88
Open
CalebFuster
wants to merge
6
commits into
ssciwr:main
Choose a base branch
from
CalebFuster:chore-manual_maintenance_of_the_repo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+132
−200
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0ce07e4
Changing where the version of the wheel is stored
CalebFuster 7e9e355
Migrating all the setup project.
CalebFuster 2e1910c
No Manifest as the mirrored repo setup
CalebFuster b6116f4
Addapt CMakeList.txt to folllow the mirrored repo to ease maintenance
CalebFuster 043b59d
chore (gitignore): Adding some folders to gitignore
invalid-email-address 2f70290
chore (workflow): Modified release workflow
CalebFuster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
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 | ||
|
@@ -16,157 +16,117 @@ on: | |
required: false | ||
default: "0" | ||
deploy_to_testpypi: | ||
description: "Whether the build should be deployed to test.pypi.org instead regular PyPI" | ||
description: "Whether the build should be deployed to test.pypi.org instead of regular PyPI" | ||
required: true | ||
default: false | ||
|
||
env: | ||
USE_QEMU: ${{ github.event.inputs.use_qemu == 'true' }} | ||
|
||
jobs: | ||
build-wheels: | ||
name: Build wheels on ${{ matrix.os }} (arch=${{ matrix.arch }}) | ||
name: "Build wheels on ${{ matrix.os }} :: platform=${{ matrix.platform }} arch=${{ matrix.arch }}" | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-22.04 | ||
# Linux | ||
- os: ubuntu-latest | ||
platform: "manylinux" | ||
arch: "x86_64" | ||
use_qemu: false | ||
skip: "*manylinux*" | ||
- os: ubuntu-22.04 | ||
- os: ubuntu-latest | ||
platform: "musllinux" | ||
arch: "x86_64" | ||
use_qemu: false | ||
skip: "*musllinux*" | ||
- os: ubuntu-22.04 | ||
- os: ubuntu-latest | ||
platform: "manylinux" | ||
arch: "i686" | ||
use_qemu: false | ||
skip: "*manylinux*" | ||
- os: ubuntu-22.04 | ||
- os: ubuntu-latest | ||
platform: "musllinux" | ||
arch: "i686" | ||
use_qemu: false | ||
skip: "*musllinux*" | ||
# These take too long to build on Github | ||
#- os: ubuntu-20.04 | ||
#arch: "aarch64" | ||
#use_qemu: true | ||
#- os: ubuntu-20.04 | ||
#arch: "ppc64le" | ||
#use_qemu: true | ||
#- os: ubuntu-20.04 | ||
#arch: "s390x" | ||
#use_qemu: true | ||
- os: windows-2022 | ||
# Windows | ||
- os: windows-latest | ||
platform: "win" | ||
arch: "AMD64" | ||
use_qemu: false | ||
skip: | ||
- os: windows-2022 | ||
- os: windows-latest | ||
platform: "win" | ||
arch: "x86" | ||
use_qemu: false | ||
skip: | ||
- os: macos-12 | ||
# macOS | ||
- os: macos-13 | ||
platform: "macos" | ||
arch: "x86_64" | ||
use_qemu: false | ||
skip: | ||
- os: macos-14 | ||
- os: macos-latest | ||
platform: "macos" | ||
arch: "arm64" | ||
use_qemu: false | ||
skip: | ||
|
||
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 | ||
if: runner.os == 'Windows' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: ${{ matrix.arch }} | ||
|
||
- name: Export macOS SDKROOT | ||
if: runner.os == 'macOS' | ||
run: echo SDKROOT=$(xcrun --sdk macosx --show-sdk-path) >> $GITHUB_ENV | ||
|
||
- name: Override LLVM version (${{ github.event.inputs.llvm_version }}) | ||
if: github.event.inputs.llvm_version | ||
run: | | ||
echo "set(CLANG_TIDY_VERSION ${{ github.event.inputs.llvm_version }})" > clang-tidy_version.cmake | ||
echo "set(CLANG_TIDY_WHEEL_VERSION ${{ github.event.inputs.wheel_version }})" >> clang-tidy_version.cmake | ||
|
||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
if: runner.os == 'Linux' && ((matrix.use_qemu) && fromJSON(env.USE_QEMU)) | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
# the pre-installed python 3.8 isn't native and cannot produce ARM64 wheels | ||
# see also https://github.com/pypa/cibuildwheel/pull/1871 | ||
if: runner.os == 'macOS' && runner.arch == 'arm64' | ||
echo "${{ github.event.inputs.llvm_version }}.${{ github.event.inputs.wheel_version }}" > clang-tidy_version.txt | ||
cat clang-tidy_version.txt | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU) | ||
env: | ||
CIBW_ARCHS: "${{ matrix.arch }}" | ||
CIBW_BEFORE_TEST: rm -rf {package}/clang_tidy | ||
CIBW_BEFORE_TEST: rm -rf {package}/clang_tidy | ||
CIBW_TEST_SKIP: "*linux*" | ||
# always skip PyPY builds + what's defined in the matrix | ||
CIBW_SKIP: "pp* ${{matrix.skip}}" | ||
# clang-tidy simply does not want to cooperate with the github linux image | ||
- name: Test Linux Wheel | ||
if: runner.os == 'Linux' && !(matrix.use_qemu) && matrix.arch == 'x86_64' | ||
run: | | ||
if [[ "${{matrix.skip}}" == "*manylinux*" ]] ; then | ||
docker build --build-arg BASEOS=alpine3.16 --build-arg PLATFORM=musllinux -f .github/workflows/Dockerfile . | ||
else | ||
docker build --build-arg BASEOS=slim-bullseye --build-arg PLATFORM=manylinux -f .github/workflows/Dockerfile . | ||
fi | ||
- name: Set artifact name | ||
id: set_artifact_name | ||
shell: bash -l {0} | ||
run: | | ||
VALUE="archive_wheels_${{ matrix.os }}_${{ matrix.arch }}_${{ matrix.skip }}" | ||
VALUE="${VALUE//\*/}" | ||
echo "value=${VALUE}" >> ${GITHUB_OUTPUT} | ||
# 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 | ||
name: ${{ steps.set_artifact_name.outputs.value }} | ||
|
||
build-sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-22.04 | ||
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 "set(CLANG_TIDY_VERSION ${{ github.event.inputs.llvm_version }})" > clang-tidy_version.cmake | ||
echo "set(CLANG_TIDY_WHEEL_VERSION ${{ github.event.inputs.wheel_version }})" >> clang-tidy_version.cmake | ||
|
||
echo "${{ github.event.inputs.llvm_version }}.${{ github.event.inputs.wheel_version }}" > clang-tidy_version.txt | ||
cat clang-tidy_version.txt | ||
- name: Build SDist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist/*.tar.gz | ||
name: archive_sdist | ||
|
||
test-sdist: | ||
name: Test build from source distribution | ||
needs: [build-sdist] | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.9' | ||
python-version: '3.13' | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -175,7 +135,6 @@ jobs: | |
|
||
- name: Install from SDist | ||
run: | | ||
# make sure the test will not pick this up | ||
rm -r clang_tidy | ||
pip install sdist/*.tar.gz | ||
|
||
|
@@ -190,27 +149,29 @@ jobs: | |
upload_pypi: | ||
name: Upload to PyPI | ||
needs: [build-wheels, build-sdist, test-sdist] | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
if: github.repository_owner == 'ssciwr' | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: archive* | ||
path: dist | ||
pattern: artifacts-* | ||
merge-multiple: true | ||
path: dist | ||
|
||
- name: Upload to PyPI | ||
uses: pypa/[email protected] | ||
if: github.event.inputs.deploy_to_testpypi == 'false' | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
uses: pypa/[email protected] | ||
if: (startsWith(github.event.ref, 'refs/tags/')) || (github.event.inputs.deploy_to_testpypi == 'false') | ||
|
||
- name: Upload to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@v1.8.11 | ||
uses: pypa/gh-action-pypi-publish@v1.12.3 | ||
if: github.event.inputs.deploy_to_testpypi == 'true' | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TESTPYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
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/') |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
19.1.6.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the qemu with the commented combination