-
Notifications
You must be signed in to change notification settings - Fork 1k
144 lines (130 loc) · 5.17 KB
/
build-presets.yml
File metadata and controls
144 lines (130 loc) · 5.17 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Build Presets
on:
pull_request:
push:
branches:
- main
- release/*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true
jobs:
apple:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
strategy:
fail-fast: false
matrix:
preset: [macos, ios, ios-simulator, pybind, profiling, llm]
with:
default-packages: ""
job-name: build
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: macos-14-xlarge
python-version: 3.12
submodules: recursive
timeout: 90
script: |
set -eux
${CONDA_RUN} ./install_requirements.sh > /dev/null
${CONDA_RUN} cmake --preset ${{ matrix.preset }}
${CONDA_RUN} cmake --build cmake-out -j$(( $(sysctl -n hw.ncpu) - 1 ))
zephyr:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
strategy:
fail-fast: false
matrix:
preset: [zephyr]
with:
job-name: build
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: linux.2xlarge
docker-image: ci-image:executorch-ubuntu-22.04-zephyr-sdk
submodules: recursive
timeout: 90
script: |
set -eux
# The generic Linux job chooses to use base env, not the one setup by the image
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"
./install_requirements.sh > /dev/null
# Download toolchain
toolchain_url="https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.2/toolchain_linux-x86_64_arm-zephyr-eabi.tar.xz"
toolchain_dir="arm-zephyr-eabi"
curl --output "${toolchain_dir}.tar.xz" -L "${toolchain_url}"
# Verify download
echo "93128be0235cf5cf5f1ee561aa6eac5f ${toolchain_dir}.tar.xz" > arm-zephyr-eabi.md5
md5sum -c --strict arm-zephyr-eabi.md5
# Extract and install to PATH
tar xf "${toolchain_dir}.tar.xz"
rm -f "${toolchain_dir}.tar.xz"
toolchain_bin_path="$(cd ${toolchain_dir}/bin && pwd)"
export PATH=$PATH:${toolchain_bin_path}
# Build Arm Zephyr Preset
cmake --preset ${{ matrix.preset }}
cmake --build cmake-out -j$(( $(nproc) - 1 ))
linux:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
strategy:
fail-fast: false
matrix:
preset: [linux, pybind, llm]
runner: [linux.2xlarge, linux.arm64.2xlarge]
docker-image: [executorch-ubuntu-22.04-clang12, executorch-ubuntu-22.04-gcc11-aarch64]
# Excluding specific runner + docker image combinations that don't make sense:
# - Excluding the ARM64 gcc image on the x86 runner (linux.2xlarge)
# - Excluding the x86 clang image on the ARM64 runner (linux.arm64.2xlarge)
exclude:
- runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-gcc11-aarch64
- runner: linux.arm64.2xlarge
docker-image: executorch-ubuntu-22.04-clang12
with:
job-name: build
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: ${{ matrix.runner }}
docker-image: ci-image:${{ matrix.docker-image }}
submodules: recursive
timeout: 90
script: |
set -eux
# The generic Linux job chooses to use base env, not the one setup by the image
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"
./install_requirements.sh > /dev/null
cmake --preset ${{ matrix.preset }}
cmake --build cmake-out -j$(( $(nproc) - 1 ))
windows:
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
strategy:
fail-fast: false
matrix:
preset: [pybind, windows]
with:
job-name: build
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
script: |
set -eux
git config --global http.sslBackend openssl
git submodule update --init --recursive
conda init powershell
powershell -Command "& {
Set-PSDebug -Trace 1
\$ErrorActionPreference = 'Stop'
\$PSNativeCommandUseErrorActionPreference = \$true
conda create --yes --quiet -n et python=3.12
conda activate et
python install_requirements.py
cmake --preset ${{ matrix.preset }} -T ClangCL
if (\$LASTEXITCODE -ne 0) {
Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE."
exit \$LASTEXITCODE
}
\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
cmake --build cmake-out -j \$numCores
if (\$LASTEXITCODE -ne 0) {
Write-Host "CMake build was unsuccessful. Exit code: \$LASTEXITCODE."
exit \$LASTEXITCODE
}
}"