From 4e159b10655192c85d776ea59eb89c5638194203 Mon Sep 17 00:00:00 2001 From: Vaillant Jeremy Date: Sun, 17 May 2026 19:26:06 +0200 Subject: [PATCH] ci: fix lint venv, drop artifact cache, fix Android sdkmanager pipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three follow-up fixes from the first non-container run (#10): - lint: Ubuntu 24.04 / Python 3.12 enforces PEP 668, so `pip install --user` exits with externally-managed-environment. Install gdtoolkit into a throwaway venv at /tmp/gdlint-venv instead. - exports: drop the .godot/ artifact cache shared between `validate` and the export jobs. Gitea's artifact service returns 404 on actions/download-artifact@v3 (v3 protocol incomplete on this server). Each export job now runs its own `godot --headless --import` before exporting — costs ~30s but avoids the failing cross-job artifact dependency. - export-android: `yes | sdkmanager --licenses` returned 141 (SIGPIPE) under `set -o pipefail` because sdkmanager closes stdin after accepting all licenses while `yes` keeps writing. Feed a finite `printf 'y\n%.0s' {1..50}` instead. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/build.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 7f9295d..3cf1e0f 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -36,13 +36,6 @@ jobs: exit 1 fi - - name: Upload import cache - uses: actions/upload-artifact@v3 - with: - name: godot-import-cache - path: .godot - retention-days: 1 - # --------------------------------------------------------------------------- # 2. Static analysis — gdlint from Scony's gdtoolkit (Python, no Godot). # Runs in parallel with `validate`. Exports do NOT depend on this job, @@ -58,8 +51,9 @@ jobs: - name: Install gdtoolkit run: | - python3 -m pip install --user "gdtoolkit==4.*" - echo "$HOME/.local/bin" >> "$GITHUB_PATH" + python3 -m venv /tmp/gdlint-venv + /tmp/gdlint-venv/bin/pip install --quiet "gdtoolkit==4.*" + echo "/tmp/gdlint-venv/bin" >> "$GITHUB_PATH" - name: Run gdlint run: gdlint scripts db scenes @@ -97,11 +91,8 @@ jobs: version: ${{ env.GODOT_VERSION }} templates: "true" - - name: Restore import cache - uses: actions/download-artifact@v3 - with: - name: godot-import-cache - path: .godot + - name: Import project + run: godot --headless --import || true - name: Prepare output dir run: mkdir -p "${{ matrix.artifact_path }}" @@ -149,7 +140,9 @@ jobs: wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/cmdline.zip unzip -q /tmp/cmdline.zip -d "$ANDROID_HOME/cmdline-tools" mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest" - yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses >/dev/null + # `yes |` returns 141 (SIGPIPE) under `set -o pipefail` once sdkmanager + # closes its stdin — feed a finite stream of "y" answers instead. + printf 'y\n%.0s' {1..50} | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses >/dev/null "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \ "platform-tools" "platforms;android-34" "build-tools;34.0.0" >/dev/null @@ -179,11 +172,8 @@ jobs: export/android/debug_keystore_pass = "android" EOF - - name: Restore import cache - uses: actions/download-artifact@v3 - with: - name: godot-import-cache - path: .godot + - name: Import project + run: godot --headless --import || true - name: Prepare output dir run: mkdir -p releases/android