Skip to content

Commit d40cfe6

Browse files
committed
CI: Consider OpenSSL 3.0 and no hisi dev
OpenSSL use default folder: ./configure --libdir=/usr/lib64/ossl-modules/ Only compile if no hisi hardware, such as X86 Signed-off-by: Zhangfei Gao <[email protected]>
1 parent c08f25a commit d40cfe6

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/scripts/ci.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lock() {
1414
pending=0
1515
while [ "$exit_code" != 0 ]; do
1616
exit_code=0
17-
mkdir ${LOCK_FILE} &> /dev/null || exit_code=$?
17+
sudo mkdir ${LOCK_FILE} &> /dev/null || exit_code=$?
1818
if [ "$exit_code" != 0 ]; then
1919
if [ "$pending" = 0 ]; then
2020
# Some script is accessing hardware
@@ -27,7 +27,7 @@ lock() {
2727

2828
unlock() {
2929
if [ -d ${LOCK_FILE} ]; then
30-
rmdir ${LOCK_FILE}
30+
sudo rmdir ${LOCK_FILE}
3131
echo "Release lock"
3232
fi
3333
}
@@ -57,7 +57,11 @@ REPO_TYPE=$(detect_repository)
5757
echo "repo: $REPO_TYPE"
5858

5959
mkdir -p "$BUILD_DIR"
60-
sudo chmod 666 /dev/hisi_* 2>/dev/null || echo "/dev/hisi_* do not exist"
60+
61+
sudo chmod 666 /dev/hisi_* 2>/dev/null || {
62+
echo "no hisi hardware, only compile"
63+
ONLY_COMPILE=1
64+
}
6165

6266
build_uadk() {
6367
./cleanup.sh
@@ -71,6 +75,10 @@ build_uadk() {
7175
make -j$(nproc)
7276
sudo make install
7377

78+
if [ -n "$ONLY_COMPILE" ]; then
79+
exit 0
80+
fi
81+
7482
sudo ./test/sanity_test.sh
7583
}
7684

@@ -80,17 +88,20 @@ build_uadk_engine() {
8088
echo "OpenSSL major version is "$major_version
8189

8290
if (( major_version >= 3 )); then
83-
dir="/usr/local/lib/ossl-modules/"
91+
dir="/usr/lib64/ossl-modules/"
8492
else
8593
dir="/usr/local/lib/engines-1.1/"
8694
fi
8795

8896
autoreconf -i
8997
./configure --libdir="$dir" CFLAGS=-Wall
90-
9198
make -j$(nproc)
9299
sudo make install
93100

101+
if [ -n "$ONLY_COMPILE" ]; then
102+
exit 0
103+
fi
104+
94105
./test/sanity_test.sh
95106
}
96107

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ on:
66

77
jobs:
88
build-and-test:
9-
runs-on: [self-hosted, linux, arm64]
9+
runs-on: ${{ matrix.runner }}
10+
strategy:
11+
matrix:
12+
runner:
13+
- [self-hosted, linux, x64]
14+
- [self-hosted, linux, arm64]
15+
steps:
16+
- run: echo "CI on ${{ matrix.runner }}"
1017

1118
steps:
1219
- name: Checkout code

0 commit comments

Comments
 (0)