-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1bb7a5
commit a8aa03c
Showing
60 changed files
with
1,197 additions
and
1,125 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -6,28 +6,19 @@ on: | |
|
||
env: | ||
CIBW_BUILD_VERBOSITY: 3 | ||
CIBW_TEST_REQUIRES: "pytest" | ||
CIBW_TEST_COMMAND: "pytest -svv {project}/tests/python/" | ||
CIBW_TEST_COMMAND: "python -c \"import mlc\"" | ||
CIBW_SKIP: "cp313-win_amd64" # Python 3.13 is not quite ready yet | ||
MLC_CIBW_VERSION: "2.20.0" | ||
MLC_PYTHON_VERSION: "3.9" | ||
MLC_CIBW_WIN_BUILD: "cp3*-win_amd64" | ||
MLC_CIBW_MAC_BUILD: "cp3*-macosx_arm64" | ||
MLC_CIBW_MAC_X86_BUILD: "cp3*-macosx_x86_64" | ||
MLC_CIBW_LINUX_BUILD: "cp3*-manylinux_x86_64" | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.MLC_PYTHON_VERSION }} | ||
- uses: pre-commit/[email protected] | ||
windows: | ||
name: Windows | ||
runs-on: windows-latest | ||
needs: pre-commit | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -36,7 +27,7 @@ jobs: | |
with: | ||
python-version: ${{ env.MLC_PYTHON_VERSION }} | ||
- name: Install cibuildwheel | ||
run: python -m pip install twine cibuildwheel=="${{ env.MLC_CIBW_VERSION }}" | ||
run: python -m pip install cibuildwheel=="${{ env.MLC_CIBW_VERSION }}" | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
|
@@ -51,7 +42,6 @@ jobs: | |
macos: | ||
name: MacOS | ||
runs-on: macos-latest | ||
needs: pre-commit | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -60,7 +50,7 @@ jobs: | |
with: | ||
python-version: ${{ env.MLC_PYTHON_VERSION }} | ||
- name: Install cibuildwheel | ||
run: python -m pip install twine cibuildwheel==${{ env.MLC_CIBW_VERSION }} | ||
run: python -m pip install cibuildwheel==${{ env.MLC_CIBW_VERSION }} | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
|
@@ -72,10 +62,32 @@ jobs: | |
with: | ||
name: wheels-macos | ||
path: ./wheelhouse/*.whl | ||
macos-x86: | ||
name: MacOS-x86 | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.MLC_PYTHON_VERSION }} | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==${{ env.MLC_CIBW_VERSION }} | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_BUILD: ${{ env.MLC_CIBW_MAC_X86_BUILD }} | ||
- name: Show package contents | ||
run: python scripts/show_wheel_content.py wheelhouse | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels-macos-x86 | ||
path: ./wheelhouse/*.whl | ||
linux: | ||
name: Linux | ||
runs-on: ubuntu-latest | ||
needs: pre-commit | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -84,7 +96,7 @@ jobs: | |
with: | ||
python-version: ${{ env.MLC_PYTHON_VERSION }} | ||
- name: Install cibuildwheel | ||
run: python -m pip install twine cibuildwheel==${{ env.MLC_CIBW_VERSION }} | ||
run: python -m pip install cibuildwheel==${{ env.MLC_CIBW_VERSION }} | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
|
@@ -99,7 +111,7 @@ jobs: | |
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
needs: [windows, macos, linux] | ||
needs: [windows, macos, linux, macos-x86] | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/mlc-python | ||
|
@@ -114,6 +126,7 @@ jobs: | |
- name: Prepare distribution files | ||
run: | | ||
mkdir -p dist | ||
mv wheelhouse/wheels-macos-x86/*.whl dist/ | ||
mv wheelhouse/wheels-macos/*.whl dist/ | ||
mv wheelhouse/wheels-linux/*.whl dist/ | ||
mv wheelhouse/wheels-windows/*.whl dist/ | ||
|
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 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 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
Oops, something went wrong.