From f97d8bcb90ce400bc279c481a423a6fa3d80ea6b Mon Sep 17 00:00:00 2001 From: lingjhf Date: Tue, 6 Oct 2026 16:06:40 +0800 Subject: [PATCH] perf(ci): check out exact source through local Gitea --- .gitea/CI_PERFORMANCE.md | 3 +++ .gitea/workflows/ci.yml | 5 +++++ .gitea/workflows/release.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.gitea/CI_PERFORMANCE.md b/.gitea/CI_PERFORMANCE.md index 7a98aed..311a8f1 100644 --- a/.gitea/CI_PERFORMANCE.md +++ b/.gitea/CI_PERFORMANCE.md @@ -49,6 +49,9 @@ also use this loopback endpoint; tooling rewrites only the validated public Gite origin. The server's public URL remains `https://git.orangraph.com`, and the runner registration is unchanged. These workflow labels require this shared-host layout; configure a reachable private endpoint before using runners on other hosts. +Checkout uses the same endpoint through its `github-server-url` input, retaining +the requested commit/tag and disabling persisted credentials. Release requests +retain the public Host header so Gitea response links pass the public-origin checks. Compare warm CI runs after the first cache fill. Measure checks, Android compile, Windows compile, packaging and artifact transfer separately. Total duration follows diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1839eb9..887ca84 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Configure persistent build caches run: ./tool/gitea/prepare-build-cache.ps1 - name: Verify Flutter version and configure Java @@ -64,6 +65,7 @@ jobs: uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Configure persistent build caches run: ./tool/gitea/prepare-build-cache.ps1 - name: Verify Flutter version and configure Java @@ -101,6 +103,7 @@ jobs: uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Configure persistent build caches run: ./tool/gitea/prepare-build-cache.ps1 - name: Verify Flutter version @@ -141,6 +144,7 @@ jobs: uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Download saved Windows app uses: https://github.com/actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 env: @@ -184,6 +188,7 @@ jobs: uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Download Android CI artifact uses: https://github.com/actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 env: diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a735b25..236c7e9 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -45,6 +45,7 @@ jobs: with: ref: ${{ gitea.event.inputs.tag || gitea.ref_name }} persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Select successful CI and prepare draft id: draft run: | @@ -69,6 +70,7 @@ jobs: with: ref: ${{ needs.prepare.outputs.sha }} persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Download Android CI artifact run: | python tool/gitea/stage-release.py fetch-android --path .build/android @@ -94,6 +96,7 @@ jobs: with: ref: ${{ needs.prepare.outputs.sha }} persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Download Windows CI artifact run: | python tool/gitea/stage-release.py fetch-windows --path .build/windows @@ -119,6 +122,7 @@ jobs: with: ref: ${{ needs.prepare.outputs.sha }} persist-credentials: false + github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }} - name: Download release verification metadata run: | python tool/gitea/stage-release.py fetch-release --path dist