@@ -34,37 +34,48 @@ jobs:
34
34
name : CentOS 7 build to confirm no issues once used downstream
35
35
runs-on : ubuntu-latest
36
36
container : centos:7
37
- permissions :
38
- contents : none
37
+ env :
38
+ # workaround required for checkout@v3, https://github.com/actions/checkout/issues/1590
39
+ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
39
40
steps :
40
41
- name : Set up base image dependencies
41
42
run : |
42
43
sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
43
44
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
44
- yum -y update && \
45
- yum install -y ca-certificates cmake curl-devel gcc gcc-c++ git make wget && \
45
+ yum -y update
46
+ yum install -y ca-certificates gcc gcc-c++ git make wget
46
47
yum install -y epel-release
47
- yum install -y cmake3
48
+ yum install -y libcurl-devel
49
+
48
50
shell : bash
49
51
50
- - name : Clone repo with submodules (1.8.3 version of Git)
52
+ - name : Install CMake 3.20.0
53
+ run : |
54
+ CMAKE_VERSION=3.20.0
55
+ wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
56
+ chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
57
+ ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
58
+ ln -sf /usr/local/bin/cmake /usr/bin/cmake
59
+ cmake --version
60
+
61
+ - name : Clone repo without submodules (1.8.3 version of Git)
51
62
run : |
52
- git clone --recursive https://github.com/calyptia /ctraces.git
63
+ git clone https://github.com/fluent /ctraces.git
53
64
shell : bash
54
65
55
66
- name : Check out the branch (1.8.3 version of Git)
56
67
env :
57
68
BRANCH_NAME : ${{ github.head_ref }}
58
69
run : |
59
70
git checkout "$BRANCH_NAME"
71
+ git submodule update --init --recursive
60
72
shell : bash
61
73
working-directory : ctraces
62
74
63
75
- name : Run compilation
64
76
run : |
65
- cmake3 -DCTR_TESTS=on -DCTR_DEV=on .
77
+ cmake -DCTR_TESTS=on -DCTR_DEV=on .
66
78
make
67
- shell : bash
68
79
working-directory : ctraces
69
80
70
81
build-debian :
@@ -75,19 +86,40 @@ jobs:
75
86
- name : Set up base image dependencies
76
87
run : |
77
88
apt-get update
78
- apt-get install -y build-essential cmake make git
89
+ apt-get install -y build-essential wget make gcc g++ git libcurl4-openssl-dev
90
+
91
+ - name : Install CMake 3.20.0
92
+ run : |
93
+ CMAKE_VERSION=3.20.0
94
+ wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
95
+ chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
96
+ ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
97
+
98
+ # Ensure the new CMake is found first
99
+ echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
100
+ export PATH="/usr/local/bin:$PATH"
101
+
102
+ # Confirm CMake installation
103
+ /usr/local/bin/cmake --version
104
+
105
+ - name : Clone repository and submodules
106
+ run : |
107
+ git clone --recursive https://github.com/fluent/ctraces.git
79
108
shell : bash
80
109
81
- - uses : actions/checkout@v4
82
- with :
83
- submodules : true
110
+ - name : Initialize submodules
111
+ run : |
112
+ git submodule update --init --recursive
113
+ shell : bash
114
+ working-directory : ctraces
84
115
85
116
- name : Run compilation
86
117
run : |
87
- cmake -DCTR_TESTS=On .
118
+ cmake -DCTR_TESTS=On -DCTR_DEV=On .
88
119
make all
89
120
CTEST_OUTPUT_ON_FAILURE=1 make test
90
121
shell : bash
122
+ working-directory : ctraces
91
123
92
124
build-unix-arm64 :
93
125
name : Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }}
@@ -164,16 +196,40 @@ jobs:
164
196
contents : read
165
197
runs-on : ubuntu-latest
166
198
steps :
167
- - uses : actions/checkout@v4
199
+ - name : Check out the repository
200
+ uses : actions/checkout@v4
168
201
with :
169
202
submodules : true
170
203
171
- - uses : docker://lpenz/ghaction-cmake:0.19
172
- with :
173
- preset : ${{ matrix.preset }}
174
- # dependencies_debian: ''
175
- cmakeflags : ' -DCTR_TESTS=On -DCMT_DEV=on .'
176
- build_command : make all
204
+ - name : Install Dependencies
205
+ run : |
206
+ sudo apt-get update
207
+ sudo apt-get install -y \
208
+ clang \
209
+ valgrind \
210
+ wget \
211
+ make \
212
+ gcc \
213
+ g++ \
214
+ git \
215
+ libcurl4-openssl-dev
216
+
217
+ - name : Install CMake 3.20.0 or higher
218
+ run : |
219
+ CMAKE_VERSION=3.20.0
220
+ wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
221
+ chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
222
+ sudo ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
223
+ sudo ln -sf /usr/local/bin/cmake /usr/bin/cmake
224
+ /usr/local/bin/cmake --version
225
+
226
+ - name : Initialize Submodules
227
+ run : git submodule update --init --recursive
228
+
229
+ - name : Configure and Build
230
+ run : |
231
+ /usr/local/bin/cmake -DCTR_TESTS=On -DCTR_DEV=On -DCMT_DEV=on .
232
+ make all
177
233
178
234
# this job provides the single required status for PRs to be merged into main.
179
235
# instead of updating the protected branch status in github, developers can update the needs section below
0 commit comments