Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Feb 19, 2025
1 parent 81e76c6 commit 3d979c2
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: maturin build --profile nodebug-release -- -C codegen-units=8 -C lto=thin -C target-cpu=native

- name: Install Polars release build
run: pip install target/wheels/polars*.whl
run: uv pip install target/wheels/polars*.whl

- name: Set wheel size
run: |
Expand All @@ -84,42 +84,42 @@ jobs:
if: github.ref_name != 'main'
with:
script: |
const currentSize = process.env.LIB_SIZE || 'Unknown';
const currentSize = process.env.LIB_SIZE || 'Unknown';
// Convert to MB
const currentSizeMB = currentSize !== 'Unknown' ? (currentSize / 1024 / 1024).toFixed(4) : 'Unknown';
// Convert to MB
const currentSizeMB = currentSize !== 'Unknown' ? (currentSize / 1024 / 1024).toFixed(4) : 'Unknown';
let commentBody = `The uncompressed lib size after this PR is **${currentSizeMB} MB**.`;
let commentBody = `The uncompressed lib size after this PR is **${currentSizeMB} MB**.`;
const { data: comments } = await github.rest.issues.listComments({
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
// Look for an existing comment
const existingComment = comments.find(comment =>
comment.body.includes('The previous uncompressed lib size was')
);
if (existingComment) {
// Update the existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: commentBody,
});
} else {
// Create a new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody,
});
// Look for an existing comment
const existingComment = comments.find(comment =>
comment.body.includes('The previous uncompressed lib size was')
);
if (existingComment) {
// Update the existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: commentBody,
});
} else {
// Create a new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody,
});
}
continue-on-error: true
}
continue-on-error: true

- name: Run benchmark tests
uses: CodSpeedHQ/action@v3
Expand Down

0 comments on commit 3d979c2

Please sign in to comment.