Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into merge-upstream
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/build.yml
#	mypy_commit
  • Loading branch information
KotlinIsland committed Jun 20, 2024
2 parents 3e287e7 + ba8c76f commit b690164
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
git -C basedmypy checkout $(cat mypy_commit)
- name: Install cibuildwheel and pypyp
run: |
pipx install cibuildwheel==2.16.2
pipx install cibuildwheel==2.18.0
pipx install pypyp==1
- id: set-matrix
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform linux basedmypy \
| pyp 'json.dumps({"only": x, "os": "ubuntu-latest"})' \
&& cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform macos basedmypy \
| pyp 'json.dumps({"only": x, "os": "macos-latest"})' \
| pyp 'json.dumps({"only": x, "os": "macos-14"})' \
&& cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform windows basedmypy \
| pyp 'json.dumps({"only": x, "os": "windows-latest"})'
} | pyp 'json.dumps(list(map(json.loads, lines)))'
Expand Down Expand Up @@ -62,23 +62,24 @@ jobs:
git clone https://github.com/KotlinIsland/basedmypy.git --recurse-submodules
git -C basedmypy checkout $(cat mypy_commit)
- uses: pypa/cibuildwheel@v2.16.2
- uses: pypa/cibuildwheel@v2.18.0
with:
config-file: cibuildwheel.toml
package-dir: basedmypy
only: ${{ matrix.only }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-${{ matrix.only }}
path: ./wheelhouse/*.whl
overwrite: true

build_sdist_python_wheel:
name: sdist and python wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.9"
Expand All @@ -100,22 +101,23 @@ jobs:
cd basedmypy
pip install --upgrade setuptools build
python -m build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-sdist_python_wheel
path: |
basedmypy/dist/*.whl
basedmypy/dist/*.tar.gz
overwrite: true
build_wasm_wheel:
name: WASM wheel for 3.10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.10"
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.5.0 # pyodide tests with this version
- name: Install emscripten
Expand Down Expand Up @@ -154,25 +156,27 @@ jobs:
- name: Run WASM smoke test
run: |
node wasm_test.js
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-wasm_wheel
path: |
basedmypy/dist/*.whl
overwrite: true
release:
name: create release
needs: [build_wheels, build_sdist_python_wheel]
needs: [build_wheels, build_sdist_python_wheel, build_wasm_wheel]
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
pattern: dist-*
path: dist
merge-multiple: true
- name: Release
if: ${{ github.event_name != 'pull_request' }}
# https://github.com/actions/upload-release-asset/issues/47
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
8 changes: 3 additions & 5 deletions cibuildwheel.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.cibuildwheel]

build-frontend = "build"
musllinux-x86_64-image = "musllinux_1_1" # Change to musllinux_1_2 at some point

# Don't build 32-bit wheels or PyPy
skip = [
Expand All @@ -10,11 +11,8 @@ skip = [
"pp*",
]

# Apple Silicon support
# When cross-compiling on Intel, it is not possible to test arm64.
# Warnings will be silenced with the following CIBW_TEST_SKIP.
macos.archs = ["x86_64", "arm64"]
test-skip = "*-macosx_arm64"
# Python 3.8 can't be tested on macOS arm64
test-skip = "cp38-macosx_arm64"

build-verbosity = 1

Expand Down

0 comments on commit b690164

Please sign in to comment.