-
Notifications
You must be signed in to change notification settings - Fork 1.1k
110 lines (93 loc) · 3.37 KB
/
testing-arm-linux.yml
File metadata and controls
110 lines (93 loc) · 3.37 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
108
109
110
name: ARM Linux
on:
pull_request:
types: [ opened, synchronize, reopened ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
arm-linux:
name: arm-${{ matrix.bits }} / ${{ matrix.uv_group }}
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
bits: [ "64", "32" ]
uv_group: [ "ci-llvm-main", "ci-llvm-22", "ci-llvm-21" ]
include:
- bits: 32
arch: armv7l
python: 3.11-armv7-gnueabihf # needed for piwheels
- bits: 64
arch: aarch64
python: linux-aarch64-gnu
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Install system dependencies
run: |
if [[ "${{ matrix.bits }}" == "32" ]]; then
sudo dpkg --add-architecture armhf
fi
apt_update() {
for i in 1 2 3; do
if sudo apt-get update; then return 0; fi
echo "apt-get update failed (attempt $i/3), retrying in 10s..."
sleep 10
done
return 1
}
apt_update
if [[ "${{ matrix.bits }}" == "32" ]]; then
sudo apt-get install -y \
binutils-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf \
gcc-arm-linux-gnueabihf \
libc6:armhf \
libstdc++6:armhf \
libatomic1:armhf \
libpng-dev:armhf \
libjpeg-dev:armhf
else
sudo apt-get install -y \
libpng-dev \
libjpeg-dev
fi
- name: Sync CI environment
run: |
setarch ${{ matrix.arch }} bash -ec "
uv sync --python '${{ matrix.python }}' --group '${{ matrix.uv_group }}' --no-install-project
echo '${GITHUB_WORKSPACE}/.venv/bin' >> '$GITHUB_PATH'
echo 'VIRTUAL_ENV=${GITHUB_WORKSPACE}/.venv' >> '$GITHUB_ENV'
"
- name: Configure LLVM
run: echo "Halide_LLVM_ROOT=$(halide-llvm --prefix)" >> "$GITHUB_ENV"
- name: Configure CMake
run: cmake --preset ci-linux-arm-${{ matrix.bits }}
- name: Initial build
run: cmake --build build
- name: Detect host target
run: |
HOST_TARGET=$(./build/src/autoschedulers/common/get_host_target)
echo "HAS_SVE2=$([[ "$HOST_TARGET" == *sve2* ]] && echo true || echo false)" >> "$GITHUB_ENV"
echo "Detected host target: ${HOST_TARGET}"
- name: Test (host)
if: matrix.bits == '32' || env.HAS_SVE2 == 'true'
run: |
cmake -S . -B build -DHalide_TARGET=host
cmake --build build
ctest --test-dir build --build-config RelWithDebInfo --output-on-failure -j "$(nproc)"
- name: Test (NEON)
if: matrix.bits == '64'
run: |
cmake -S . -B build -DHalide_TARGET=arm-64-linux-arm_dot_prod-arm_fp16
cmake --build build
ctest --test-dir build --build-config RelWithDebInfo --output-on-failure -j "$(nproc)"
- name: Test (no extensions)
run: |
cmake -S . -B build -DHalide_TARGET=cmake
cmake --build build
ctest --test-dir build --build-config RelWithDebInfo --output-on-failure -j "$(nproc)"