mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-23 12:38:21 +00:00
Cache zip contents and verify ccache install
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
@@ -30,6 +30,7 @@ jobs:
|
|||||||
echo "ccache not found in container; installing."
|
echo "ccache not found in container; installing."
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ccache
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ccache
|
||||||
|
command -v ccache >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Mark workspace safe
|
- name: Mark workspace safe
|
||||||
|
|||||||
@@ -74,17 +74,20 @@ jobs:
|
|||||||
zip_add_unique() {
|
zip_add_unique() {
|
||||||
local target_name
|
local target_name
|
||||||
target_name="$(basename "$1")"
|
target_name="$(basename "$1")"
|
||||||
if [ -f eqemu-server-linux-x64.zip ] && unzip -Z1 eqemu-server-linux-x64.zip | grep -qx "$target_name"; then
|
if [ -f eqemu-server-linux-x64.zip ] && printf '%s\n' "$ZIP_CONTENTS" | grep -qx "$target_name"; then
|
||||||
echo "Skipping duplicate library: $target_name"
|
echo "Skipping duplicate library: $target_name"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
zip_add "$1"
|
zip_add "$1"
|
||||||
|
ZIP_CONTENTS="${ZIP_CONTENTS}${target_name}"$'\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add all executable files (excluding tests)
|
# Add all executable files (excluding tests)
|
||||||
|
ZIP_CONTENTS="$(unzip -Z1 eqemu-server-linux-x64.zip 2>/dev/null || true)"
|
||||||
for f in *; do
|
for f in *; do
|
||||||
if [ -f "$f" ] && [ -x "$f" ] && [ "$f" != "tests" ]; then
|
if [ -f "$f" ] && [ -x "$f" ] && [ "$f" != "tests" ]; then
|
||||||
zip_add "$f"
|
zip_add "$f"
|
||||||
|
ZIP_CONTENTS="${ZIP_CONTENTS}${f}"$'\n'
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user