@@ -2,6 +2,11 @@ name: Tests
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
5
10
schedule :
6
11
- cron : " 0 7 * * 0"
7
12
12
17
13
18
jobs :
14
19
test :
15
- name : " Test ${{ matrix.pm }} on ${{ matrix.os }}"
20
+ name : " Test ${{ matrix.pm }} on ${{ matrix.os }} ${{ matrix.arch }} "
16
21
runs-on : " ${{ matrix.os }}-latest"
17
22
strategy :
18
23
fail-fast : false
19
24
matrix :
20
25
pm : ["pip", "conda", "nix"]
21
26
os : ["ubuntu", "macos", "windows"]
27
+ arch : ["main"]
22
28
exclude :
23
29
- pm : " pip"
24
30
os : " windows"
@@ -29,18 +35,29 @@ jobs:
29
35
os : " ubuntu"
30
36
- pm : " ros"
31
37
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"
32
46
steps :
33
47
- uses : actions/checkout@v3
34
48
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
38
53
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
44
61
45
62
# conda
46
63
- if : matrix.pm == 'conda'
@@ -52,17 +69,28 @@ jobs:
52
69
53
70
# nix
54
71
- 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
58
73
- 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 }}'
60
78
- if : matrix.pm == 'nix'
61
79
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
64
82
env | grep .=. >> $GITHUB_ENV
65
83
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
+
66
94
# robotpkg
67
95
- if : matrix.pm == 'robotpkg'
68
96
run : sudo wget "${ROBOTPKG_URL}/robotpkg.gpg" -O /robotpkg.gpg
71
99
echo "deb [arch=amd64 signed-by=/robotpkg.gpg] ${ROBOTPKG_URL}/pub ${UBUNTU} robotpkg"
72
100
| sudo tee /etc/apt/sources.list.d/robotpkg.list
73
101
- 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
75
103
- if : matrix.pm == 'robotpkg'
76
104
run : echo "CMAKE_PREFIX_PATH=/opt/openrobots" >> $GITHUB_ENV
77
105
@@ -100,33 +128,29 @@ jobs:
100
128
- run : cmake --build build
101
129
- run : ./build/main
102
130
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