-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (89 loc) · 3.43 KB
/
Copy pathbuild.yaml
File metadata and controls
106 lines (89 loc) · 3.43 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build Status
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-24.04 # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
- macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
- windows-2022 # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
python-version:
- "3.11"
cibuildwheel:
- "cp311"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
submodules: 'true'
- name: Setup cache (mac/linux)
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: "/home/runner/work/verilator-python/verilator-python/.ccache"
key: cache-${{ runner.os }}-
restore-keys: cache-${{ runner.os }}-
if: ${{ runner.os != 'Windows' }}
- name: Setup cache (windows)
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: "C:/ProgramData/chocolatey/"
key: cache-${{ runner.os }}-
restore-keys: cache-${{ runner.os }}-
if: ${{ runner.os == 'Windows' }}
- uses: actions-ext/python/setup@main
with:
version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install cibuildwheel
- name: Python Wheel Steps (linux)
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
CIBW_ENVIRONMENT_LINUX: CCACHE_DIR="/host/home/runner/work/verilator-python/verilator-python/.ccache"
CIBW_BUILD_VERBOSITY: 3
if: ${{ runner.os == 'Linux' }}
- name: Python Build Steps (mac)
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
CIBW_ENVIRONMENT_MACOS: CCACHE_DIR="/Users/runner/work/verilator-python/verilator-python/.ccache" MACOSX_DEPLOYMENT_TARGET=11.0
CIBW_BUILD_VERBOSITY: 3
if: ${{ matrix.os == 'macos-14' }}
- name: Python Build Steps (windows)
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64"
if: ${{ matrix.os == 'windows-2022' }}
- name: Upload Wheel
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}
path: dist/*.whl
- name: Install wheel (mac/linux)
run: python -m pip install dist/*.whl
if: ${{ runner.os != 'Windows' }}
- name: Install wheel (windows)
run: python -m pip install -U (Get-ChildItem .\dist\*.whl | Select-Object -Expand FullName)
if: ${{ runner.os == 'Windows' }}
- name: Install test dependencies
run: python -m pip install pytest rich typer
- name: Test Wheel
run: python -m pytest -vvv verilator/tests
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: dist-${{matrix.os}}
path: dist