-
Notifications
You must be signed in to change notification settings - Fork 15
104 lines (90 loc) · 3.07 KB
/
Copy pathpython-wheel-build.yml
File metadata and controls
104 lines (90 loc) · 3.07 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
# Copyright 2024-2026 keplertech.io
# SPDX-License-Identifier: Apache-2.0
name: Build Python wheels
on:
workflow_call:
inputs:
provider:
description: NajaEDA provider (development or published)
type: string
required: true
version:
description: Confirm the package version for published-provider builds
type: string
required: false
default: ''
permissions:
contents: read
jobs:
build:
name: ${{ matrix.platform }} / ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-latest, windows-latest]
include:
- os: ubuntu-24.04
platform: manylinux_2_28
arch: x86_64
- os: ubuntu-24.04-arm
platform: manylinux_2_28
arch: aarch64
# Vendored Slang requires a newer AppleClang than Xcode 15.4 on the
# macos-14 image. The repository's macOS build also uses latest.
- os: macos-latest
platform: macOS
arch: arm64
- os: windows-latest
platform: Windows
arch: AMD64
runs-on: ${{ matrix.os }}
env:
KEPLER_USE_PUBLISHED_NAJAEDA: ${{ inputs.provider == 'published' && '1' || '0' }}
# Linux builds and tests run inside a manylinux container.
CIBW_ENVIRONMENT_PASS_LINUX: KEPLER_USE_PUBLISHED_NAJAEDA
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Prepare Python provider metadata
run: python ci/prepare_python_release.py --project .
- name: Install Windows wheel repair tool
if: runner.os == 'Windows'
run: python -m pip install delvewheel
- name: Set up Windows SDK and MSVC environment for clang-cl
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Validate Python release request
if: ${{ inputs.provider == 'published' }}
shell: bash
env:
RELEASE_VERSION: ${{ inputs.version }}
run: python ci/prepare_python_release.py --project . --validate-publish
- name: Verify recursive submodules
run: git submodule status --recursive
- name: Download generated parser for Windows
if: runner.os == 'Windows'
uses: actions/download-artifact@v8
with:
name: kepler-verilog-parser
path: thirdparty/naja/thirdparty/naja-verilog/src/generated
- name: Build, repair, and test wheels
uses: pypa/cibuildwheel@v4.2.0
env:
CIBW_ARCHS: ${{ matrix.arch }}
with:
package-dir: .
output-dir: wheelhouse
- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
name: kepler-formal-${{ inputs.provider }}-${{ matrix.platform }}-${{ matrix.arch }}
path: wheelhouse/*.whl
if-no-files-found: error