Skip to content

Full rebuild September 2026 + Sync cross-distribution Vinca package coverage #1234

Full rebuild September 2026 + Sync cross-distribution Vinca package coverage

Full rebuild September 2026 + Sync cross-distribution Vinca package coverage #1234

Workflow file for this run

on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
env:
ROS_VERSION: 2
# Change to 'true' to enable the cache upload as artifacts
SAVE_CACHE_AS_ARTIFACT: 'true'
# Change to 'true' to ignore cache and force a full rebuild, but please restore to 'false' before merging
IGNORE_CACHE_AND_DO_FULL_REBUILD: 'false'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux-64
folder_cache: 'output/linux-64'
- os: ubuntu-24.04-arm
platform: linux-aarch64
folder_cache: 'output/linux-aarch64'
- os: macos-15-intel
platform: osx-64
folder_cache: 'output/osx-64'
- os: macos-15
platform: osx-arm64
folder_cache: 'output/osx-arm64'
- os: windows-2022
platform: win-64
folder_cache: 'C:/bld/win-64'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: prefix-dev/setup-pixi@v0.10.0
with:
frozen: true
pixi-version: v0.75.0
- name: Check sorting
if: matrix.platform == 'linux-64'
shell: bash -l {0}
run: |
pixi run sort --check
- name: Long paths workarounds for win-64
shell: bash -l {0}
if: matrix.platform == 'win-64'
run: |
# Workaround for problem related to long paths
echo "CONDA_BLD_PATH=C:\\bld\\" >> $GITHUB_ENV
mkdir /c/bld
- name: Enable Windows long path support
if: matrix.platform == 'win-64'
shell: pwsh
run: |
# MSVC/MSBuild (VS 2019 16.0+, which windows-2022's toolset is well past)
# honor the Win32 long-path opt-in via this registry key. Without it,
# cl.exe can fail with a cryptic "fatal error C1083: Cannot open
# compiler generated file: ''" once a target's generated intermediate
# (.obj/.tlog) path exceeds the legacy 260-char MAX_PATH, which is easy
# to hit given how deeply nested and long rosidl-generated target names
# can get even under the shortened C:\bld\ prefix above.
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
# Workaround for https://github.com/RoboStack/ros-humble/pull/141#issuecomment-1941919816
- name: Clean up PATH
if: contains(matrix.os, 'windows')
uses: egor-tensin/cleanup-path@v5
with:
# cygpath in C:\Program Files\Git\usr\bin is used by install micromamba
# git in C:\Program Files\Git\bin is used by pip install git+
dirs: 'C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin'
# For some reason, the Strawberry perl's pkg-config is found
# instead of the conda's one, so let's delete the /c/Strawberry directory
# Furthermore, we also need to remove an older SDK that is used and can result in compilation problems
# And we also remove the vcpkg installed in the image, to avoid that projects pick it
- name: Remove problematic files of GitHub Actions images
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
rm -rf /c/Strawberry
rm -rf "/c/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/"
- name: Disable git auto-maintenance in source caches
shell: bash -l {0}
run: |
git config --global maintenance.auto false
- name: Generate recipes
shell: bash -l {0}
run: |
set -e
for attempt in 1 2 3; do
rm -rf recipes
mkdir -p recipes
if pixi run -v vinca --platform ${{ matrix.platform }} -m -n; then
break
fi
if [[ "${attempt}" == "3" ]]; then
echo "Recipe generation failed after ${attempt} attempts" >&2
exit 1
fi
echo "Recipe generation attempt ${attempt} failed; retrying..." >&2
sleep 15
done
- name: Check patches
shell: bash -l {0}
run: |
pixi run check-patches
- name: Restore build cache
id: cache-restore
uses: actions/cache/restore@v5
with:
path: |
${{ matrix.folder_cache }}
key: ${{ runner.os }}-${{ matrix.platform }}-pr-${{ github.event.pull_request.number }}
# allow a later run to pick up a cache that has an extra suffix
restore-keys: |
${{ runner.os }}-${{ matrix.platform }}-pr-${{ github.event.pull_request.number }}-
- name: Optional force full rebuild
if: ${{ env.IGNORE_CACHE_AND_DO_FULL_REBUILD == 'true' }}
shell: bash -l {0}
run: |
rm -rf ${{ matrix.folder_cache }}/*
- name: Delete specific outdated cache entries
shell: bash -l {0}
run: |
# rm -rf ${{ matrix.folder_cache }}/ros-humble-autoware-trajectory* 2>/dev/null || true
rm -rf ${{ matrix.folder_cache }}/ros-humble-async-web-server-cpp* 2>/dev/null || true
rm -rf ${{ matrix.folder_cache }}/ros-humble-popf* 2>/dev/null || true
# Corrupt ~34KB cached artifact (same recurring pattern as other win-64 packages this cycle) missing its installed cmake config.
rm -rf ${{ matrix.folder_cache }}/ros-humble-nav2-behavior-tree* 2>/dev/null || true
mkdir -p ${{ matrix.folder_cache }}
pixi run rattler-index fs ${{ matrix.folder_cache }}/.. --force
- name: See packages restored by cache
shell: bash -l {0}
run: |
ls ${{ matrix.folder_cache }} || true
- name: Build recipes
id: build-recipes
shell: bash -l {0}
run: |
set +e
EXTRA_BUILD_ARGS=""
if [ "${{ matrix.platform }}" == "win-64" ]; then
# Drop the timestamp suffix from the per-package build work dir
# (rattler-build_<name>_<timestamp> -> rattler-build_<name>) to claw
# back headroom under Windows' MAX_PATH for long package names, e.g.
# rosbag2_performance_benchmarking_msgs's generated rosidl Python
# typesupport targets (see error C1083 "Cannot open compiler
# generated file: ''").
EXTRA_BUILD_ARGS="--no-build-id"
fi
# --channel-priority disabled: resolvo would otherwise refuse a just-built local package once any other-channel build of the same name exists.
pixi run rattler-build build --recipe-dir recipes --target-platform ${{ matrix.platform }} -m ./conda_build_config.yaml -c conda-forge -c robostack-staging --skip-existing --channel-priority disabled $EXTRA_BUILD_ARGS 2>&1 | tee rattler-build.log
build_status=${PIPESTATUS[0]}
echo "exit-code=${build_status}" >> "$GITHUB_OUTPUT"
exit "$build_status"
- name: Summarize build result
if: always()
shell: bash -l {0}
run: |
pixi run python .github/scripts/summarize_rattler_build.py \
--log rattler-build.log \
--platform "${{ matrix.platform }}" \
--outcome "${{ steps.build-recipes.outcome }}" \
>> "$GITHUB_STEP_SUMMARY"
- name: Upload build log
if: always()
uses: actions/upload-artifact@v6
with:
name: build-log-${{ matrix.platform }}-${{ github.run_id }}-${{ github.run_attempt }}
path: rattler-build.log
if-no-files-found: warn
retention-days: 7
- name: See packages that will be saved in cache
shell: bash -l {0}
if: always()
run: |
ls ${{ matrix.folder_cache }} || true
- name: Save build cache
uses: actions/cache/save@v5
# Save partial output when the build fails or is cancelled by the job timeout; do not save when it was skipped.
if: ${{ always() && (steps.build-recipes.outcome == 'success' || steps.build-recipes.outcome == 'failure' || steps.build-recipes.outcome == 'cancelled') }}
with:
path: |
${{ matrix.folder_cache }}
key: ${{ runner.os }}-${{ matrix.platform }}-pr-${{ github.event.pull_request.number }}-${{ github.run_id }}-${{ github.run_attempt }}
- name: Generate GitHub Actions workflows to catch post-PR problems
shell: bash -l {0}
run: |
pixi run vinca-gha --platform ${{ matrix.platform }} --trigger-branch dummy_build_branch_as_it_is_unused -d ./recipes --batch_size 25
- name: Upload build cache as artifact
# Keep artifacts consistent with the cache: retain partial output from failed or cancelled builds, but not skipped builds.
if: ${{ always() && env.SAVE_CACHE_AS_ARTIFACT == 'true' && (steps.build-recipes.outcome == 'success' || steps.build-recipes.outcome == 'failure' || steps.build-recipes.outcome == 'cancelled') }}
uses: actions/upload-artifact@v6
with:
name: cache-${{ matrix.platform }}-${{ github.run_id }}
path: ${{ matrix.folder_cache }}
retention-days: 7