Adding packages web_video_server, async_web_server_cpp #504
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
workflow_dispatch: | |
env: | |
ROS_VERSION: 2 | |
# Change to 'true' to enable the cache upload as artifacts | |
SAVE_CACHE_AS_ARTIFACT: 'false' | |
# 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-13 | |
platform: osx-64 | |
folder_cache: 'output/osx-64' | |
- os: macos-14 | |
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@v4 | |
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/[email protected] | |
with: | |
frozen: true | |
- 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 | |
# 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@v4 | |
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 | |
- name: Debug pkg-config problem | |
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/" | |
# Regression for https://github.com/RoboStack/ros-jazzy/issues/44 | |
- name: Check that anaconda-client command works fine | |
shell: bash -l {0} | |
run: | | |
pixi run anaconda --version | |
- name: Generate recipes | |
shell: bash -l {0} | |
run: | | |
mkdir -p recipes | |
pixi run -v vinca --platform ${{ matrix.platform }} -m -n | |
- name: Check patches | |
shell: bash -l {0} | |
run: | | |
pixi run python check_patches_clean_apply.py | |
- name: Restore build cache | |
id: cache-restore | |
uses: actions/cache/restore@v4 | |
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: See packages restored by cache | |
shell: bash -l {0} | |
run: | | |
ls ${{ matrix.folder_cache }} || true | |
- name: Build recipes | |
shell: bash -l {0} | |
run: | | |
pixi run rattler-build build --recipe-dir recipes --target-platform ${{ matrix.platform }} -m ./conda_build_config.yaml -c conda-forge -c robostack-jazzy --skip-existing | |
- 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@v4 | |
if: always() | |
with: | |
path: | | |
${{ matrix.folder_cache }} | |
key: ${{ runner.os }}-${{ matrix.platform }}-pr-${{ github.event.pull_request.number }}-${{ github.run_id }}-${{ github.run_attempt }} | |
- name: Upload build cache as artifact | |
if: ${{ always() && env.SAVE_CACHE_AS_ARTIFACT == 'true' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cache-${{ matrix.platform }}-${{ github.run_id }} | |
path: ${{ matrix.folder_cache }} | |
retention-days: 7 |