@@ -2,16 +2,10 @@ name: Build Status
22
33on :
44 push :
5- branches :
6- - main
7- tags :
8- - v*
9- paths-ignore :
10- - LICENSE
11- - README.md
5+ branches : [main]
6+ tags : [v*]
127 pull_request :
13- branches :
14- - main
8+ branches : [main]
159 workflow_dispatch :
1610
1711concurrency :
@@ -26,63 +20,85 @@ permissions:
2620jobs :
2721 build :
2822 runs-on : ${{ matrix.os }}
29-
3023 strategy :
3124 matrix :
32- os : [ubuntu-latest]
33- python-version : ["3.11"]
34-
25+ os :
26+ - ubuntu-24.04
27+ - macos-14
28+ # - windows-2022
29+ python-version :
30+ - " 3.11"
31+ cibuildwheel :
32+ - " cp311"
3533 steps :
36- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
37-
38- - uses : actions-ext/python/setup@main
39- with :
40- version : ${{ matrix.python-version }}
41-
42- - name : Install dependencies
43- run : make develop
44-
45- - name : Lint
46- run : make lint
47-
48- - name : Checks
49- run : make checks
50-
51- - name : Build
52- run : make build
53-
54- - name : Test
55- run : make coverage
56-
57- - name : Upload test results (Python)
58- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
59- with :
60- name : test-results-${{ matrix.os }}-${{ matrix.python-version }}
61- path : junit.xml
62- if : ${{ always() }}
63-
64- - name : Publish Unit Test Results
65- uses : EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2
66- with :
67- files : ' **/junit.xml'
68-
69- - name : Upload coverage
70- uses : codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
71- with :
72- token : ${{ secrets.CODECOV_TOKEN }}
73-
74- - name : Make dist
75- run : make dist
76-
77- - uses : actions-ext/python/test-wheel@main
78- with :
79- module : verible
80-
81- - uses : actions-ext/python/test-sdist@main
82- with :
83- module : verible
84-
85- - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
86- with :
87- name : dist-${{matrix.os}}
88- path : dist
34+ - uses : actions/checkout@v6
35+ with :
36+ submodules : ' true'
37+
38+ - name : Setup cache (mac/linux)
39+ uses : actions/cache@v5
40+ with :
41+ path : " /home/runner/work/verible-python/verible-python/.ccache"
42+ key : cache-${{ runner.os }}-
43+ restore-keys : cache-${{ runner.os }}-
44+ if : ${{ runner.os != 'Windows' }}
45+
46+ - name : Setup cache (windows)
47+ uses : actions/cache@v5
48+ with :
49+ path : " C:/ProgramData/chocolatey/"
50+ key : cache-${{ runner.os }}-
51+ restore-keys : cache-${{ runner.os }}-
52+ if : ${{ runner.os == 'Windows' }}
53+
54+ - name : Set up Python ${{ matrix.python-version }}
55+ uses : actions/setup-python@v6
56+ with :
57+ python-version : ${{ matrix.python-version }}
58+ cache : ' pip'
59+ cache-dependency-path : ' pyproject.toml'
60+
61+ - name : Install dependencies
62+ run : pip install cibuildwheel
63+
64+ - name : Python Wheel Steps (linux)
65+ run : python -m cibuildwheel --output-dir dist
66+ env :
67+ CIBW_BUILD : " ${{ matrix.cibuildwheel }}-manylinux*"
68+ CIBW_ENVIRONMENT_LINUX : CCACHE_DIR="/host/home/runner/work/verible-python/verible-python/.ccache"
69+ CIBW_BUILD_VERBOSITY : 3
70+ if : ${{ runner.os == 'Linux' }}
71+
72+ - name : Python Build Steps (mac)
73+ run : python -m cibuildwheel --output-dir dist
74+ env :
75+ CIBW_BUILD : " ${{ matrix.cibuildwheel }}-macos*"
76+ CIBW_ENVIRONMENT_MACOS : CCACHE_DIR="/Users/runner/work/verible-python/verible-python/.ccache" MACOSX_DEPLOYMENT_TARGET=11.0
77+ CIBW_BUILD_VERBOSITY : 3
78+ if : ${{ matrix.os == 'macos-14' }}
79+
80+ - name : Python Build Steps (windows)
81+ run : python -m cibuildwheel --output-dir dist
82+ env :
83+ CIBW_BUILD : " ${{ matrix.cibuildwheel }}-win_amd64"
84+ if : ${{ matrix.os == 'windows-2022' }}
85+
86+ - name : Upload Wheel
87+ uses : actions/upload-artifact@v7
88+ with :
89+ name : dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}
90+ path : dist/*.whl
91+
92+ - name : Install wheel (mac/linux)
93+ run : python -m pip install dist/*.whl
94+ if : ${{ runner.os != 'Windows' }}
95+
96+ - name : Install wheel (windows)
97+ run : python -m pip install -U (Get-ChildItem .\dist\*.whl | Select-Object -Expand FullName)
98+ if : ${{ runner.os == 'Windows' }}
99+
100+ - name : Install test dependencies
101+ run : python -m pip install pytest rich typer
102+
103+ - name : Test Wheel
104+ run : python -m pytest -vvv verible/tests
0 commit comments