Skip to content

Commit 135ea2d

Browse files
committed
fix centos ci
1 parent 9206ec9 commit 135ea2d

File tree

3 files changed

+50
-26
lines changed

3 files changed

+50
-26
lines changed

.github/workflows/cpp_full_node_workflow.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,27 @@ jobs:
111111

112112
build_centos:
113113
name: build_centos full node
114-
runs-on: ${{ matrix.os }}
114+
runs-on: ubuntu-latest
115115
continue-on-error: true
116116
strategy:
117117
fail-fast: false
118118
matrix:
119-
os: [ubuntu-latest]
119+
container:
120+
- centos-7.9
120121
container:
121122
image: docker.io/centos:7
122123
volumes:
123124
- /usr/local/share/vcpkg:/usr/local/share/vcpkg
125+
- /node20217:/node20217:rw,rshared
126+
- ${{ matrix.container == 'centos-7.9' && '/node20217:/__e/node20:ro,rshared' || ' ' }}
124127
steps:
125-
- uses: actions/checkout@v3
126-
with:
127-
clean: false
128+
- name: install nodejs20glibc2.17
129+
if: ${{ matrix.container == 'centos-7.9' }}
130+
run: |
131+
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
132+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
133+
- name: Check out the repo
134+
uses: actions/checkout@v4
128135
- uses: actions/cache@v3
129136
id: deps_cache
130137
with:
@@ -157,6 +164,10 @@ jobs:
157164
with:
158165
toolchain: nightly-2022-07-28
159166
override: true
167+
- name: Prepare vcpkg
168+
if: runner.os != 'Windows'
169+
uses: friendlyanon/setup-vcpkg@v1
170+
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 }
160171
- name: Check disk space
161172
run: df . -h
162173
- name: Free disk space
@@ -178,7 +189,7 @@ jobs:
178189
rm -rf python
179190
mkdir -p cpp/build
180191
cd cpp/build
181-
cmake3 -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
192+
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
182193
- name: FreeDiskSpace
183194
run: |
184195
df -lh

.github/workflows/cpp_sdk_workflow.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,25 +107,27 @@ jobs:
107107

108108
build_centos_for_sdk:
109109
name: build_centos_for_sdk
110-
runs-on: ${{ matrix.os }}
110+
runs-on: ubuntu-latest
111111
continue-on-error: true
112112
strategy:
113113
fail-fast: false
114114
matrix:
115-
os: [ubuntu-latest]
115+
container:
116+
- centos-7.9
116117
container:
117118
image: docker.io/centos:7
118119
volumes:
119120
- /usr/local/share/vcpkg:/usr/local/share/vcpkg
121+
- /node20217:/node20217:rw,rshared
122+
- ${{ matrix.container == 'centos-7.9' && '/node20217:/__e/node20:ro,rshared' || ' ' }}
120123
steps:
121-
- name: replace nodes
124+
- name: install nodejs20glibc2.17
125+
if: ${{ matrix.container == 'centos-7.9' }}
122126
run: |
123-
sudo rm -rf /__e/node20
124-
echo "#### nodes list: "`ls /__e/node*`
125-
cd /__e/ ln -s /__e/node16 node20
126-
- uses: actions/checkout@v3
127-
with:
128-
clean: false
127+
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
128+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
129+
- name: Check out the repo
130+
uses: actions/checkout@v4
129131
- uses: actions/cache@v3
130132
id: deps_cache
131133
with:
@@ -156,11 +158,15 @@ jobs:
156158
yum install -y java-11-openjdk-devel git make gcc gcc-c++ glibc-static glibc-devel openssl cmake3 ccache devtoolset-11 llvm-toolset-7.0 rh-perl530-perl libzstd-devel zlib-devel flex bison python-devel python3-devel
157159
yum install -y rh-perl530-perl cmake3 zlib-devel ccache lcov python-devel python3-devel
158160
yum install -y git
161+
- name: Prepare vcpkg
162+
if: runner.os != 'Windows'
163+
uses: friendlyanon/setup-vcpkg@v1
164+
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 }
159165
- name: Build
160166
run: |
161167
alias cmake='cmake3'
162168
. /opt/rh/devtoolset-11/enable
163169
mkdir -p cpp/build
164170
cd cpp/build
165-
cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
171+
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
166172
cmake3 --build . --parallel 3

.github/workflows/cpp_toolkit_workflow.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,27 @@ jobs:
113113

114114
build_centos_for_toolkit:
115115
name: build_centos_for_toolkit
116-
runs-on: ${{ matrix.os }}
116+
runs-on: ubuntu-latest
117117
continue-on-error: true
118118
strategy:
119119
fail-fast: false
120120
matrix:
121-
os: [ubuntu-latest]
121+
container:
122+
- centos-7.9
122123
container:
123124
image: docker.io/centos:7
124125
volumes:
125126
- /usr/local/share/vcpkg:/usr/local/share/vcpkg
127+
- /node20217:/node20217:rw,rshared
128+
- ${{ matrix.container == 'centos-7.9' && '/node20217:/__e/node20:ro,rshared' || ' ' }}
126129
steps:
127-
- name: Set up Node.js 16.x
128-
uses: actions/setup-node@v2
129-
with:
130-
node-version: "16.x"
131-
- uses: actions/checkout@v3
132-
with:
133-
clean: false
130+
- name: install nodejs20glibc2.17
131+
if: ${{ matrix.container == 'centos-7.9' }}
132+
run: |
133+
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
134+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
135+
- name: Check out the repo
136+
uses: actions/checkout@v4
134137
- uses: actions/cache@v3
135138
id: deps_cache
136139
with:
@@ -161,13 +164,17 @@ jobs:
161164
yum install -y java-11-openjdk-devel git make gcc gcc-c++ glibc-static glibc-devel openssl cmake3 ccache devtoolset-11 llvm-toolset-7.0 rh-perl530-perl libzstd-devel zlib-devel flex bison python-devel python3-devel
162165
yum install -y rh-perl530-perl cmake3 zlib-devel ccache lcov python-devel python3-devel
163166
yum install -y git
167+
- name: Prepare vcpkg
168+
if: runner.os != 'Windows'
169+
uses: friendlyanon/setup-vcpkg@v1
170+
with: { committish: 51b14cd4e1230dd51c11ffeff6f7d53c61cc5297 }
164171
- name: Build
165172
run: |
166173
alias cmake='cmake3'
167174
. /opt/rh/devtoolset-11/enable
168175
mkdir -p cpp/build
169176
cd cpp/build
170-
cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_WEDPR_TOOLKIT=ON -DBUILD_PYTHON=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
177+
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_WEDPR_TOOLKIT=ON -DBUILD_PYTHON=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
171178
cmake3 --build . --parallel 3
172179
- uses: actions/upload-artifact@v3
173180
with:

0 commit comments

Comments
 (0)