-
Notifications
You must be signed in to change notification settings - Fork 7
75 lines (65 loc) · 2.13 KB
/
build-vehicle-python.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
name: Build vehicle-python
# NOTE: This workflow assumes a recent version of Python and pipx are available
# on the runner.
on:
workflow_call:
defaults:
run:
shell: sh
env:
# NOTE: cibuildwheel builds manylinux wheels in a container, and the versions
# of GHC and Cabal are hardcoded in the `before-all-$ID.sh` scripts.
DEFAULT_GHC_VERSION: "9.4.8"
DEFAULT_CABAL_VERSION: "3.10.2.1"
jobs:
build-vehicle-python:
strategy:
matrix:
os:
- name: "Linux"
type: "ubuntu-latest"
arch: "x86_64"
plat: "manylinux"
test: "test,tensorflow"
- name: "Linux"
type: "ubuntu-latest"
arch: "x86_64"
plat: "musllinux"
test: "test"
- name: "macOS"
type: "macos-latest"
arch: "x86_64"
plat: "macosx"
test: "test,tensorflow"
- name: "Windows"
type: "windows-latest"
arch: "AMD64"
plat: "win"
test: "test,tensorflow"
name: vehicle-python / ${{ matrix.os.name }} - ${{ matrix.os.arch }}
runs-on: ${{ matrix.os.type }}
steps:
- name: Get source
uses: actions/checkout@v4
- name: Setup GHC ${{ env.DEFAULT_GHC_VERSION }}
if: matrix.os.name == 'macOS' || matrix.os.name == 'Windows'
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ env.DEFAULT_GHC_VERSION }}
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }}
- name: Build wheel
uses: pypa/[email protected]
with:
package-dir: "./vehicle-python"
output-dir: "./vehicle-python/wheelhouse"
config-file: "{package}/pyproject.toml"
env:
CIBW_BUILD: "*${{ matrix.os.plat }}*"
CIBW_ARCHS: "${{ matrix.os.arch }}"
CIBW_TEST_EXTRAS: "${{ matrix.os.test }}"
MACOSX_DEPLOYMENT_TARGET: "10.10"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: "wheelhouse-${{ matrix.os.plat }}-${{ matrix.os.arch }}"
path: ./vehicle-python/wheelhouse/*.whl