File tree 5 files changed +43
-5
lines changed
5 files changed +43
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on :
3
+ push :
4
+ branches : []
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ env :
9
+ PICO_SDK_PATH : " /opt/pico_sdk"
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v2
13
+ - name : Install dependencies
14
+ run : |
15
+ sudo apt-get update
16
+ sudo apt-get install -y cmake build-essential gcc-arm-none-eabi git freecad googletest google-mock libgtest-dev libgmock-dev
17
+ - name : Prepare PICO-SDK
18
+ run : |
19
+ sudo git clone --depth 1 https://github.com/raspberrypi/pico-sdk $PICO_SDK_PATH && \
20
+ pushd $PICO_SDK_PATH && \
21
+ sudo git submodule update --init && \
22
+ popd
23
+ - name : Configure build
24
+ run : cmake -B build -S .
25
+ - name : Build firmware
26
+ run : cmake --build build
27
+ - name : Run tests
28
+ run : ctest --test-dir build/tests --output-on-failure
Original file line number Diff line number Diff line change 1
1
2
- find_file (FREECAD_EXECUTABLE NAMES FreeCADCmd freecad.cmd)
2
+ find_file (FREECAD_EXECUTABLE NAMES FreeCADCmd freecad.cmd freecadcmd )
3
3
4
4
if (EXISTS ${FREECAD_EXECUTABLE} )
5
5
add_subdirectory (CrealityCR10Smart_DualGearExtruder)
Original file line number Diff line number Diff line change
1
+ ![ GitHub Workflow Status] ( https://img.shields.io/github/actions/workflow/status/slavaz/SmartFilamentSensor/ci.yml )
2
+
1
3
Smart Filament Sensor
2
4
===
3
5
Original file line number Diff line number Diff line change 1
1
2
- execute_process (COMMAND git describe --abbrev=0 --tags
2
+
3
+ find_file (GIT_EXECUTABLE NAMES git)
4
+
5
+ if (NOT EXISTS ${GIT_EXECUTABLE} )
6
+ message ( FATAL_ERROR "Git not found!" )
7
+ endif ()
8
+
9
+
10
+ execute_process (COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 --tags
3
11
OUTPUT_VARIABLE GIT_TAG
4
12
ERROR_QUIET)
5
13
6
14
if (NOT GIT_TAG)
7
15
set (GIT_TAG "0.0" )
8
16
endif ()
9
17
10
- execute_process (COMMAND git log --pretty=format:'%h' -n 1
18
+ execute_process (COMMAND ${GIT_EXECUTABLE} log --pretty=format:'%h' -n 1
11
19
OUTPUT_VARIABLE GIT_REV ERROR_QUIET)
12
20
13
- execute_process (COMMAND git rev-parse --abbrev-ref HEAD
21
+ execute_process (COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
14
22
OUTPUT_VARIABLE GIT_BRANCH ERROR_QUIET)
15
23
16
24
string (STRIP "${GIT_TAG} " GIT_TAG)
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Other tools
24
24
You also need to install GoogleTest and Freecad.
25
25
26
26
deb-based distros:
27
- ` sudo apt install googletest google-mock freecad `
27
+ ` sudo apt install googletest google-mock libgtest-dev libgmock-dev freecad `
28
28
29
29
RPM-based distros:
30
30
You can’t perform that action at this time.
0 commit comments