ci: throttle upstream sync, deduplicate artifacts, and bound compiler cache
This commit is contained in:
1 parent
4cca3b9020
commit
4121508711
2 files changed
+13
-31
No files matched your search
@@ -2,7 +2,7 @@ name: Merge upstream updates
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '37 */4 * * *'
|
||||
- cron: '37 2 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -16,9 +16,7 @@ jobs:
|
||||
sync:
|
||||
if: github.repository == 'reims-go/reims-vgpu'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
outputs:
|
||||
runtime_commit: ${{ steps.merge.outputs.runtime_commit }}
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Merge upstream into the maintenance branch
|
||||
id: merge
|
||||
@@ -91,22 +89,4 @@ jobs:
|
||||
echo "::add-mask::$auth"
|
||||
git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" \
|
||||
push origin "$merged:refs/heads/$TARGET_BRANCH"
|
||||
printf 'runtime_commit=%s\n' "$merged" >> "$GITHUB_OUTPUT"
|
||||
summary "Merged upstream commit $source into $TARGET_BRANCH at $merged."
|
||||
|
||||
alpha:
|
||||
# Pushes made by GITHUB_TOKEN do not start push-triggered workflows.
|
||||
needs: sync
|
||||
if: needs.sync.outputs.runtime_commit != ''
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- name: Queue Alpha for the merged commit
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RUNTIME_COMMIT: ${{ needs.sync.outputs.runtime_commit }}
|
||||
run: |
|
||||
gh workflow run runtime-preview.yml --repo "$GITHUB_REPOSITORY" --ref master \
|
||||
-f upstream_commit="$RUNTIME_COMMIT" -f publish=true -f supersede=true
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
group: build-runtime
|
||||
cancel-in-progress: ${{ github.event_name == 'push' || inputs.supersede }}
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 150
|
||||
timeout-minutes: 90
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
@@ -190,8 +190,10 @@ jobs:
|
||||
set -euo pipefail
|
||||
cd "$(cygpath -u "$UPSTREAM_DIR")"
|
||||
fingerprint="$({ LC_ALL=C pacman -Q; cat rust-toolchain.toml; } | sha256sum)"
|
||||
week="$(date -u +%G-W%V)"
|
||||
echo "fingerprint=${fingerprint%% *}" >> "$GITHUB_OUTPUT"
|
||||
echo "Build toolchain: ${fingerprint%% *}"
|
||||
echo "week=$week" >> "$GITHUB_OUTPUT"
|
||||
echo "Build toolchain: ${fingerprint%% *} (cache bucket: $week)"
|
||||
|
||||
- name: Cache compiler objects and Cargo downloads
|
||||
if: steps.plan.outputs.skip != 'true'
|
||||
@@ -203,18 +205,18 @@ jobs:
|
||||
${{ runner.temp }}/cargo/registry/index
|
||||
${{ runner.temp }}/cargo/registry/cache
|
||||
${{ runner.temp }}/cargo/git/db
|
||||
key: runtime-build-v1-${{ runner.arch }}-${{ steps.toolchain.outputs.fingerprint }}-${{ needs.resolve.outputs.commit }}-${{ github.sha }}
|
||||
key: runtime-build-v2-${{ runner.arch }}-${{ steps.toolchain.outputs.fingerprint }}-${{ steps.toolchain.outputs.week }}
|
||||
restore-keys: |
|
||||
runtime-build-v1-${{ runner.arch }}-${{ steps.toolchain.outputs.fingerprint }}-
|
||||
runtime-build-v2-${{ runner.arch }}-${{ steps.toolchain.outputs.fingerprint }}-
|
||||
|
||||
- name: Build upstream runtime in MSYS2 CLANG64
|
||||
if: steps.plan.outputs.skip != 'true'
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
REIMS_INSTALL_SKIP_HOST_CHECKS: "1"
|
||||
CCACHE_MAXSIZE: 750M
|
||||
CCACHE_MAXSIZE: 400M
|
||||
CCACHE_COMPILERCHECK: content
|
||||
SCCACHE_CACHE_SIZE: 1G
|
||||
SCCACHE_CACHE_SIZE: 500M
|
||||
SCCACHE_ALLOW_INCREMENTAL: "1"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -280,8 +282,8 @@ jobs:
|
||||
-Zstd (Join-Path '${{ steps.msys2.outputs.msys2-location }}' 'usr\bin\zstd.exe') `
|
||||
-AppliedPatches @($env:APPLIED_PATCHES -split ',' | Where-Object { $_ })
|
||||
|
||||
- name: Upload alpha artifacts
|
||||
if: steps.plan.outputs.skip != 'true'
|
||||
- name: Upload alpha artifacts (non-release debug runs only)
|
||||
if: steps.plan.outputs.skip != 'true' && !(github.event_name == 'push' || github.event_name == 'schedule' || inputs.publish)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: reims-runtime-win-x64-${{ env.RELEASE_ID }}-alpha
|
||||
@@ -289,7 +291,7 @@ jobs:
|
||||
${{ runner.temp }}/releases/reims-runtime-*.tar.zst
|
||||
${{ runner.temp }}/releases/SHA256SUMS.txt
|
||||
compression-level: 0
|
||||
retention-days: 14
|
||||
retention-days: 3
|
||||
|
||||
- name: Publish alpha prerelease (never stable)
|
||||
if: steps.plan.outputs.skip != 'true' && (github.event_name == 'push' || github.event_name == 'schedule' || inputs.publish)
|
||||
|
||||
Reference in new issue
Block a user