linux-64 - rebuild Christmas 2024 - switch to rattler-build #419
Workflow file for this run
This file contains 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: | |
paths: | |
- '*.yaml' | |
env: | |
ROS_VERSION: 2 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-14, windows-2019] | |
platform: [linux-64, linux-aarch64, osx-64, win-64, osx-arm64] | |
environment: [beta] | |
exclude: | |
- os: ubuntu-latest | |
platform: win-64 | |
- os: ubuntu-latest | |
platform: osx-64 | |
- os: ubuntu-latest | |
platform: osx-arm64 | |
- os: macos-14 | |
platform: linux-64 | |
- os: macos-14 | |
platform: linux-aarch64 | |
- os: macos-14 | |
platform: osx-64 | |
- os: macos-14 | |
platform: win-64 | |
- os: macos-latest | |
platform: linux-64 | |
- os: macos-latest | |
platform: linux-aarch64 | |
- os: macos-latest | |
platform: osx-arm64 | |
- os: macos-latest | |
platform: win-64 | |
- os: windows-2019 | |
platform: linux-64 | |
- os: windows-2019 | |
platform: linux-aarch64 | |
- os: windows-2019 | |
platform: osx-64 | |
- os: windows-2019 | |
platform: osx-arm64 | |
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/setup-pixi@v0.8.1 | |
with: | |
environments: ${{ matrix.environment }} | |
frozen: true | |
# 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' | |
- shell: bash -l {0} | |
if: matrix.platform == 'linux-aarch64' | |
run: | | |
echo "::group::Configure binfmt_misc" | |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes | |
export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" | |
export GIT_BRANCH="$(basename $GITHUB_REF)" | |
echo "::endgroup::" | |
- name: Install libgl1-mesa-dev (only for linux-aarch64) | |
if: matrix.platform == 'linux-aarch64' | |
shell: bash -l {0} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxi-dev libxmu-dev | |
# 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 | |
- name: Debug pkg-config problem | |
if: contains(matrix.os, 'windows') | |
shell: bash -l {0} | |
run: | | |
rm -rf /c/Strawberry | |
- name: Check what files have changed | |
id: filecheck | |
shell: bash -l {0} | |
run: | | |
git fetch origin main | |
# continue on error | |
set +e | |
git diff --exit-code --name-only origin/main -- vinca_linux_64.yaml > /dev/null | |
echo "::set-output name=LINUX_YAML_CHANGED::${?}" | |
git diff --exit-code --name-only origin/main -- vinca_linux_aarch64.yaml > /dev/null | |
echo "::set-output name=LINUX_AARCH_YAML_CHANGED::${?}" | |
git diff --exit-code --name-only origin/main -- vinca_osx.yaml > /dev/null | |
echo "::set-output name=OSX_YAML_CHANGED::${?}" | |
git diff --exit-code --name-only origin/main -- vinca_osx_arm64.yaml > /dev/null | |
echo "::set-output name=OSX_ARM_YAML_CHANGED::${?}" | |
git diff --exit-code --name-only origin/main -- vinca_win.yaml > /dev/null | |
echo "::set-output name=WIN_YAML_CHANGED::${?}" | |
- name: Generate recipes for linux-64 | |
shell: bash -l {0} | |
if: steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.os == 'ubuntu-latest' && matrix.platform == 'linux-64' | |
run: | | |
cp vinca_linux_64.yaml vinca.yaml | |
mkdir -p recipes | |
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-64 -m -n | |
ls -la recipes | |
- name: Generate recipes for linux-aarch64 | |
shell: bash -l {0} | |
if: steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.os == 'ubuntu-latest' && matrix.platform == 'linux-aarch64' | |
run: | | |
cp vinca_linux_aarch64.yaml vinca.yaml | |
mkdir -p recipes | |
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-aarch64 -m -n | |
ls -la recipes | |
- name: Generate recipes for osx-64 | |
shell: bash -l {0} | |
if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.os == 'macos-latest' && matrix.platform == 'osx-64' | |
run: | | |
cp vinca_osx.yaml vinca.yaml | |
mkdir -p recipes | |
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-64 -m -n | |
ls -la recipes | |
- name: Generate recipes for osx-arm64 | |
shell: bash -l {0} | |
if: steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.os == 'macos-14' && matrix.platform == 'osx-arm64' | |
run: | | |
cp vinca_osx_arm64.yaml vinca.yaml | |
mkdir -p recipes | |
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-arm64 -m -n | |
ls -la recipes | |
- name: Generate recipes for win-64 | |
shell: bash -l {0} | |
if: steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.os == 'windows-2019' && matrix.platform == 'win-64' | |
run: | | |
cp vinca_win.yaml vinca.yaml | |
mkdir -p recipes | |
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform win-64 -m -n | |
ls -la recipes cp vinca_win.yaml vinca.yaml | |
- name: Check if there are packages to be built | |
id: newrecipecheck | |
shell: bash -l {0} | |
run: | | |
# continue on error | |
set +e | |
test ! -d recipes | |
echo "::set-output name=RECIPE_CREATED::${?}" | |
- name: Build recipes for linux-64 | |
shell: bash -l {0} | |
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.os == 'ubuntu-latest' && matrix.platform == 'linux-64' | |
run: | | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe additional_recipes/ros2-distro-mutex/ -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
- name: Build recipes for linux-aarch64 | |
shell: bash -l {0} | |
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.os == 'ubuntu-latest' && matrix.platform == 'linux-aarch64' | |
run: | | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe additional_recipes/ros2-distro-mutex/ -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
- name: Build recipes for osx-64 | |
shell: bash -l {0} | |
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.os == 'macos-latest' && matrix.platform == 'osx-64' | |
run: | | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe additional_recipes/ros2-distro-mutex/ -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
- name: Build recipes for osx-arm64 | |
shell: bash -l {0} | |
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.os == 'macos-14' && matrix.platform == 'osx-arm64' | |
run: | | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe additional_recipes/ros2-distro-mutex/ -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
- name: Build recipes for win-64 | |
shell: bash -l {0} | |
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.os == 'windows-2019' && matrix.platform == 'win-64' | |
run: | | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe additional_recipes/ros2-distro-mutex/ -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing | |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing |