diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b6407a..1a12a3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,19 +8,30 @@ on: jobs: build: name: build (${{ matrix.platform }}) - runs-on: ${{ matrix.runs-on }} + 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@v6 + - 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@v4 with: key: build-cache-v2-${{ matrix.platform }}-${{ hashFiles('build.sh', 'setup.sh', '*/pyproject.toml', '*/setup.py', '*/build.sh') }} diff --git a/build.sh b/build.sh index 8b6b3d3..1e32c7e 100755 --- a/build.sh +++ b/build.sh @@ -48,6 +48,15 @@ if [[ -n "${BUILD_SH_IN_MANYLINUX:-}" ]]; then rm -rf "$pkg/$module/install" "$pkg/$module/toolchain" "$pkg/$module/bin" done fi + + # Install all manylinux system deps upfront — individual build.sh scripts + # run in parallel via uv, so concurrent dnf calls would race on the cache. + if command -v dnf &>/dev/null; then + dnf install -y -q \ + libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel \ + mesa-libGL-devel wayland-devel wayland-protocols-devel libxkbcommon-devel \ + xorg-x11-server-Xvfb xorg-x11-xkb-utils xkeyboard-config + fi fi export CMAKE_C_COMPILER_LAUNCHER=ccache diff --git a/imgui/build.sh b/imgui/build.sh index 5c3b93a..0eb0978 100755 --- a/imgui/build.sh +++ b/imgui/build.sh @@ -39,12 +39,9 @@ fi git -C glfw-src fetch --depth 1 origin "$GLFW_COMMIT" git -C glfw-src checkout --force "$GLFW_COMMIT" -# Install GLFW build dependencies +# Install GLFW build dependencies (manylinux deps installed centrally in build.sh) if [[ "$(uname)" == "Linux" ]]; then - if command -v dnf &>/dev/null; then - dnf install -y libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel mesa-libGL-devel \ - wayland-devel wayland-protocols-devel libxkbcommon-devel - elif command -v apt-get &>/dev/null; then + if command -v apt-get &>/dev/null; then if [ "$(id -u)" -eq 0 ]; then apt-get update && apt-get install -y libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libgl-dev \ libwayland-dev wayland-protocols libxkbcommon-dev