chore: fixed zip path for linux #12
Workflow file for this run
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
| name: AI Runtime Release | |
| on: | |
| push: | |
| tags: | |
| - "ai-runtime-v*" | |
| workflow_dispatch: | |
| inputs: | |
| runtime_version: | |
| description: "AI runtime version, for example 0.0.30" | |
| required: true | |
| jobs: | |
| build-windows-runtime-base: | |
| runs-on: windows-latest | |
| env: | |
| VERSION: ${{ github.event.inputs.runtime_version || github.ref_name }} | |
| AI_RUNTIME_STANDALONE_RELEASE_TAG: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG || '20260325' }} | |
| AI_RUNTIME_STANDALONE_PYTHON_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION || '3.10.20' }} | |
| AI_RUNTIME_STANDALONE_FLAVOR: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR || 'install_only' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Normalize runtime version | |
| shell: pwsh | |
| run: | | |
| $version = "${env:VERSION}" -replace '^ai-runtime-v', '' -replace '^v', '' | |
| "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - name: Cache standalone Python and wheels | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .cache/ai-runtime | |
| ~\AppData\Local\pip\Cache | |
| key: windows-base-${{ env.VERSION }}-${{ env.AI_RUNTIME_STANDALONE_RELEASE_TAG }}-${{ hashFiles('tools/ai-runtime-requirements-windows-base.txt', 'tools/ai-runtime-install-plan-windows-cuda.json', 'tools/ai-runtime-install-plan-windows-directml.json') }} | |
| - name: Prepare Windows base runtime | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path dist/ai-runtime/reports | Out-Null | |
| $runtimeRoot = Join-Path $env:RUNNER_TEMP "openstudio-ai-runtime-windows-base-x64" | |
| ./tools/prepare-ai-runtime.ps1 ` | |
| -Platform windows ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -Architecture x64 ` | |
| -RuntimeFamily "windows-base-x64" ` | |
| -RequirementsFile "tools/ai-runtime-requirements-windows-base.txt" ` | |
| -ExpectedRuntimeVersion $env:VERSION ` | |
| -StandaloneReleaseTag $env:AI_RUNTIME_STANDALONE_RELEASE_TAG ` | |
| -StandalonePythonVersion $env:AI_RUNTIME_STANDALONE_PYTHON_VERSION ` | |
| -StandaloneFlavor $env:AI_RUNTIME_STANDALONE_FLAVOR ` | |
| -StandaloneCacheDir ".cache/ai-runtime" ` | |
| -SizeReportPath "dist/ai-runtime/reports/windows-base-size-report.json" | |
| ./tools/package-ai-runtime.ps1 ` | |
| -Platform windows ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -OutputPath "dist/ai-runtime/OpenStudio-AI-Runtime-windows-base-x64.zip" ` | |
| -ExpectedRuntimeVersion $env:VERSION ` | |
| -MaxArtifactSizeBytes 2100000000 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-base-ai-runtime | |
| path: | | |
| dist/ai-runtime/OpenStudio-AI-Runtime-windows-base-x64.zip | |
| dist/ai-runtime/reports/windows-base-size-report.json | |
| if-no-files-found: error | |
| build-macos-runtime-arm64: | |
| runs-on: macos-14 | |
| env: | |
| VERSION: ${{ github.event.inputs.runtime_version || github.ref_name }} | |
| AI_RUNTIME_STANDALONE_RELEASE_TAG: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG || '20260325' }} | |
| AI_RUNTIME_STANDALONE_PYTHON_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION || '3.10.20' }} | |
| AI_RUNTIME_STANDALONE_FLAVOR: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR || 'install_only' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Normalize runtime version | |
| shell: bash | |
| run: echo "VERSION=${VERSION#ai-runtime-v}" | sed 's/^VERSION=v/VERSION=/' >> "$GITHUB_ENV" | |
| - name: Cache standalone Python and wheels | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .cache/ai-runtime | |
| ~/Library/Caches/pip | |
| key: macos-arm64-${{ env.VERSION }}-${{ env.AI_RUNTIME_STANDALONE_RELEASE_TAG }}-${{ hashFiles('tools/ai-runtime-requirements-macos.txt') }} | |
| - name: Cache packaged macOS runtime | |
| id: cache-macos-runtime-package | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip | |
| dist/ai-runtime/reports/macos-arm64-size-report.json | |
| key: macos-arm64-package-${{ env.VERSION }}-${{ env.AI_RUNTIME_STANDALONE_RELEASE_TAG }}-${{ env.AI_RUNTIME_STANDALONE_PYTHON_VERSION }}-${{ env.AI_RUNTIME_STANDALONE_FLAVOR }}-${{ hashFiles('tools/ai-runtime-requirements-macos.txt', 'tools/prepare-ai-runtime.ps1', 'tools/package-ai-runtime.ps1', 'tools/validate-ai-runtime-package.ps1', 'tools/ai_runtime_probe.py') }} | |
| - name: Prepare macOS arm64 runtime | |
| if: steps.cache-macos-runtime-package.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path dist/ai-runtime/reports | Out-Null | |
| $runtimeRoot = Join-Path $env:RUNNER_TEMP "openstudio-ai-runtime-macos-arm64" | |
| ./tools/prepare-ai-runtime.ps1 ` | |
| -Platform macos ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -Architecture arm64 ` | |
| -RuntimeFamily "macos-arm64" ` | |
| -RequirementsFile "tools/ai-runtime-requirements-macos.txt" ` | |
| -ExpectedRuntimeVersion $env:VERSION ` | |
| -StandaloneReleaseTag $env:AI_RUNTIME_STANDALONE_RELEASE_TAG ` | |
| -StandalonePythonVersion $env:AI_RUNTIME_STANDALONE_PYTHON_VERSION ` | |
| -StandaloneFlavor $env:AI_RUNTIME_STANDALONE_FLAVOR ` | |
| -StandaloneCacheDir ".cache/ai-runtime" ` | |
| -SizeReportPath "dist/ai-runtime/reports/macos-arm64-size-report.json" | |
| ./tools/package-ai-runtime.ps1 ` | |
| -Platform macos ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -OutputPath "dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip" ` | |
| -ExpectedRuntimeVersion $env:VERSION ` | |
| -MaxArtifactSizeBytes 2100000000 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-arm64-ai-runtime | |
| path: | | |
| dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip | |
| dist/ai-runtime/reports/macos-arm64-size-report.json | |
| if-no-files-found: error | |
| build-linux-runtime-cpu: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| VERSION: ${{ github.event.inputs.runtime_version || github.ref_name }} | |
| AI_RUNTIME_STANDALONE_RELEASE_TAG: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG || '20260325' }} | |
| AI_RUNTIME_STANDALONE_PYTHON_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION || '3.10.20' }} | |
| AI_RUNTIME_STANDALONE_FLAVOR: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR || 'install_only' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Normalize runtime version | |
| shell: bash | |
| run: echo "VERSION=${VERSION#ai-runtime-v}" | sed 's/^VERSION=v/VERSION=/' >> "$GITHUB_ENV" | |
| - name: Cache standalone Python and wheels | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .cache/ai-runtime | |
| ~/.cache/pip | |
| key: linux-cpu-x64-${{ env.VERSION }}-${{ env.AI_RUNTIME_STANDALONE_RELEASE_TAG }}-${{ hashFiles('tools/ai-runtime-requirements-linux.txt') }} | |
| - name: Prepare Linux CPU runtime | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path dist/ai-runtime/reports | Out-Null | |
| $runtimeRoot = Join-Path $env:RUNNER_TEMP "openstudio-ai-runtime-linux-cpu-x64" | |
| ./tools/prepare-ai-runtime.ps1 ` | |
| -Platform linux ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -Architecture x64 ` | |
| -RuntimeFamily "linux-cpu-x64" ` | |
| -RequirementsFile "tools/ai-runtime-requirements-linux.txt" ` | |
| -ExpectedRuntimeVersion $env:VERSION ` | |
| -StandaloneReleaseTag $env:AI_RUNTIME_STANDALONE_RELEASE_TAG ` | |
| -StandalonePythonVersion $env:AI_RUNTIME_STANDALONE_PYTHON_VERSION ` | |
| -StandaloneFlavor $env:AI_RUNTIME_STANDALONE_FLAVOR ` | |
| -StandaloneCacheDir ".cache/ai-runtime" ` | |
| -SizeReportPath "dist/ai-runtime/reports/linux-cpu-x64-size-report.json" | |
| ./tools/package-ai-runtime.ps1 ` | |
| -Platform linux ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -OutputPath "dist/ai-runtime/OpenStudio-AI-Runtime-linux-cpu-x64.zip" ` | |
| -ExpectedRuntimeVersion $env:VERSION ` | |
| -MaxArtifactSizeBytes 2100000000 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-cpu-x64-ai-runtime | |
| path: | | |
| dist/ai-runtime/OpenStudio-AI-Runtime-linux-cpu-x64.zip | |
| dist/ai-runtime/reports/linux-cpu-x64-size-report.json | |
| if-no-files-found: error | |
| publish-ai-runtime: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-windows-runtime-base | |
| - build-macos-runtime-arm64 | |
| - build-linux-runtime-cpu | |
| permissions: | |
| contents: write | |
| env: | |
| VERSION: ${{ github.event.inputs.runtime_version || github.ref_name }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Normalize runtime version | |
| shell: bash | |
| run: echo "VERSION=${VERSION#ai-runtime-v}" | sed 's/^VERSION=v/VERSION=/' >> "$GITHUB_ENV" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-base-ai-runtime | |
| path: dist/ai-runtime | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-arm64-ai-runtime | |
| path: dist/ai-runtime | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-cpu-x64-ai-runtime | |
| path: dist/ai-runtime | |
| - name: Verify downloaded AI runtime artifacts | |
| shell: bash | |
| run: | | |
| test -f "dist/ai-runtime/OpenStudio-AI-Runtime-windows-base-x64.zip" | |
| test -f "dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip" | |
| test -f "dist/ai-runtime/OpenStudio-AI-Runtime-linux-cpu-x64.zip" | |
| test -f "dist/ai-runtime/reports/windows-base-size-report.json" | |
| test -f "dist/ai-runtime/reports/macos-arm64-size-report.json" | |
| test -f "dist/ai-runtime/reports/linux-cpu-x64-size-report.json" | |
| - name: Publish AI runtime release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('ai-runtime-v{0}', github.event.inputs.runtime_version) }} | |
| name: OpenStudio AI Runtime ${{ env.VERSION }} | |
| body: | | |
| OpenStudio AI base runtimes. Windows accelerator backends are installed on-device from the pinned install plans in the published runtime manifest. | |
| fail_on_unmatched_files: true | |
| overwrite_files: true | |
| files: | | |
| dist/ai-runtime/OpenStudio-AI-Runtime-windows-base-x64.zip | |
| dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip | |
| dist/ai-runtime/OpenStudio-AI-Runtime-linux-cpu-x64.zip | |
| dist/ai-runtime/reports/windows-base-size-report.json | |
| dist/ai-runtime/reports/macos-arm64-size-report.json | |
| dist/ai-runtime/reports/linux-cpu-x64-size-report.json |