|
| 1 | +name: CI |
1 | 2 |
|
2 | | - |
3 | | -```yaml |
4 | | -name: PANKH CI |
5 | | -
|
6 | | -on: |
7 | | - push: |
8 | | - branches: [ main ] |
9 | | - pull_request: |
10 | | - branches: [ main ] |
| 3 | +on: [push, pull_request] |
11 | 4 |
|
12 | 5 | jobs: |
13 | 6 | build-and-test: |
14 | 7 | runs-on: ubuntu-latest |
15 | 8 |
|
16 | 9 | steps: |
17 | | - - name: Checkout code |
18 | | - uses: actions/checkout@v4 |
| 10 | + - name: Checkout repository |
| 11 | + uses: actions/checkout@v3 |
19 | 12 |
|
20 | | - - name: Install dependencies |
| 13 | + - name: Install dependencies (Intel oneAPI or use g++) |
21 | 14 | run: | |
22 | | - sudo apt-get update |
23 | | - sudo apt-get install -y g++ libeigen3-dev gnuplot |
24 | | - wget https://github.com/nlohmann/json/releases/download/v3.11.3/json.hpp -O include/json.hpp |
| 15 | + sudo apt update |
| 16 | + sudo apt install -y g++ |
25 | 17 |
|
26 | | - - name: Download Catch2 |
| 18 | + - name: Compile the main solver |
27 | 19 | run: | |
28 | | - wget https://github.com/catchorg/Catch2/releases/download/v3.4.0/catch.hpp -O include/catch.hpp |
| 20 | + mkdir -p output_files |
| 21 | + g++ -o PANKH_solver src/*.cpp -Iinclude -std=c++11 |
29 | 22 |
|
30 | | - - name: Compile and run tests |
| 23 | + - name: Compile the test |
31 | 24 | run: | |
32 | | - g++ -std=c++17 -Iinclude -I/usr/include/eigen3 tests/test_geometry.cpp src/geometry.cpp src/VectorOperations.cpp -o tests/test_geometry |
33 | | - g++ -std=c++17 -Iinclude -I/usr/include/eigen3 tests/test_kinematics.cpp src/kinematics.cpp src/MotionParameters.cpp src/VectorOperations.cpp src/constants.cpp -o tests/test_kinematics |
34 | | - g++ -std=c++17 -Iinclude -I/usr/include/eigen3 tests/test_velocity.cpp src/velocity.cpp src/VectorOperations.cpp src/MotionParameters.cpp src/constants.cpp -o tests/test_velocity |
35 | | - g++ -std=c++17 -Iinclude -I/usr/include/eigen3 tests/test_influencematrix.cpp src/InfluenceMatrix.cpp src/VectorOperations.cpp src/geometry.cpp -o tests/test_influencematrix |
36 | | - g++ -std=c++17 -Iinclude -I/usr/include/eigen3 tests/test_newtonraphson.cpp src/NewtonRaphsonNonLinear.cpp src/VectorOperations.cpp src/geometry.cpp src/velocity.cpp src/MotionParameters.cpp src/constants.cpp -o tests/test_newtonraphson |
37 | | - ./tests/test_geometry |
38 | | - ./tests/test_kinematics |
39 | | - ./tests/test_velocity |
40 | | - ./tests/test_influencematrix |
41 | | - ./tests/test_newtonraphson |
42 | | -``` |
| 25 | + g++ -o tests/test tests/test.cpp -std=c++11 |
43 | 26 |
|
| 27 | + - name: Run the test |
| 28 | + run: | |
| 29 | + ./tests/test |
0 commit comments