[pre-commit.ci] pre-commit autoupdate #32
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
name: Tests | |
on: | |
push: | |
schedule: | |
- cron: "0 7 * * 0" | |
env: | |
ROBOTPKG_URL: "http://robotpkg.openrobots.org/packages/debian" | |
ROS: "humble" | |
UBUNTU: "jammy" | |
jobs: | |
test: | |
name: "Test ${{ matrix.pm }} on ${{ matrix.os }}" | |
runs-on: "${{ matrix.os }}-latest" | |
strategy: | |
fail-fast: false | |
matrix: | |
pm: ["pip", "conda", "nix"] | |
os: ["ubuntu", "macos", "windows"] | |
exclude: | |
- pm: "pip" | |
os: "windows" | |
- pm: "nix" | |
os: "windows" | |
include: | |
- pm: "robotpkg" | |
os: "ubuntu" | |
- pm: "ros" | |
os: "ubuntu" | |
steps: | |
- uses: actions/checkout@v3 | |
# pip | |
- if: matrix.pm == 'pip' | |
uses: actions/setup-python@v4 # required only because macos-latest still has python 2 by default… | |
with: | |
python-version: "3.11" | |
- if: matrix.pm == 'pip' | |
run: pip install pin[build] | |
- if: matrix.pm == 'pip' | |
run: echo "CMAKE_PREFIX_PATH=$(cmeel cmake)" >> $GITHUB_ENV | |
# conda | |
- if: matrix.pm == 'conda' | |
uses: conda-incubator/setup-miniconda@v3 | |
- if: matrix.pm == 'conda' | |
run: conda install -n test -c conda-forge pinocchio | |
- if: matrix.pm == 'conda' | |
run: echo "CMAKE_PREFIX_PATH=$CONDA/envs/test" >> $GITHUB_ENV | |
# nix | |
- if: matrix.pm == 'nix' | |
uses: cachix/install-nix-action@v21 | |
with: | |
nix_path: nixpkgs=channel:nixpkgs-unstable | |
- if: matrix.pm == 'nix' | |
run: nix-channel --update | |
- if: matrix.pm == 'nix' | |
run: > | |
nix shell 'nixpkgs#python311Packages.pinocchio' -c | |
nix develop 'nixpkgs#python311Packages.pinocchio' -c | |
env | grep .=. >> $GITHUB_ENV | |
# robotpkg | |
- if: matrix.pm == 'robotpkg' | |
run: sudo wget "${ROBOTPKG_URL}/robotpkg.gpg" -O /robotpkg.gpg | |
- if: matrix.pm == 'robotpkg' | |
run: > | |
echo "deb [arch=amd64 signed-by=/robotpkg.gpg] ${ROBOTPKG_URL}/pub ${UBUNTU} robotpkg" | |
| sudo tee /etc/apt/sources.list.d/robotpkg.list | |
- if: matrix.pm == 'robotpkg' | |
run: sudo apt-get update && sudo apt-get install -qy robotpkg-py310-pinocchio | |
- if: matrix.pm == 'robotpkg' | |
run: echo "CMAKE_PREFIX_PATH=/opt/openrobots" >> $GITHUB_ENV | |
# ros | |
- if: matrix.pm == 'ros' | |
run: sudo wget "https://raw.githubusercontent.com/ros/rosdistro/master/ros.key" -O /ros.key | |
- if: matrix.pm == 'ros' | |
run: > | |
echo "deb [arch=amd64 signed-by=/ros.key] http://packages.ros.org/ros2/ubuntu ${UBUNTU} main" | |
| sudo tee /etc/apt/sources.list.d/ros.list | |
- if: matrix.pm == 'ros' | |
run: sudo apt-get update && sudo apt-get install -qy "ros-${ROS}-pinocchio" | |
- if: matrix.pm == 'ros' | |
run: echo "CMAKE_PREFIX_PATH=/opt/ros/${ROS}" >> $GITHUB_ENV | |
# windows | |
# thx https://gist.github.com/justinian/81a2e55c89e8301a8a96 & https://stackoverflow.com/a/74547513/1368502 | |
- if: matrix.os == 'windows' | |
run: > | |
cmd /c '"%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 && set' | |
| Select-String -Pattern "^(.*?)=(.*)$" | |
| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- run: cmake -B build -S . | |
- run: cmake --build build | |
- run: ./build/main | |
#test-docker: | |
#runs-on: "ubuntu-latest" | |
#container: ${{ matrix.container }} | |
#strategy: | |
#matrix: | |
#container: ["archlinux/archlinux:base-devel"] | |
#steps: | |
#- uses: actions/checkout@v3 | |
#- run: curl https://github.com/Morganamilo/paru/releases/download/v1.11.2/paru-v1.11.2-x86_64.tar.zst -O | |
#- run: pacman -Syu "paru-*.tar.zst" | |
#- run: paru -Syu pinocchio | |
#- run: cmake -B build -S . | |
#- run: cmake --build build | |
#- run: ./build/main | |
#test-aarch64: | |
#runs-on: "ubuntu-latest" | |
#container: ${{ matrix.container }} | |
#strategy: | |
#matrix: | |
#container: ["archlinux/archlinux:base-devel"] | |
#pm: ["pip", "conda", "nix"] | |
#steps: | |
#- uses: actions/checkout@v3 | |
#- run: cmake -B build -S . | |
#- run: cmake --build build | |
#- run: ./build/main |