Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/actions/build-node-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ inputs:
run_python_build:
default: true
required: false
# Rust
enable_rust:
description: "enables the rust part of the action"
default: false
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -125,6 +130,29 @@ runs:
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
sudo apt-get install postgresql-16-pgvector -y
shell: bash
# Rust
- name: Install Rust
if: inputs.enable_rust == 'true'
run: |
if ! command -v rustup &> /dev/null ; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain stable -y

# Resolve the correct CARGO_HOME path depending on OS
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "${CARGO_HOME:-$USERPROFILE/.cargo}/bin" | sed 's|/|\\|g' >> $GITHUB_PATH
else
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
# Load cargo environment so cargo and rustc are available in this shell
. "$HOME/.cargo/env"
fi

# Ensure stable rust toolchain is installed
rustup install stable

rustc --version
cargo --version
shell: bash
# General
- name: Git config
if: inputs.github_ro_token != ''
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build-node-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ on:
required: false
type: boolean
default: false
rust_enable:
description: 'Enable Rust install'
required: false
type: boolean
default: false
timeout:
description: "Timeout for each job in minutes."
type: number
Expand Down Expand Up @@ -144,6 +149,8 @@ jobs:
with:
enable_node: true
enable_python: false
# We probably won't need Rust on Node builds...
# enable_rust: ${{ inputs.rust_enable }}
run_parallel: ${{ inputs.run_parallel }}
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
npm_registry: ${{ env.NPM_REGISTRY }}
Expand Down Expand Up @@ -183,6 +190,7 @@ jobs:
with:
enable_node: false
enable_python: true
enable_rust: ${{ inputs.rust_enable }}
run_parallel: ${{ inputs.run_parallel }}
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
npm_registry: ${{ env.NPM_REGISTRY }}
Expand Down Expand Up @@ -273,6 +281,7 @@ jobs:
- name: Build node and python
uses: ./tmp/github-workflows/.github/actions/build-node-python
with:
enable_rust: ${{ inputs.rust_enable }}
run_parallel: ${{ inputs.run_parallel }}
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
npm_registry: ${{ env.NPM_REGISTRY }}
Expand Down Expand Up @@ -415,6 +424,7 @@ jobs:
- name: Build node and python
uses: ./tmp/github-workflows/.github/actions/build-node-python
with:
enable_rust: ${{ inputs.rust_enable }}
run_parallel: ${{ inputs.run_parallel }}
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
npm_registry: ${{ env.NPM_REGISTRY }}
Expand Down