Handle moving average updates on candle revisions #356
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: perf | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: perf-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| bench: | |
| if: ${{ github.actor == 'qqrm' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install rustup if needed | |
| run: | | |
| if ! command -v rustup &>/dev/null; then | |
| curl --proto '=https' --tlsv1.2 --retry 10 --retry-delay 5 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y | |
| echo "$CARGO_HOME/bin" >> $GITHUB_PATH | |
| fi | |
| - name: Install wasm-pack | |
| run: cargo install wasm-pack --version 0.13.1 | |
| - name: Run benchmarks | |
| run: | | |
| set -o pipefail | |
| wasm-pack test --chrome --headless | tee perf.log | |
| - name: Upload results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: perf-log | |
| path: perf.log | |
| - name: Send results to bot | |
| env: | |
| TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| run: scripts/send_to_bot.sh perf.log "Performance results" |