Skip to content

Commit 72cf92c

Browse files
committed
update CI
1 parent 0a87c38 commit 72cf92c

File tree

1 file changed

+51
-38
lines changed

1 file changed

+51
-38
lines changed

.github/workflows/test.yml

+51-38
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,14 +30,29 @@ jobs:
2930
os: "ubuntu"
3031
- pm: "ros"
3132
os: "ubuntu"
33+
#- pm: "brew" TODO
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

44+
# aarch64
45+
- name: Set up QEMU
46+
if: matrix.arch == 'aarch64'
47+
uses: docker/setup-qemu-action@v3
48+
with:
49+
platforms: all
50+
3551
# pip
3652
- if: matrix.pm == 'pip'
3753
uses: actions/setup-python@v4 # required only because macos-latest still has python 2 by default…
3854
with:
39-
python-version: "3.11"
55+
python-version: "3.13"
4056
- if: matrix.pm == 'pip'
4157
run: pip install pin[build]
4258
- if: matrix.pm == 'pip'
@@ -52,15 +68,16 @@ jobs:
5268

5369
# nix
5470
- if: matrix.pm == 'nix'
55-
uses: cachix/install-nix-action@v21
56-
with:
57-
nix_path: nixpkgs=channel:nixpkgs-unstable
71+
uses: cachix/install-nix-action@v30
5872
- if: matrix.pm == 'nix'
59-
run: nix-channel --update
73+
uses: cachix/cachix-action@v15
74+
with:
75+
name: gepetto
76+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
6077
- if: matrix.pm == 'nix'
6178
run: >
62-
nix shell 'nixpkgs#python311Packages.pinocchio' -c
63-
nix develop 'nixpkgs#python311Packages.pinocchio' -c
79+
nix shell 'nixpkgs#python3Packages.pinocchio' -c
80+
nix develop 'nixpkgs#python3Packages.pinocchio' -c
6481
env | grep .=. >> $GITHUB_ENV
6582
6683
# robotpkg
@@ -71,7 +88,7 @@ jobs:
7188
echo "deb [arch=amd64 signed-by=/robotpkg.gpg] ${ROBOTPKG_URL}/pub ${UBUNTU} robotpkg"
7289
| sudo tee /etc/apt/sources.list.d/robotpkg.list
7390
- if: matrix.pm == 'robotpkg'
74-
run: sudo apt-get update && sudo apt-get install -qy robotpkg-py310-pinocchio
91+
run: sudo apt-get update && sudo apt-get install -qy robotpkg-py3*-pinocchio
7592
- if: matrix.pm == 'robotpkg'
7693
run: echo "CMAKE_PREFIX_PATH=/opt/openrobots" >> $GITHUB_ENV
7794

@@ -100,33 +117,29 @@ jobs:
100117
- run: cmake --build build
101118
- run: ./build/main
102119

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

0 commit comments

Comments
 (0)