From e3b585dfde03827adc2fec7512b29c8b43c4e1bd Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 23 Nov 2024 18:02:21 +0800 Subject: [PATCH] Refactor libv8 unzip steps in CI workflows for improved clarity and consistency --- .github/workflows/leakcheck.yml | 6 ++++-- .github/workflows/test.yml | 6 ++++-- .github/workflows/v8build.yml | 10 +++++++++- .gitignore | 2 ++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/leakcheck.yml b/.github/workflows/leakcheck.yml index f020aae04..c0a2a56bb 100644 --- a/.github/workflows/leakcheck.yml +++ b/.github/workflows/leakcheck.yml @@ -22,9 +22,11 @@ jobs: - name: Unzip libv8 run: | - files=$(find . -name "libv8.a.zip") + files=$(find . -name "libv8*.zip") for file in $files; do - unzip -o -d $(dirname $file) $file + dir=$(dirname "$file") # Get the directory where the ZIP file is located + echo "Extracting $file to directory $dir" + unzip -o -d $dir $file done - name: Go Test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52a0363c4..1fb1912b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,9 +27,11 @@ jobs: - name: Unzip libv8 run: | - files=$(find . -name "libv8-*.zip") + files=$(find . -name "libv8*.zip") for file in $files; do - unzip -o -d $(dirname $file) $file + dir=$(dirname "$file") # Get the directory where the ZIP file is located + echo "Extracting $file to directory $dir" + unzip -o -d $dir $file done - name: Go Test diff --git a/.github/workflows/v8build.yml b/.github/workflows/v8build.yml index 17e724a5a..93752d22d 100644 --- a/.github/workflows/v8build.yml +++ b/.github/workflows/v8build.yml @@ -21,10 +21,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - lfs: true submodules: true fetch-depth: 1 + - name: Unzip libv8 + run: | + files=$(find . -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 + done + - name: Update depot_tools fetch config run: cd deps/depot_tools && git config --unset-all remote.origin.fetch; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* shell: bash diff --git a/.gitignore b/.gitignore index 530cd503c..e3449c18e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ deps/.gclient_previous* c.out .idea/* /v8go.test +deps/*/libv8.a +deps/*/__MACOSX