-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ci : refactor sdk caching to minimize storage #16414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "Install exe" | ||
description: "Download and install exe" | ||
inputs: | ||
url: | ||
description: "URL of the exe installer" | ||
required: true | ||
args: | ||
description: "Installer arguments" | ||
required: true | ||
timeout: | ||
description: "Timeout (in ms)" | ||
required: false | ||
default: "600000" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install EXE | ||
shell: pwsh | ||
run: | | ||
$ErrorActionPreference = "Stop" | ||
write-host "Downloading Installer EXE" | ||
Invoke-WebRequest -Uri "${{ inputs.url }}" -OutFile "${env:RUNNER_TEMP}\temp-install.exe" | ||
write-host "Installing" | ||
$proc = Start-Process "${env:RUNNER_TEMP}\temp-install.exe" -ArgumentList '${{ inputs.args }}' -NoNewWindow -PassThru | ||
$completed = $proc.WaitForExit(${{ inputs.timeout }}) | ||
if (-not $completed) { | ||
Write-Error "Installer timed out. Killing the process" | ||
$proc.Kill() | ||
exit 1 | ||
} | ||
if ($proc.ExitCode -ne 0) { | ||
Write-Error "Installer failed with exit code $($proc.ExitCode)" | ||
exit 1 | ||
} | ||
write-host "Completed installation" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Linux - Setup SpacemiT Toolchain" | ||
description: "Setup SpacemiT Toolchain for Linux" | ||
inputs: | ||
path: | ||
description: "Installation path" | ||
required: true | ||
version: | ||
description: "SpacemiT toolchain version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup SpacemiT Toolchain | ||
id: setup | ||
uses: ./.github/actions/unarchive-tar | ||
with: | ||
url: https://archive.spacemit.com/toolchain/spacemit-toolchain-linux-glibc-x86_64-v${{ inputs.version }}.tar.xz | ||
path: ${{ inputs.path }} | ||
strip: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Linux - Setup Vulkan SDK" | ||
description: "Setup Vulkan SDK for Linux" | ||
inputs: | ||
path: | ||
description: "Installation path" | ||
required: true | ||
version: | ||
description: "Vulkan SDK version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Vulkan SDK | ||
id: setup | ||
uses: ./.github/actions/unarchive-tar | ||
with: | ||
url: https://sdk.lunarg.com/sdk/download/${{ inputs.version }}/linux/vulkan_sdk.tar.xz | ||
path: ${{ inputs.path }} | ||
strip: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: "Unarchive tar" | ||
description: "Download and unarchive tar into directory" | ||
inputs: | ||
url: | ||
description: "URL of the tar archive" | ||
required: true | ||
path: | ||
description: "Directory to unarchive into" | ||
required: true | ||
type: | ||
description: "Compression type (tar option)" | ||
required: false | ||
default: "J" | ||
strip: | ||
description: "Strip components" | ||
required: false | ||
default: "0" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Unarchive into directory | ||
shell: bash | ||
run: | | ||
mkdir -p ${{ inputs.path }} | ||
cd ${{ inputs.path }} | ||
curl --no-progress-meter ${{ inputs.url }} | tar -${{ inputs.type }}x --strip-components=${{ inputs.strip }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Windows - Setup ROCm" | ||
description: "Setup ROCm for Windows" | ||
inputs: | ||
version: | ||
description: "ROCm version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup ROCm | ||
uses: ./.github/actions/install-exe | ||
with: | ||
url: https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ inputs.version }}-WinSvr2022-For-HIP.exe | ||
args: -install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Build Actions Cache | ||
|
||
on: | ||
workflow_dispatch: # allows manual triggering | ||
schedule: | ||
- cron: '0 * * * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ubuntu-24-vulkan-cache: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get latest Vulkan SDK version | ||
id: vulkan_sdk_version | ||
run: | | ||
echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV" | ||
|
||
- name: Setup Cache | ||
uses: actions/cache@v4 | ||
id: cache-sdk | ||
with: | ||
path: ./vulkan_sdk | ||
key: vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }} | ||
|
||
- name: Setup Vulkan SDK | ||
if: steps.cache-sdk.outputs.cache-hit != 'true' | ||
uses: ./.github/actions/linux-setup-vulkan | ||
with: | ||
path: ./vulkan_sdk | ||
version: ${{ env.VULKAN_SDK_VERSION }} | ||
|
||
ubuntu-24-spacemit-cache: | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
# Make sure this is in sync with build-linux-cross.yml | ||
SPACEMIT_IME_TOOLCHAIN_VERSION: "1.1.2" | ||
|
||
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Cache | ||
uses: actions/cache@v4 | ||
id: cache-toolchain | ||
with: | ||
path: ./spacemit_toolchain | ||
key: spacemit-ime-toolchain-v${{ env.SPACEMIT_IME_TOOLCHAIN_VERSION }}-${{ runner.os }} | ||
|
||
- name: Setup SpacemiT Toolchain | ||
if: steps.cache-toolchain.outputs.cache-hit != 'true' | ||
uses: ./.github/actions/linux-setup-spacemit | ||
with: | ||
path: ./spacemit_toolchain | ||
version: ${{ env.SPACEMIT_IME_TOOLCHAIN_VERSION }} | ||
|
||
windows-2022-rocm-cache: | ||
runs-on: windows-2022 | ||
|
||
env: | ||
# Make sure this is in sync with build.yml | ||
HIPSDK_INSTALLER_VERSION: "25.Q3" | ||
|
||
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Cache | ||
uses: actions/cache@v4 | ||
id: cache-rocm | ||
with: | ||
path: C:\Program Files\AMD\ROCm | ||
key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }} | ||
|
||
- name: Setup ROCm | ||
if: steps.cache-rocm.outputs.cache-hit != 'true' | ||
uses: ./.github/actions/windows-setup-rocm | ||
with: | ||
version: ${{ env.HIPSDK_INSTALLER_VERSION }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.