diff --git a/.github/actions/rust/action.yaml b/.github/actions/rust/action.yaml index e7e464baf9d..d0c4c89d9d2 100644 --- a/.github/actions/rust/action.yaml +++ b/.github/actions/rust/action.yaml @@ -10,22 +10,42 @@ inputs: runs: using: "composite" steps: + - name: Determine rustup home (Unix) + if: ${{ runner.os != 'Windows' }} + shell: bash + run: echo "RUSTUP_CACHE_PATH=$HOME/.rustup" >> "$GITHUB_ENV" + - name: Determine rustup home (Windows) + if: ${{ runner.os == 'Windows' }} + shell: pwsh + run: | + $rustupHome = Join-Path $env:USERPROFILE '.rustup' + "RUSTUP_CACHE_PATH=$rustupHome" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Cache Rust toolchain id: cache-rustup uses: actions/cache@v4 - if: ${{ runner.os != 'windows' }} with: - path: ~/.rustup + path: ${{ env.RUSTUP_CACHE_PATH }} key: toolchain-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('rust-toolchain.toml') }} - name: Install Rust toolchain if: ${{ steps.cache-rustup.outputs.cache-hit != 'true' }} uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache: false - - name: Set channel in rust-toolchain.toml as default + - name: Set channel in rust-toolchain.toml as default (Unix) + if: ${{ runner.os != 'Windows' }} shell: bash run: | rustup default $(grep -m1 '^channel' rust-toolchain.toml | cut -d'"' -f2) + - name: Set channel in rust-toolchain.toml as default (Windows) + if: ${{ runner.os == 'Windows' }} + shell: pwsh + run: | + $channelLine = Select-String -Path rust-toolchain.toml -Pattern '^channel' | Select-Object -First 1 + if (-not $channelLine) { + throw 'Failed to locate channel entry in rust-toolchain.toml' + } + $channel = ($channelLine.Line -split '"')[1] + rustup default $channel - name: Install Protoc uses: arduino/setup-protoc@v3 with: diff --git a/.github/workflows/_build_js_bindings.yml b/.github/workflows/_build_js_bindings.yml index 991c302c36f..6644473a23c 100644 --- a/.github/workflows/_build_js_bindings.yml +++ b/.github/workflows/_build_js_bindings.yml @@ -2,11 +2,11 @@ name: JS Bindings CI env: DEBUG: napi:* APP_NAME: "chromadb-js-bindings" - MACOSX_DEPLOYMENT_TARGET: '10.13' + MACOSX_DEPLOYMENT_TARGET: "10.13" permissions: contents: write id-token: write -'on': +"on": workflow_dispatch: {} workflow_call: {} jobs: @@ -75,7 +75,7 @@ jobs: build-windows: name: Build Windows bindings - runs-on: 8core-32gb-windows-latest + runs-on: blacksmith-8vcpu-windows-2025 defaults: run: working-directory: rust/js_bindings diff --git a/.github/workflows/_build_release_pypi.yml b/.github/workflows/_build_release_pypi.yml index ea3893a99e3..e4ae8202812 100644 --- a/.github/workflows/_build_release_pypi.yml +++ b/.github/workflows/_build_release_pypi.yml @@ -4,34 +4,34 @@ on: workflow_dispatch: inputs: publish_to_test_pypi: - description: 'Publish to test PyPI' + description: "Publish to test PyPI" required: false default: false type: boolean publish_to_pypi: - description: 'Publish to PyPI' + description: "Publish to PyPI" required: false default: false type: boolean version: - description: 'Version to publish' + description: "Version to publish" required: false type: string workflow_call: inputs: publish_to_test_pypi: - description: 'Publish to test PyPI' + description: "Publish to test PyPI" required: false default: false type: boolean publish_to_pypi: - description: 'Publish to PyPI' + description: "Publish to PyPI" required: false default: false type: boolean version: - description: 'Version to publish' + description: "Version to publish" required: false type: string @@ -66,8 +66,12 @@ jobs: matrix: platform: - { os: linux, runner: blacksmith-4vcpu-ubuntu-2404, target: x86_64 } - - { os: linux, runner: blacksmith-4vcpu-ubuntu-2404-arm, target: aarch64 } - - { os: windows, runner: 8core-32gb-windows-latest, target: x64 } + - { + os: linux, + runner: blacksmith-4vcpu-ubuntu-2404-arm, + target: aarch64, + } + - { os: windows, runner: blacksmith-8vcpu-windows-2025, target: x64 } - { os: macos, runner: macos-14, target: x86_64 } - { os: macos, runner: macos-14, target: aarch64 } @@ -176,7 +180,7 @@ jobs: - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-path: 'wheels-*/*' + subject-path: "wheels-*/*" - name: Publish to test PyPI if: ${{ inputs.publish_to_test_pypi }} diff --git a/.github/workflows/_python-tests.yml b/.github/workflows/_python-tests.yml index 6bd226573ac..284215103bf 100644 --- a/.github/workflows/_python-tests.yml +++ b/.github/workflows/_python-tests.yml @@ -264,7 +264,7 @@ jobs: fail-fast: false matrix: python: ${{ fromJson(inputs.python_versions) }} - runs-on: 8core-32gb-windows-latest + runs-on: blacksmith-8vcpu-windows-2025 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c5c1e1fba9c..fd2a5ca05f8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -173,6 +173,16 @@ jobs: with: property_testing_preset: 'normal' + python-tests-windows: + uses: ./.github/workflows/_python-tests.yml + secrets: inherit + with: + # we only run windows tests on 3.12 because windows runners are expensive + # and we usually don't see failures that are isolated to a specific version + python_versions: '["3.12"]' + property_testing_preset: "normal" + runner: blacksmith-8vcpu-windows-2025 + python-vulnerability-scan: name: Python vulnerability scan needs: change-detection diff --git a/.github/workflows/release-chromadb.yml b/.github/workflows/release-chromadb.yml index 4f26ec63f9d..0c4abb069e6 100644 --- a/.github/workflows/release-chromadb.yml +++ b/.github/workflows/release-chromadb.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: "3.9" - name: Install setuptools_scm run: python -m pip install setuptools_scm - name: Get Release Version @@ -47,7 +47,7 @@ jobs: secrets: inherit with: python_versions: '["3.9", "3.10", "3.11", "3.12"]' - property_testing_preset: 'normal' + property_testing_preset: "normal" python-tests-windows: uses: ./.github/workflows/_python-tests.yml @@ -56,8 +56,8 @@ jobs: # we only run windows tests on 3.12 because windows runners are expensive # and we usually don't see failures that are isolated to a specific version python_versions: '["3.12"]' - property_testing_preset: 'normal' - runner: '8core-32gb-windows-latest' + property_testing_preset: "normal" + runner: blacksmith-8vcpu-windows-2025 javascript-client-tests: name: JavaScript client tests @@ -125,7 +125,7 @@ jobs: - name: Set up Python uses: ./.github/actions/python with: - python-version: '3.12' + python-version: "3.12" - name: Build Client run: ./clients/python/build_python_thin_client.sh - name: Test Client Package @@ -137,13 +137,13 @@ jobs: with: password: ${{ secrets.TEST_PYPI_PYTHON_CLIENT_PUBLISH_KEY }} repository-url: https://test.pypi.org/legacy/ - verbose: 'true' + verbose: "true" - name: Publish to PyPI - if: ${{ needs.check-tag.outputs.tag_matches == 'true' }} + if: ${{ needs.check-tag.outputs.tag_matches == 'true' }} uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_PYTHON_CLIENT_PUBLISH_KEY }} - verbose: 'true' + verbose: "true" release-github: name: Make GitHub release diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 6f0f226f604..6101419a5a3 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -8,7 +8,7 @@ on: required: false push: tags: - - 'cli_release_[0-9]*.[0-9]*.[0-9]*' + - "cli_release_[0-9]*.[0-9]*.[0-9]*" jobs: build-linux: @@ -43,7 +43,7 @@ jobs: build-windows: name: Build Windows binary - runs-on: 8core-32gb-windows-latest + runs-on: blacksmith-8vcpu-windows-2025 steps: - name: Checkout repository uses: actions/checkout@v3 @@ -98,7 +98,6 @@ jobs: - name: Build macOS Intel binary run: cargo build --bin chroma --release --target x86_64-apple-darwin --manifest-path rust/cli/Cargo.toml - - name: Build macOS ARM64 binary run: cargo build --bin chroma --release --target aarch64-apple-darwin --manifest-path rust/cli/Cargo.toml @@ -123,7 +122,7 @@ jobs: release: name: Create GitHub Release and Attach Assets runs-on: blacksmith-4vcpu-ubuntu-2404 - needs: [ build-linux, build-windows, build-macos ] + needs: [build-linux, build-windows, build-macos] steps: - name: Checkout repository uses: actions/checkout@v3