perf(ci): speed up release builds and Windows packaging (#7975)
This commit is contained in:
1 parent
f70eeeeb06
commit
25dcee00a6
6 files changed
+251
-120
No files matched your search
@@ -100,9 +100,6 @@ jobs:
|
||||
cache: true
|
||||
run-install: true
|
||||
|
||||
- name: Ensure Electron runtime is installed
|
||||
run: vp run --filter @t3tools/desktop ensure:electron
|
||||
|
||||
- id: release_meta
|
||||
name: Resolve release version
|
||||
shell: bash
|
||||
@@ -157,6 +154,40 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
|
||||
- id: previous_tag
|
||||
name: Resolve previous release tag
|
||||
run: |
|
||||
node scripts/resolve-previous-release-tag.ts \
|
||||
--channel "${{ steps.release_meta.outputs.release_channel }}" \
|
||||
--current-tag "${{ steps.release_meta.outputs.tag }}" \
|
||||
--github-output
|
||||
|
||||
quality:
|
||||
name: Release quality checks
|
||||
needs: [preflight]
|
||||
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
|
||||
runs-on: blacksmith-8vcpu-ubuntu-2404
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ needs.preflight.outputs.ref }}
|
||||
sparse-checkout: |
|
||||
/*
|
||||
!/.repos/
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Setup Vite+
|
||||
uses: voidzero-dev/setup-vp@v1
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: true
|
||||
run-install: true
|
||||
|
||||
- name: Ensure Electron runtime is installed
|
||||
run: vp run --filter @t3tools/desktop ensure:electron
|
||||
|
||||
- name: Check
|
||||
run: vp check
|
||||
|
||||
@@ -166,14 +197,6 @@ jobs:
|
||||
- name: Test
|
||||
run: vp run test
|
||||
|
||||
- id: previous_tag
|
||||
name: Resolve previous release tag
|
||||
run: |
|
||||
node scripts/resolve-previous-release-tag.ts \
|
||||
--channel "${{ steps.release_meta.outputs.release_channel }}" \
|
||||
--current-tag "${{ steps.release_meta.outputs.tag }}" \
|
||||
--github-output
|
||||
|
||||
relay_public_config:
|
||||
name: Resolve T3 Connect public config
|
||||
needs: preflight
|
||||
@@ -385,14 +408,34 @@ jobs:
|
||||
uses: voidzero-dev/setup-vp@v1
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: true
|
||||
run-install: |
|
||||
args:
|
||||
- --filter=@t3tools/desktop...
|
||||
- --filter=t3...
|
||||
- --filter=@t3tools/scripts...
|
||||
cache: ${{ matrix.platform != 'win' }}
|
||||
run-install: false
|
||||
|
||||
- name: Resolve Windows package cache path
|
||||
if: matrix.platform == 'win'
|
||||
id: package_cache_path
|
||||
shell: pwsh
|
||||
run: '"path=$(vp pm cache dir)" >> $env:GITHUB_OUTPUT'
|
||||
|
||||
- name: Cache Windows packages
|
||||
if: matrix.platform == 'win'
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: ${{ steps.package_cache_path.outputs.path }}
|
||||
key: windows-release-packages-v1-${{ matrix.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install desktop dependencies
|
||||
run: vp install --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
|
||||
|
||||
- name: Cache resource monitor
|
||||
id: resource_monitor_cache
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: native/resource-monitor/target/${{ matrix.rust_target }}/release/t3-resource-monitor${{ matrix.platform == 'win' && '.exe' || '' }}
|
||||
key: resource-monitor-${{ matrix.rust_target }}-${{ hashFiles('native/resource-monitor/Cargo.lock', 'native/resource-monitor/Cargo.toml', 'native/resource-monitor/src/**') }}
|
||||
|
||||
- name: Setup Rust
|
||||
if: steps.resource_monitor_cache.outputs.cache-hit != 'true'
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.rust_target }}
|
||||
@@ -518,6 +561,7 @@ jobs:
|
||||
- name: Build desktop artifact
|
||||
shell: bash
|
||||
env:
|
||||
T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR: ${{ steps.resource_monitor_cache.outputs.cache-hit == 'true' }}
|
||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
|
||||
@@ -664,8 +708,8 @@ jobs:
|
||||
|
||||
publish_cli:
|
||||
name: Publish CLI to npm
|
||||
needs: [preflight, relay_public_config, build]
|
||||
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.build.result == 'success' }}
|
||||
needs: [preflight, relay_public_config, quality, build]
|
||||
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.quality.result == 'success' && needs.build.result == 'success' }}
|
||||
runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
|
||||
Reference in new issue
Block a user