-
Notifications
You must be signed in to change notification settings - Fork 39
143 lines (128 loc) · 4.59 KB
/
github-opengjk-examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Run all demos
run-name: ${{ github.actor }} is running
on:
push:
schedule:
- cron: '0 0 1,15 * *'
jobs:
C_GCC:
runs-on: ubuntu-latest
container: mmontanari/devenv:buildenv-fedora
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: cmake -E make_directory build
- run: cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Release ..
- run: cmake --build build
- run: cmake -E chdir build/examples/c/ ./example_lib_opengjk_ce
C_msvs:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on windows
run: |
choco install ninja cmake
ninja --version
cmake --version
- run: cmake -E make_directory build
- run: cmake -E chdir build cmake ..
- run: cmake --build build
- run: cmake -E copy build/examples/c/Debug/example_lib_opengjk_ce.exe build/examples/c
- run: cmake -E chdir build/examples/c/ ./example_lib_opengjk_ce.exe
Cython:
runs-on: ubuntu-latest
container: mmontanari/devenv:buildenv-ubuntu
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: apt-get update -y && apt-get install python3-setuptools python3-pip -y
- run: pip3 install numpy pytest scipy Cython
- run: cd examples/cython/ && python3 setup.py build_ext --inplace && python3 pygjk_trial.py
- run: cd examples/cython/ && pytest test.py
PythonCTypes:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Python ${{matrix.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python_version}}
- name: Get dependencies
run: |
python -m pip install --upgrade pip
- name: CMake config
run: cmake -B ${{github.workspace}}/build
env:
BUILD_CTYPES: 1
CMAKE_BUILD_TYPE: Release
- name: CMake build
working-directory: ${{github.workspace}}/build
run: make
- name: Debug library symbols
run: |
echo "Checking library symbols..."
nm -D ${{github.workspace}}/build/libopengjk_ce.so
echo "Checking library dependencies..."
ldd ${{github.workspace}}/build/libopengjk_ce.so
- name: Copy library to module directory
run: |
# Create the destination directory if it doesn't exist
mkdir -p ${{github.workspace}}/examples/python_ctypes/src/pyopengjk/
# Copy the library to the module directory
cp ${{github.workspace}}/build/libopengjk_ce.so ${{github.workspace}}/examples/python_ctypes/src/pyopengjk/
- name: Python build
working-directory: ${{github.workspace}}/examples/python_ctypes/
run: pip install -e .[test]
- name: Python test
working-directory: ${{github.workspace}}/examples/python_ctypes/
run: pytest -vv
CSharp:
runs-on: ubuntu-latest
container: mono:latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: apt-get update && apt-get install gcc cmake -y
- run: cmake -E make_directory build
# Using single precision
- run: cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MONO=ON -DSINGLE_PRECISION=ON ..
- run: cmake --build build --target opengjk_ce
- run: cmake -E chdir build make install
- run: cmake -E copy build/*opengjk_ce* examples/cs/
- run: cd examples/cs/ && mcs -out:main.exe main.cs && mono main.exe
GO:
runs-on: ubuntu-latest
container: mmontanari/devenv:buildenv-fedora
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.15
- run: cd examples/go/openGJK && go build && go test -v
Octave:
runs-on: ubuntu-latest
container: gnuoctave/octave:7.3.0
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: cd examples/matlab/; octave runme.m
Zig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build and run
run: cd examples/zig && zig build && zig build run