Skip to content

Commit 68cde41

Browse files
authored
Fix the other CentOS CI (#194)
* fix other CentOS CI Signed-off-by: Nicolas Rol <[email protected]> * fix other CentOS CI Signed-off-by: Nicolas Rol <[email protected]> --------- Signed-off-by: Nicolas Rol <[email protected]>
1 parent 7e904f9 commit 68cde41

File tree

2 files changed

+27
-131
lines changed

2 files changed

+27
-131
lines changed

Diff for: .github/workflows/full-ci.yml

+13-65
Original file line numberDiff line numberDiff line change
@@ -64,76 +64,24 @@ jobs:
6464
cpp_centos7:
6565
name: Build C++ CentOS7
6666
runs-on: ubuntu-latest
67-
container: 'centos:centos7'
68-
env:
69-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
7067
steps:
71-
- name: Update mirrors
72-
run: |
73-
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
74-
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
75-
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
76-
77-
- name: Update Dependencies
78-
run: |
79-
yum update -y
80-
81-
- name: Install Dependencies 1
82-
run: |
83-
yum install -y epel-release
84-
85-
- name: Install Dependencies 2
86-
run: |
87-
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils
88-
89-
- name: Update mirrors again because why not
90-
run: |
91-
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
92-
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
93-
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
94-
95-
- name: Install Dependencies 3
96-
run: |
97-
yum install -y devtoolset-9
98-
99-
- name: Setup cmake
100-
uses: jwlawson/[email protected]
101-
with:
102-
cmake-version: '3.22.x'
103-
104-
- name: Checkout sources
105-
uses: actions/checkout@v3
106-
107-
- name: Download Boost-release
108-
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 # v1.1.1
109-
with:
110-
repo: 'ARnDOSrte/Boost'
111-
file: 'boost_1_73_0.zip'
112-
target: 'boost_1_73_0.zip'
113-
token: ${{ secrets.GITHUB_TOKEN }}
114-
115-
- name: Unzip Boost
116-
run: unzip boost_1_73_0.zip
68+
- name: Checkout
69+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
11770

118-
- name: Configure 3rd parties
71+
- name: Build the Docker image
11972
run: |
120-
source /opt/rh/devtoolset-9/enable
121-
cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build/external
73+
docker build -t centos7withcmake:latest $GITHUB_WORKSPACE --file $GITHUB_WORKSPACE/.github/workflows/docker/Dockerfile
12274
123-
- name: Build 3rd parties
75+
- name: Run build steps in Docker container
12476
run: |
125-
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2
126-
127-
- name: Configure CMake
128-
run: |
129-
source /opt/rh/devtoolset-9/enable
130-
cmake -S $GITHUB_WORKSPACE/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build/install -B $GITHUB_WORKSPACE/metrix-simulator/build
131-
132-
- name: Build
133-
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --target install --parallel 2
134-
135-
- name: Tests
136-
run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j2 --output-on-failure
77+
docker run --name build_container -v $GITHUB_WORKSPACE:/workspace centos7withcmake:latest /bin/bash -c "
78+
source /opt/rh/devtoolset-9/enable &&
79+
cmake -S /workspace/metrix-simulator/external -B /workspace/metrix-simulator/build/external &&
80+
cmake --build /workspace/metrix-simulator/build/external --parallel 2 &&
81+
cmake -S /workspace/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=/workspace/metrix-simulator/build/install -B /workspace/metrix-simulator/build &&
82+
cmake --build /workspace/metrix-simulator/build --target install --parallel 2 &&
83+
cd /workspace/metrix-simulator/build && ctest -j2 --output-on-failure
84+
"
13785
13886
cpp_oraclelinux8:
13987
name: Build C++ Oracle Linux 8

Diff for: .github/workflows/release-ci.yml

+14-66
Original file line numberDiff line numberDiff line change
@@ -34,76 +34,24 @@ jobs:
3434
cpp_centos7:
3535
name: Package C++ CentOS7
3636
runs-on: ubuntu-latest
37-
container: 'centos:centos7'
38-
env:
39-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
4037
steps:
41-
- name: Update mirrors
42-
run: |
43-
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
44-
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
45-
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
46-
47-
- name: Update Dependencies
48-
run: |
49-
yum update -y
50-
51-
- name: Install Dependencies 1
52-
run: |
53-
yum install -y epel-release
54-
55-
- name: Install Dependencies 2
56-
run: |
57-
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils
58-
59-
- name: Update mirrors again because why not
60-
run: |
61-
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
62-
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
63-
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
64-
65-
- name: Install Dependencies 3
66-
run: |
67-
yum install -y devtoolset-9
68-
69-
- name: Setup cmake
70-
uses: jwlawson/[email protected]
71-
with:
72-
cmake-version: '3.22.x'
73-
74-
- name: Checkout sources
75-
uses: actions/checkout@v3
76-
77-
- name: Download Boost-release
78-
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4 # v1.1.1
79-
with:
80-
repo: 'ARnDOSrte/Boost'
81-
file: 'boost_1_73_0.zip'
82-
target: 'boost_1_73_0.zip'
83-
token: ${{ secrets.GITHUB_TOKEN }}
84-
85-
- name: Unzip Boost
86-
run: unzip boost_1_73_0.zip
38+
- name: Checkout
39+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
8740

88-
- name: Configure 3rd parties
41+
- name: Build the Docker image
8942
run: |
90-
source /opt/rh/devtoolset-9/enable
91-
cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build/external
43+
docker build -t centos7withcmake:latest $GITHUB_WORKSPACE --file $GITHUB_WORKSPACE/.github/workflows/docker/Dockerfile
9244
93-
- name: Build 3rd parties
45+
- name: Run build steps in Docker container
9446
run: |
95-
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build/external --parallel 2
96-
97-
- name: Configure CMake
98-
run: |
99-
source /opt/rh/devtoolset-9/enable
100-
cmake -S $GITHUB_WORKSPACE/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build/install -B $GITHUB_WORKSPACE/metrix-simulator/build
101-
102-
- name: Build
103-
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build --target install --parallel 2
104-
105-
- name: Tests
106-
run: cd $GITHUB_WORKSPACE/metrix-simulator/build && ctest -j2 --output-on-failure
47+
docker run --name build_container -v $GITHUB_WORKSPACE:/workspace centos7withcmake:latest /bin/bash -c "
48+
source /opt/rh/devtoolset-9/enable &&
49+
cmake -S /workspace/metrix-simulator/external -B /workspace/metrix-simulator/build/external &&
50+
cmake --build /workspace/metrix-simulator/build/external --parallel 2 &&
51+
cmake -S /workspace/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DBoost_INCLUDE_DIR=/usr/local/src/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=/workspace/metrix-simulator/build/install -B /workspace/metrix-simulator/build &&
52+
cmake --build /workspace/metrix-simulator/build --target install --parallel 2 &&
53+
cd /workspace/metrix-simulator/build && ctest -j2 --output-on-failure
54+
"
10755
10856
- name: Prepare Metrix package
10957
id: metrix-install
@@ -116,7 +64,7 @@ jobs:
11664
echo "archive_path=$ARCHIVE_PATH" >> "$GITHUB_OUTPUT"
11765
11866
- name: Upload release package
119-
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 (nb: v0.1.15)
67+
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
12068
with:
12169
files: ${{ steps.metrix-install.outputs.archive_path }}.zip
12270

0 commit comments

Comments
 (0)