From f3b3e80ccfd70225a61833247c1c8add9b35df32 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 23 Nov 2024 18:09:21 +0800 Subject: [PATCH] Add unzip step for libv8 in CI workflows and build script --- .github/workflows/build-macos.yml | 11 ++++++++++- .github/workflows/pr-test.yml | 11 ++++++++++- .github/workflows/unit-test.yml | 11 ++++++++++- docker/build/build.sh | 9 +++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 626770c7..3753def2 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -56,8 +56,17 @@ jobs: uses: actions/checkout@v4 with: repository: yaoapp/v8go - lfs: true path: v8go + + - name: Unzip libv8 + run: | + files=$(find ./v8go -name "libv8*.zip") + for file in $files; do + dir=$(dirname "$file") # Get the directory where the ZIP file is located + echo "Extracting $file to directory $dir" + unzip -o -d $dir $file + rm -rf $dir/__MACOSX + done - name: Checkout XGen v1.0 # ** XGEN will be renamed to DUI in the feature. and move to the new repository. ** diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index eb7b6805..7abd9ae9 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -143,9 +143,18 @@ jobs: uses: actions/checkout@v4 with: repository: yaoapp/v8go - lfs: true path: v8go + - name: Unzip libv8 + run: | + files=$(find ./v8go -name "libv8*.zip") + for file in $files; do + dir=$(dirname "$file") # Get the directory where the ZIP file is located + echo "Extracting $file to directory $dir" + unzip -o -d $dir $file + rm -rf $dir/__MACOSX + done + - name: Checkout Demo App uses: actions/checkout@v4 with: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 83810d82..56f54ae0 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -101,9 +101,18 @@ jobs: uses: actions/checkout@v4 with: repository: yaoapp/v8go - lfs: true path: v8go + - name: Unzip libv8 + run: | + files=$(find ./v8go -name "libv8*.zip") + for file in $files; do + dir=$(dirname "$file") # Get the directory where the ZIP file is located + echo "Extracting $file to directory $dir" + unzip -o -d $dir $file + rm -rf $dir/__MACOSX + done + - name: Checkout Demo App uses: actions/checkout@v4 with: diff --git a/docker/build/build.sh b/docker/build/build.sh index dbb75448..abe435dd 100644 --- a/docker/build/build.sh +++ b/docker/build/build.sh @@ -9,6 +9,15 @@ git clone https://github.com/yaoapp/yao-init.git /app/yao-init && \ git clone https://github.com/yaoapp/yao.git /app/yao +files=$(find /app/v8go -name "libv8*.zip") +for file in $files; do + dir=$(dirname "$file") # Get the directory where the ZIP file is located + echo "Extracting $file to directory $dir" + unzip -o -d $dir $file + rm -rf $dir/__MACOSX +done + + cd /app/yao && \ export VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g")