Skip to content

Commit

Permalink
Simplify workflow, run aarch on cirun
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer committed Jan 5, 2025
1 parent 3ee10cb commit 54111e5
Showing 1 changed file with 26 additions and 47 deletions.
73 changes: 26 additions & 47 deletions .github/workflows/testpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,23 @@ env:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, 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
include:
- os: ubuntu-latest
platform: osx-arm64
- os: macos-14
platform: linux-64
- os: macos-14
- os: cirun-linux-aarch64--${{ github.run_id }}
platform: linux-aarch64
- os: macos-14
- os: macos-13
platform: osx-64
- os: macos-14
platform: win-64
- os: macos-13
platform: linux-64
- os: macos-13
platform: linux-aarch64
- os: macos-13
platform: osx-arm64
- os: macos-13
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
platform: win-64

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -54,7 +33,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
environments: beta
frozen: true

# Workaround for https://github.com/RoboStack/ros-humble/pull/141#issuecomment-1941919816
Expand All @@ -66,14 +45,14 @@ jobs:
# 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::"
# - 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'
Expand Down Expand Up @@ -111,39 +90,39 @@ jobs:
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'
if: steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && 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'
if: steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && 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-13' && matrix.platform == 'osx-64'
if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && 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'
if: steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && 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'
if: steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64'
run: |
# Workaround for problem related to long paths
echo "CONDA_BLD_PATH=C:\\bld\\" >> $GITHUB_ENV
Expand All @@ -162,31 +141,31 @@ jobs:
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'
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.platform == 'linux-64'
run: |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-jazzy -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'
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.platform == 'linux-aarch64'
run: |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-jazzy -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-13' && matrix.platform == 'osx-64'
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.platform == 'osx-64'
run: |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform osx-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform osx-64 -m ./conda_build_config.yaml -c robostack-jazzy -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'
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.platform == 'osx-arm64'
run: |
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform osx-arm64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform osx-arm64 -m ./conda_build_config.yaml -c robostack-jazzy -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'
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64'
run: |
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing

0 comments on commit 54111e5

Please sign in to comment.