-
Notifications
You must be signed in to change notification settings - Fork 5
82 lines (80 loc) · 2.63 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on: [push, pull_request]
env:
CIBW_BUILD_VERBOSITY: 3
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: "pytest -svv {project}/tests/python/"
MLC_CIBW_VERSION: "2.20.0"
MLC_PYTHON_VERSION: "3.9"
MLC_CIBW_WIN_BUILD: "cp39-win_amd64"
MLC_CIBW_MAC_BUILD: "cp39-macosx_arm64"
MLC_CIBW_LINUX_BUILD: "cp312-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:
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_BEFORE_ALL: ".\\scripts\\cpp_tests.bat"
CIBW_BUILD: ${{ env.MLC_CIBW_WIN_BUILD }}
- name: Show package contents
run: python scripts/show_wheel_content.py wheelhouse
macos:
name: MacOS
runs-on: macos-latest
needs: pre-commit
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_BEFORE_ALL: "./scripts/cpp_tests.sh"
CIBW_BUILD: ${{ env.MLC_CIBW_MAC_BUILD }}
- name: Show package contents
run: python scripts/show_wheel_content.py wheelhouse
linux:
name: Linux
runs-on: ubuntu-latest
needs: pre-commit
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_BEFORE_ALL: "./scripts/setup_manylinux2014.sh && ./scripts/cpp_tests.sh"
CIBW_BUILD: ${{ env.MLC_CIBW_LINUX_BUILD }}
- name: Show package contents
run: python scripts/show_wheel_content.py wheelhouse