diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 33c16921e1..3a591a6271 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -74,7 +74,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust (${{ matrix.rust }}) uses: dtolnay/rust-toolchain@master @@ -96,7 +96,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get MSRV from package metadata id: msrv @@ -117,7 +117,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@nightly @@ -134,7 +134,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@nightly @@ -151,7 +151,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -174,7 +174,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -203,7 +203,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@nightly diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 0000000000..b4a00eab96 --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,54 @@ +name: Benchmark +on: + push: + branches: + - master + +jobs: + benchmark: + name: Benchmark + runs-on: ubuntu-latest + strategy: + matrix: + bench: + #- connect + #- end_to_end + #- pipeline + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@nightly + + # Run benchmark and stores the output to a file + - name: Run benchmark + run: cargo bench --features full --bench ${{ matrix.bench }} | tee output.txt + + # Download previous benchmark result from cache (if exists) + - name: Download previous benchmark data + uses: actions/cache@v3 + with: + path: ./cache + key: ${{ runner.os }}-benchmark + + # Run `github-action-benchmark` action + - name: Store benchmark result + uses: seanmonstar/github-action-benchmark@v1-patch-1 + with: + name: ${{ matrix.bench }} + # What benchmark tool the output.txt came from + tool: 'cargo' + # Where the output from the benchmark tool is stored + output-file-path: output.txt + # # Where the previous data file is stored + # external-data-json-path: ./cache/benchmark-data.json + # Workflow will fail when an alert happens + fail-on-alert: true + # GitHub API token to make a commit comment + github-token: ${{ secrets.GITHUB_TOKEN }} + # Enable alert commit comment + comment-on-alert: true + #alert-comment-cc-users: '@seanmonstar' + auto-push: true + + # Upload the updated cache file for the next job by actions/cache