-
Notifications
You must be signed in to change notification settings - Fork 8
107 lines (103 loc) · 3.46 KB
/
Copy pathci.yml
File metadata and controls
107 lines (103 loc) · 3.46 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
107
name: ci
on:
pull_request:
push:
branches: [master]
jobs:
build:
name: build (${{ matrix.platform }})
runs-on: ${{ (github.repository == 'commaai/dependencies' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'commaai/dependencies')) && matrix.runs-on-namespace || matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- platform: linux-x86_64
runs-on: ubuntu-latest
runs-on-namespace: namespace-profile-amd64-8x16
- platform: linux-arm64
runs-on: ubuntu-24.04-arm
runs-on-namespace: namespace-profile-arm64-big
- platform: macos
runs-on: macos-latest
runs-on-namespace: namespace-profile-macos-8x14
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # full history for `git rev-list --count` versioning
- name: Select Xcode 16
if: runner.os == 'macOS'
run: |
XCODE=$(ls -d /Applications/Xcode_16*.app 2>/dev/null | sort -V | tail -1)
if [ -n "$XCODE" ]; then
echo "Selected: $XCODE"
sudo xcode-select -s "$XCODE"
fi
- uses: actions/cache@v6
with:
key: ccache-${{ matrix.platform }}-${{ github.run_id }}
restore-keys: ccache-${{ matrix.platform }}-
path: .ccache
- uses: actions/cache@v6
with:
key: downloads-${{ matrix.platform }}-${{ hashFiles('gcc-arm-none-eabi/build.sh', 'git-lfs/build.sh') }}
path: |
.uv-cache
*/*/toolchain
*/*/bin
- name: Build wheels
env:
MANYLINUX: ${{ runner.os == 'Linux' && '1' || '0' }}
UV_CACHE_DIR: ${{ github.workspace }}/.uv-cache
BUILD_SH_REUSE_MANYLINUX_ARTIFACTS: "1"
run: ./build.sh
- uses: actions/upload-artifact@v7
with:
name: wheels-${{ matrix.platform }}
path: dist/*.whl
test:
name: test distro (${{ matrix.image }})
needs: build
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- image: debian:trixie-slim
runs-on: ubuntu-latest
- image: ubuntu:24.04
runs-on: ubuntu-latest
- image: fedora:41
runs-on: ubuntu-latest
- image: archlinux:latest
runs-on: ubuntu-latest
- image: opensuse/tumbleweed:latest
runs-on: ubuntu-latest
- image: ghcr.io/void-linux/void-glibc:latest
runs-on: ubuntu-latest
- image: debian:trixie-slim
runs-on: ubuntu-24.04-arm
# TODO: add musl test
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: ${{ contains(matrix.runs-on, 'arm') && 'wheels-linux-arm64' || 'wheels-linux-x86_64' }}
path: dist/
- run: ./test_wheels_in_image.sh "${{ matrix.image }}"
publish:
name: publish wheels
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
pattern: wheels-*
merge-multiple: true
path: dist
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PAT }}
run: ./release.sh