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
80 changes: 52 additions & 28 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'push')
permissions:
actions: read
contents: write
Expand All @@ -36,7 +37,7 @@ jobs:
cache: "npm"

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --no-fund
run: npm install --prefer-offline --no-audit --no-fund

- name: Determine benchmark mode
id: mode
Expand Down Expand Up @@ -139,17 +140,23 @@ jobs:
git commit -m "docs: update build performance benchmarks (${VERSION})"
git push origin "$BRANCH"

gh pr create \
--base main \
--head "$BRANCH" \
--title "docs: update build performance benchmarks (${VERSION})" \
--body "Automated build benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
TITLE="docs: update build performance benchmarks (${VERSION})"
if gh pr list --state open --json title --jq ".[].title" | grep -qF "$TITLE"; then
echo "::notice::PR already open for '$TITLE' — skipping"
else
gh pr create \
--base main \
--head "$BRANCH" \
--title "$TITLE" \
--body "Automated build benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
fi

embedding-benchmark:
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'push')
permissions:
actions: read
contents: write
Expand All @@ -168,7 +175,7 @@ jobs:
cache: "npm"

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --no-fund
run: npm install --prefer-offline --no-audit --no-fund

- name: Determine benchmark mode
id: mode
Expand Down Expand Up @@ -284,17 +291,23 @@ jobs:
git commit -m "docs: update embedding benchmarks (${VERSION})"
git push origin "$BRANCH"

gh pr create \
--base main \
--head "$BRANCH" \
--title "docs: update embedding benchmarks (${VERSION})" \
--body "Automated embedding benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
TITLE="docs: update embedding benchmarks (${VERSION})"
if gh pr list --state open --json title --jq ".[].title" | grep -qF "$TITLE"; then
echo "::notice::PR already open for '$TITLE' — skipping"
else
gh pr create \
--base main \
--head "$BRANCH" \
--title "$TITLE" \
--body "Automated embedding benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
fi

query-benchmark:
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'push')
permissions:
actions: read
contents: write
Expand All @@ -313,7 +326,7 @@ jobs:
cache: "npm"

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --no-fund
run: npm install --prefer-offline --no-audit --no-fund

- name: Determine benchmark mode
id: mode
Expand Down Expand Up @@ -415,17 +428,23 @@ jobs:
git commit -m "docs: update query benchmarks (${VERSION})"
git push origin "$BRANCH"

gh pr create \
--base main \
--head "$BRANCH" \
--title "docs: update query benchmarks (${VERSION})" \
--body "Automated query benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
TITLE="docs: update query benchmarks (${VERSION})"
if gh pr list --state open --json title --jq ".[].title" | grep -qF "$TITLE"; then
echo "::notice::PR already open for '$TITLE' — skipping"
else
gh pr create \
--base main \
--head "$BRANCH" \
--title "$TITLE" \
--body "Automated query benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
fi

incremental-benchmark:
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'push')
permissions:
actions: read
contents: write
Expand All @@ -444,7 +463,7 @@ jobs:
cache: "npm"

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --no-fund
run: npm install --prefer-offline --no-audit --no-fund

- name: Determine benchmark mode
id: mode
Expand Down Expand Up @@ -546,8 +565,13 @@ jobs:
git commit -m "docs: update incremental benchmarks (${VERSION})"
git push origin "$BRANCH"

gh pr create \
--base main \
--head "$BRANCH" \
--title "docs: update incremental benchmarks (${VERSION})" \
--body "Automated incremental benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
TITLE="docs: update incremental benchmarks (${VERSION})"
if gh pr list --state open --json title --jq ".[].title" | grep -qF "$TITLE"; then
echo "::notice::PR already open for '$TITLE' — skipping"
else
gh pr create \
--base main \
--head "$BRANCH" \
--title "$TITLE" \
--body "Automated incremental benchmark update for **${VERSION}** from workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
fi
6 changes: 3 additions & 3 deletions .github/workflows/shield-license-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
shell: bash
run: |
for attempt in 1 2 3; do
npm ci --prefer-offline --no-audit --no-fund --ignore-scripts && break
npm install --prefer-offline --no-audit --no-fund --ignore-scripts && break
if [ "$attempt" -lt 3 ]; then
echo "::warning::npm ci attempt $attempt failed, retrying in 15s..."
echo "::warning::npm install attempt $attempt failed, retrying in 15s..."
sleep 15
else
echo "::error::npm ci failed after 3 attempts"
echo "::error::npm install failed after 3 attempts"
exit 1
fi
done
Expand Down
Loading