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
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ name: CI
on: [pull_request]

env:
RUST_VERSION: 1.84.0 # Use the same version as in `rust-toolchain.toml`
CARGO_TERM_COLOR: always # Force Cargo to use colors
TERM: xterm-256color

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.84.0]

steps:
- uses: actions/checkout@v4

Expand All @@ -28,8 +25,8 @@ jobs:

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup update ${RUST_VERSION} --no-self-update
rustup default ${RUST_VERSION}
rustup component add rustfmt
rustup component add clippy
rustup toolchain install nightly
Expand Down Expand Up @@ -68,8 +65,8 @@ jobs:

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup update ${RUST_VERSION} --no-self-update
rustup default ${RUST_VERSION}
rustup target add wasm32-unknown-unknown

- name: Install DFX
Expand Down Expand Up @@ -135,8 +132,8 @@ jobs:

- name: Install Rust
run: |
rustup update ${{ matrix.rust || 'stable' }} --no-self-update
rustup default ${{ matrix.rust || 'stable' }}
rustup update ${RUST_VERSION} --no-self-update
rustup default ${RUST_VERSION}
rustup target add wasm32-unknown-unknown

- name: Benchmark
Expand All @@ -148,6 +145,11 @@ jobs:
name: canbench_result_${{ matrix.name }}
path: /tmp/canbench_result_${{ matrix.name }}

- uses: actions/upload-artifact@v4
with:
name: canbench_results_persisted_${{ matrix.name }}_yml
path: /tmp/canbench_results_persisted_${{ matrix.name }}.yml

- uses: actions/upload-artifact@v4
with:
name: canbench_results_${{ matrix.name }}_csv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
MDBOOK_VERSION: 0.4.48
MDBOOK_ADMONISH_VERSION: 1.19.0
MDBOOK_LINKCHECK_VERSION: 0.7.7
RUST_VERSION: 1.84.0
RUST_VERSION: 1.84.0 # Use the same version as in `rust-toolchain.toml`
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.84.0"
channel = "1.84.0" # Use the same version as in `.github/workflows/*.yml`
Comment thread
maksymar marked this conversation as resolved.
targets = ["wasm32-unknown-unknown"]
4 changes: 3 additions & 1 deletion scripts/ci_run_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ BASELINE_BRANCH_DIR=_canbench_baseline_branch
CANBENCH_OUTPUT=/tmp/canbench_output.txt

CANBENCH_RESULTS_FILE="$CANISTER_PATH/canbench_results.yml"
CANBENCH_RESULTS_PERSISTED_FILE="/tmp/canbench_results_persisted_${CANBENCH_JOB_NAME}.yml"
BASELINE_BRANCH_RESULTS_FILE="$BASELINE_BRANCH_DIR/$CANBENCH_RESULTS_FILE"

CANBENCH_RESULTS_CSV_FILE="/tmp/canbench_results_${CANBENCH_JOB_NAME}.csv"
Expand Down Expand Up @@ -57,7 +58,8 @@ has_updates() {

# Check if the canbench results file is up to date.
pushd "$CANISTER_PATH"
canbench --less-verbose --hide-results --show-summary --csv > "$CANBENCH_OUTPUT"
canbench --less-verbose --hide-results --show-summary --csv --persist > "$CANBENCH_OUTPUT"
Comment thread
maksymar marked this conversation as resolved.
cp "./canbench_results.yml" "$CANBENCH_RESULTS_PERSISTED_FILE"
cp "./canbench_results.csv" "$CANBENCH_RESULTS_CSV_FILE"
if has_updates; then
UPDATED_MSG="**❌ \`$CANBENCH_RESULTS_FILE\` is not up to date**
Expand Down