File tree 5 files changed +50
-0
lines changed
5 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check version.h values
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ pull_request :
7
+ jobs :
8
+ check-version :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : install packages
13
+ run : sudo apt update && sudo apt install libssl-dev libsrtp2-dev
14
+ - name : submodules
15
+ run : git submodule update --init --recursive --depth 1
16
+ - name : cmake
17
+ run : cmake -B build -DUSE_GNUTLS=0 -DUSE_SYSTEM_SRTP=1 -DWARNINGS_AS_ERRORS=1
18
+ - name : check diff
19
+ run : |
20
+ if ! git diff --exit-code
21
+ then
22
+ exit 1
23
+ fi
24
+
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ set(LIBDATACHANNEL_HEADERS
118
118
${CMAKE_CURRENT_SOURCE_DIR} /include /rtc/rtcpnackresponder.hpp
119
119
${CMAKE_CURRENT_SOURCE_DIR} /include /rtc/utils.hpp
120
120
${CMAKE_CURRENT_SOURCE_DIR} /include /rtc/plihandler.hpp
121
+ ${CMAKE_CURRENT_SOURCE_DIR} /include /rtc/version .h
121
122
)
122
123
123
124
set (LIBDATACHANNEL_IMPL_SOURCES
@@ -252,6 +253,11 @@ else()
252
253
add_library (Usrsctp::Usrsctp ALIAS usrsctp)
253
254
endif ()
254
255
256
+ configure_file (
257
+ ${PROJECT_SOURCE_DIR} /cmake/version .h.in
258
+ ${CMAKE_CURRENT_SOURCE_DIR} /include /rtc/version .h
259
+ )
260
+
255
261
add_library (datachannel SHARED
256
262
${LIBDATACHANNEL_SOURCES}
257
263
${LIBDATACHANNEL_HEADERS}
Original file line number Diff line number Diff line change
1
+ #ifndef RTC_VERSION_H
2
+ #define RTC_VERSION_H
3
+
4
+ #define RTC_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
5
+ #define RTC_VERSION_MINOR @PROJECT_VERSION_MINOR@
6
+ #define RTC_VERSION_PATCH @PROJECT_VERSION_PATCH@
7
+ #define RTC_VERSION "@PROJECT_VERSION@"
8
+
9
+ #endif
Original file line number Diff line number Diff line change 9
9
#ifndef RTC_C_API
10
10
#define RTC_C_API
11
11
12
+ #include "version.h"
13
+
12
14
#ifdef __cplusplus
13
15
extern "C" {
14
16
#endif
Original file line number Diff line number Diff line change
1
+ #ifndef RTC_VERSION_H
2
+ #define RTC_VERSION_H
3
+
4
+ #define RTC_VERSION_MAJOR 0
5
+ #define RTC_VERSION_MINOR 20
6
+ #define RTC_VERSION_PATCH 1
7
+ #define RTC_VERSION "0.20.1"
8
+
9
+ #endif
You can’t perform that action at this time.
0 commit comments