RSCBC-257: Update publish workflow to use cargo release #146
Workflow file for this run
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: Benchmarking | |
| on: | |
| pull_request: | |
| jobs: | |
| benchmark_with_bencher: | |
| name: Benchmark PR with Bencher | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| checks: write | |
| steps: | |
| - name: Install cbdinocluster | |
| run: | | |
| mkdir -p "$HOME/bin" | |
| wget -nv -O $HOME/bin/cbdinocluster https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.100/cbdinocluster-linux-amd64 | |
| chmod +x $HOME/bin/cbdinocluster | |
| echo "$HOME/bin" >> $GITHUB_PATH | |
| - name: Initialize cbdinocluster | |
| run: | | |
| cbdinocluster -v init --auto | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Start couchbase cluster | |
| env: | |
| CLUSTERCONFIG: | | |
| nodes: | |
| - count: 3 | |
| version: 8.0.0 | |
| services: [kv, n1ql, index, fts] | |
| docker: | |
| kv-memory: 2048 | |
| fts-memory: 2048 | |
| run: | | |
| CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTERCONFIG}") | |
| cbdinocluster -v buckets add ${CBDC_ID} default --ram-quota-mb=100 --flush-enabled=true --num-replicas=2 | |
| cbdinocluster -v collections add ${CBDC_ID} default _default test | |
| CBDC_CONNSTR=$(cbdinocluster -v connstr --tls $CBDC_ID) | |
| CBDC_IP=$(cbdinocluster -v ip $CBDC_ID) | |
| echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV" | |
| echo "CBDC_CONNSTR=$CBDC_CONNSTR" >> "$GITHUB_ENV" | |
| echo "CBDC_IP=$CBDC_IP" >> "$GITHUB_ENV" | |
| - uses: actions/checkout@v6 | |
| - uses: bencherdev/bencher@main | |
| - name: Track CI benchmarks | |
| env: | |
| BENCHER_PROJECT: couchbase-rs | |
| BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
| RCBDINOID: ${{ env.CBDC_ID }} | |
| RCBCONNSTR: ${{ env.CBDC_CONNSTR }} | |
| RCBSERVER_VERSION: "8.0.0" | |
| run: | | |
| unique=${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} | |
| bencher run --project couchbase-rs --token '${{ secrets.BENCHER_API_TOKEN }}' --branch "${{ github.event.pull_request.head.ref }}-$unique" --start-point "${{ github.event.pull_request.base.ref }}" --threshold-measure latency --threshold-test percentage --threshold-upper-boundary 0.15 --start-point-hash '${{ github.event.pull_request.base.sha }}' --start-point-clone-thresholds --start-point-reset --testbed ubuntu-latest --err --github-actions '${{ secrets.GITHUB_TOKEN }}' --adapter rust_criterion "cargo bench --bench ci" |