Godot auto build
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
CI Built-in Cache Test / test-cache (push) Successful in 6s

This commit is contained in:
2026-06-22 11:33:55 -06:00
parent de948f5a20
commit 8d0d92a10a
+26 -25
View File
@@ -1,35 +1,36 @@
name: CI Cache Directory Test name: CI Built-in Cache Test
on: [push] on: [push]
jobs: jobs:
test-cache: test-cache:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check Cache and Simulate Asset Download - name: Check out repository code
uses: actions/checkout@v4
# 1. Ask Gitea to look for an existing cache match
- name: Cache Mock Engine
id: engine-cache
uses: actions/cache@v4
with:
path: ./mock_downloads # The folder we want to preserve
key: mock-engine-cache-v1 # The unique identifier for this cache
# 2. This step only runs if there was a CACHE MISS
- name: Simulate Asset Download (On Cache Miss)
if: steps.engine-cache.outputs.cache-hit != 'true'
run: | run: |
CACHE_DIR="/root/.godot-si-cache/test-version" echo "📥 CACHE MISS! Creating the folder and simulating a file download..."
TARGET_FILE="./dummy_engine.txt" mkdir -p ./mock_downloads
echo "Mock Godot Engine Data v4.7" > ./mock_downloads/dummy_engine.txt
echo "🔍 Checking if target directory persistent cache exists..."
if [ -f "${CACHE_DIR}/dummy_engine.txt" ]; then
echo "🚀 CACHE HIT! Found dummy asset in cache. Copying..."
cp "${CACHE_DIR}/dummy_engine.txt" "$TARGET_FILE"
echo "✅ Content inside cached asset: $(cat $TARGET_FILE)"
else
echo "📥 CACHE MISS! Creating a lightweight mock asset..."
# Simulate generating a download asset
echo "Mock Godot Engine Data v4.7" > "$TARGET_FILE"
echo "💾 Attempting to save asset to host persistent cache path..."
mkdir -p "${CACHE_DIR}"
cp "$TARGET_FILE" "${CACHE_DIR}/dummy_engine.txt"
echo "🎯 Asset saved to cache directory successfully."
fi
# 3. This runs ALWAYS to verify the file is where it should be
- name: Verify Workspace Output - name: Verify Workspace Output
run: | run: |
echo "Checking workspace execution folder:" echo "🔍 Verifying file presence..."
ls -la ./dummy_engine.txt if [ -f "./mock_downloads/dummy_engine.txt" ]; then
echo "File content: $(cat ./dummy_engine.txt)" echo "File found! Content: $(cat ./mock_downloads/dummy_engine.txt)"
else
echo "❌ File not found!"
exit 1
fi