@@ -34,37 +34,48 @@ jobs:
3434 name : CentOS 7 build to confirm no issues once used downstream
3535 runs-on : ubuntu-latest
3636 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
3940 steps :
4041 - name : Set up base image dependencies
4142 run : |
4243 sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
4344 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
4647 yum install -y epel-release
47- yum install -y cmake3
48+ yum install -y libcurl-devel
49+
4850 shell : bash
4951
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)
5162 run : |
52- git clone --recursive https://github.com/calyptia /ctraces.git
63+ git clone https://github.com/fluent /ctraces.git
5364 shell : bash
5465
5566 - name : Check out the branch (1.8.3 version of Git)
5667 env :
5768 BRANCH_NAME : ${{ github.head_ref }}
5869 run : |
5970 git checkout "$BRANCH_NAME"
71+ git submodule update --init --recursive
6072 shell : bash
6173 working-directory : ctraces
6274
6375 - name : Run compilation
6476 run : |
65- cmake3 -DCTR_TESTS=on -DCTR_DEV=on .
77+ cmake -DCTR_TESTS=on -DCTR_DEV=on .
6678 make
67- shell : bash
6879 working-directory : ctraces
6980
7081 build-debian :
@@ -75,19 +86,40 @@ jobs:
7586 - name : Set up base image dependencies
7687 run : |
7788 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
79108 shell : bash
80109
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
84115
85116 - name : Run compilation
86117 run : |
87- cmake -DCTR_TESTS=On .
118+ cmake -DCTR_TESTS=On -DCTR_DEV=On .
88119 make all
89120 CTEST_OUTPUT_ON_FAILURE=1 make test
90121 shell : bash
122+ working-directory : ctraces
91123
92124 build-unix-arm64 :
93125 name : Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }}
@@ -164,16 +196,40 @@ jobs:
164196 contents : read
165197 runs-on : ubuntu-latest
166198 steps :
167- - uses : actions/checkout@v4
199+ - name : Check out the repository
200+ uses : actions/checkout@v4
168201 with :
169202 submodules : true
170203
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
177233
178234 # this job provides the single required status for PRs to be merged into main.
179235 # instead of updating the protected branch status in github, developers can update the needs section below
0 commit comments