@@ -2,6 +2,11 @@ name: Tests
22
33on :
44 push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
510 schedule :
611 - cron : " 0 7 * * 0"
712
1217
1318jobs :
1419 test :
15- name : " Test ${{ matrix.pm }} on ${{ matrix.os }}"
20+ name : " Test ${{ matrix.pm }} on ${{ matrix.os }} ${{ matrix.arch }} "
1621 runs-on : " ${{ matrix.os }}-latest"
1722 strategy :
1823 fail-fast : false
1924 matrix :
2025 pm : ["pip", "conda", "nix"]
2126 os : ["ubuntu", "macos", "windows"]
27+ arch : ["main"]
2228 exclude :
2329 - pm : " pip"
2430 os : " windows"
@@ -29,18 +35,29 @@ jobs:
2935 os : " ubuntu"
3036 - pm : " ros"
3137 os : " ubuntu"
38+ - pm : " brew"
39+ os : " macos"
40+ - arch : " aarch64"
41+ os : " ubuntu"
42+ pm : " pip"
43+ - arch : " aarch64"
44+ os : " ubuntu"
45+ pm : " nix"
3246 steps :
3347 - uses : actions/checkout@v3
3448
35- # pip
36- - if : matrix.pm == 'pip'
37- uses : actions/setup-python@v4 # required only because macos-latest still has python 2 by default…
49+ # aarch64
50+ - name : Set up QEMU
51+ if : matrix.arch == 'aarch64'
52+ uses : docker/setup-qemu-action@v3
3853 with :
39- python-version : " 3.11"
40- - if : matrix.pm == 'pip'
41- run : pip install pin[build]
42- - if : matrix.pm == 'pip'
43- run : echo "CMAKE_PREFIX_PATH=$(cmeel cmake)" >> $GITHUB_ENV
54+ platforms : all
55+
56+ # brew
57+ - if : matrix.pm == 'brew'
58+ uses : Homebrew/actions/setup-homebrew@master
59+ - if : matrix.pm == 'brew'
60+ run : brew install pinocchio
4461
4562 # conda
4663 - if : matrix.pm == 'conda'
@@ -52,17 +69,28 @@ jobs:
5269
5370 # nix
5471 - if : matrix.pm == 'nix'
55- uses : cachix/install-nix-action@v21
56- with :
57- nix_path : nixpkgs=channel:nixpkgs-unstable
72+ uses : cachix/install-nix-action@v30
5873 - if : matrix.pm == 'nix'
59- run : nix-channel --update
74+ uses : cachix/cachix-action@v15
75+ with :
76+ name : gepetto
77+ authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
6078 - if : matrix.pm == 'nix'
6179 run : >
62- nix shell 'nixpkgs#python311Packages .pinocchio' -c
63- nix develop 'nixpkgs#python311Packages .pinocchio' -c
80+ nix shell 'nixpkgs#python3Packages .pinocchio' -c
81+ nix develop 'nixpkgs#python3Packages .pinocchio' -c
6482 env | grep .=. >> $GITHUB_ENV
6583
84+ # pip
85+ - if : matrix.pm == 'pip'
86+ uses : actions/setup-python@v4 # required only because macos-latest still has python 2 by default…
87+ with :
88+ python-version : " 3.13"
89+ - if : matrix.pm == 'pip'
90+ run : pip install pin[build]
91+ - if : matrix.pm == 'pip'
92+ run : echo "CMAKE_PREFIX_PATH=$(cmeel cmake)" >> $GITHUB_ENV
93+
6694 # robotpkg
6795 - if : matrix.pm == 'robotpkg'
6896 run : sudo wget "${ROBOTPKG_URL}/robotpkg.gpg" -O /robotpkg.gpg
7199 echo "deb [arch=amd64 signed-by=/robotpkg.gpg] ${ROBOTPKG_URL}/pub ${UBUNTU} robotpkg"
72100 | sudo tee /etc/apt/sources.list.d/robotpkg.list
73101 - if : matrix.pm == 'robotpkg'
74- run : sudo apt-get update && sudo apt-get install -qy robotpkg-py310 -pinocchio
102+ run : sudo apt-get update && sudo apt-get install -qy robotpkg-py3* -pinocchio
75103 - if : matrix.pm == 'robotpkg'
76104 run : echo "CMAKE_PREFIX_PATH=/opt/openrobots" >> $GITHUB_ENV
77105
@@ -100,33 +128,29 @@ jobs:
100128 - run : cmake --build build
101129 - run : ./build/main
102130
103- # test-docker:
104- # runs-on: "ubuntu-latest"
105- # container: ${{ matrix.container }}
106- # strategy:
107- # matrix:
108- # container: ["archlinux/archlinux:base-devel"]
109- # steps:
110- # - uses: actions/checkout@v3
111-
112- # - run: curl https://github.com/Morganamilo/paru/releases/download/v1.11.2/paru-v1.11.2-x86_64.tar.zst -O
113- # - run: pacman -Syu "paru-*.tar.zst"
114- # - run: paru -Syu pinocchio
115-
116- # - run: cmake -B build -S .
117- # - run: cmake --build build
118- # - run: ./build/main
119-
120- # test-aarch64:
121- # runs-on: "ubuntu-latest"
122- # container: ${{ matrix.container }}
123- # strategy:
124- # matrix:
125- # container: ["archlinux/archlinux:base-devel"]
126- # pm: ["pip", "conda", "nix"]
127- # steps:
128- # - uses: actions/checkout@v3
129-
130- # - run: cmake -B build -S .
131- # - run: cmake --build build
132- # - run: ./build/main
131+ test-arch :
132+ runs-on : " ubuntu-latest"
133+ container : ${{ matrix.container }}
134+ strategy :
135+ fail-fast : false
136+ matrix :
137+ container : ["archlinux/archlinux:base-devel"]
138+ env :
139+ MAKEFLAGS : -j4
140+ steps :
141+ - uses : actions/checkout@v3
142+
143+ # install paru
144+ - run : pacman -Syu --noconfirm git
145+ - run : useradd -mG wheel user
146+ - run : echo "%wheel ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
147+ - run : git clone https://aur.archlinux.org/paru-bin.git
148+ - run : chown -R user paru-bin
149+ - run : su user -c "makepkg -D paru-bin -si --noconfirm"
150+
151+ # use paru to install pinocchio and its dependencies from AUR
152+ - run : su user -c "paru -Syu --noconfirm pinocchio"
153+
154+ - run : cmake -B build -S .
155+ - run : cmake --build build
156+ - run : ./build/main
0 commit comments