Skip to content

Commit 3c71fb7

Browse files
committed
update CI
1 parent 0a87c38 commit 3c71fb7

File tree

1 file changed

+64
-45
lines changed

1 file changed

+64
-45
lines changed

.github/workflows/test.yml

+64-45
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
matrix:
2020
pm: ["pip", "conda", "nix"]
2121
os: ["ubuntu", "macos", "windows"]
22+
arch: ["x86_64"]
2223
exclude:
2324
- pm: "pip"
2425
os: "windows"
@@ -29,18 +30,29 @@ jobs:
2930
os: "ubuntu"
3031
- pm: "ros"
3132
os: "ubuntu"
33+
- pm: "brew"
34+
os: "macos"
35+
- arch: "aarch64"
36+
os: "ubuntu"
37+
pm: "pip"
38+
- arch: "aarch64"
39+
os: "ubuntu"
40+
pm: "nix"
3241
steps:
3342
- uses: actions/checkout@v3
3443

35-
# pip
36-
- if: matrix.pm == 'pip'
37-
uses: actions/setup-python@v4 # required only because macos-latest still has python 2 by default…
44+
# aarch64
45+
- name: Set up QEMU
46+
if: matrix.arch == 'aarch64'
47+
uses: docker/setup-qemu-action@v3
3848
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
49+
platforms: all
50+
51+
# brew
52+
- if: matrix.pm == 'brew'
53+
uses: Homebrew/actions/setup-homebrew@master
54+
- if: matrix.pm == 'brew'
55+
run: brew install pinocchio
4456

4557
# conda
4658
- if: matrix.pm == 'conda'
@@ -52,17 +64,28 @@ jobs:
5264

5365
# nix
5466
- if: matrix.pm == 'nix'
55-
uses: cachix/install-nix-action@v21
56-
with:
57-
nix_path: nixpkgs=channel:nixpkgs-unstable
67+
uses: cachix/install-nix-action@v30
5868
- if: matrix.pm == 'nix'
59-
run: nix-channel --update
69+
uses: cachix/cachix-action@v15
70+
with:
71+
name: gepetto
72+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
6073
- if: matrix.pm == 'nix'
6174
run: >
62-
nix shell 'nixpkgs#python311Packages.pinocchio' -c
63-
nix develop 'nixpkgs#python311Packages.pinocchio' -c
75+
nix shell 'nixpkgs#python3Packages.pinocchio' -c
76+
nix develop 'nixpkgs#python3Packages.pinocchio' -c
6477
env | grep .=. >> $GITHUB_ENV
6578
79+
# pip
80+
- if: matrix.pm == 'pip'
81+
uses: actions/setup-python@v4 # required only because macos-latest still has python 2 by default…
82+
with:
83+
python-version: "3.13"
84+
- if: matrix.pm == 'pip'
85+
run: pip install pin[build]
86+
- if: matrix.pm == 'pip'
87+
run: echo "CMAKE_PREFIX_PATH=$(cmeel cmake)" >> $GITHUB_ENV
88+
6689
# robotpkg
6790
- if: matrix.pm == 'robotpkg'
6891
run: sudo wget "${ROBOTPKG_URL}/robotpkg.gpg" -O /robotpkg.gpg
@@ -71,7 +94,7 @@ jobs:
7194
echo "deb [arch=amd64 signed-by=/robotpkg.gpg] ${ROBOTPKG_URL}/pub ${UBUNTU} robotpkg"
7295
| sudo tee /etc/apt/sources.list.d/robotpkg.list
7396
- if: matrix.pm == 'robotpkg'
74-
run: sudo apt-get update && sudo apt-get install -qy robotpkg-py310-pinocchio
97+
run: sudo apt-get update && sudo apt-get install -qy robotpkg-py3*-pinocchio
7598
- if: matrix.pm == 'robotpkg'
7699
run: echo "CMAKE_PREFIX_PATH=/opt/openrobots" >> $GITHUB_ENV
77100

@@ -100,33 +123,29 @@ jobs:
100123
- run: cmake --build build
101124
- run: ./build/main
102125

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
126+
test-arch:
127+
runs-on: "ubuntu-latest"
128+
container: ${{ matrix.container }}
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
container: ["archlinux/archlinux:base-devel"]
133+
env:
134+
CMAKE_GENERATOR: Ninja
135+
steps:
136+
- uses: actions/checkout@v3
137+
138+
# install paru
139+
- run: pacman -Syu --noconfirm git ninja
140+
- run: useradd -mG wheel user
141+
- run: echo "%wheel ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
142+
- run: git clone https://aur.archlinux.org/paru-bin.git
143+
- run: chown -R user paru-bin
144+
- run: su user -c "makepkg -D paru-bin -si --noconfirm"
145+
146+
# use paru to install pinocchio and its dependencies from AUR
147+
- run: su user -c "paru -Syu --noconfirm pinocchio"
148+
149+
- run: cmake -B build -S .
150+
- run: cmake --build build
151+
- run: ./build/main

0 commit comments

Comments
 (0)