Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions .github/scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lock() {
pending=0
while [ "$exit_code" != 0 ]; do
exit_code=0
mkdir ${LOCK_FILE} &> /dev/null || exit_code=$?
sudo mkdir ${LOCK_FILE} &> /dev/null || exit_code=$?
if [ "$exit_code" != 0 ]; then
if [ "$pending" = 0 ]; then
# Some script is accessing hardware
Expand All @@ -27,7 +27,7 @@ lock() {

unlock() {
if [ -d ${LOCK_FILE} ]; then
rmdir ${LOCK_FILE}
sudo rmdir ${LOCK_FILE}
echo "Release lock"
fi
}
Expand Down Expand Up @@ -57,20 +57,28 @@ REPO_TYPE=$(detect_repository)
echo "repo: $REPO_TYPE"

mkdir -p "$BUILD_DIR"
sudo chmod 666 /dev/hisi_* 2>/dev/null || echo "/dev/hisi_* do not exist"

sudo chmod 666 /dev/hisi_* 2>/dev/null || {
echo "no hisi hardware, only compile"
ONLY_COMPILE=1
}

build_uadk() {
./cleanup.sh
./autogen.sh
if [ -n "$1" ]; then
./conf.sh "$1"
./configure --enable-static --disable-shared --with-static_drv
else
./conf.sh
./configure
fi

make -j$(nproc)
sudo make install

if [ -n "$ONLY_COMPILE" ]; then
exit 0
fi

sudo ./test/sanity_test.sh
}

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

if (( major_version >= 3 )); then
dir="/usr/local/lib/ossl-modules/"
dir="/usr/lib64/ossl-modules/"
else
dir="/usr/local/lib/engines-1.1/"
fi

autoreconf -i
./configure --libdir="$dir" CFLAGS=-Wall

make -j$(nproc)
sudo make install

if [ -n "$ONLY_COMPILE" ]; then
exit 0
fi

./test/sanity_test.sh
}

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ on:

jobs:
build-and-test:
runs-on: [self-hosted, linux, arm64]

runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- [self-hosted, linux, x64]
- [self-hosted, linux, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
Loading