From 7cb9e9657fa88c99804eaad12eaa78d9e1f24f98 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 9 Sep 2023 20:38:08 +0900 Subject: [PATCH] chore(ci): Update to actions/checkout@v4 (#3308) Signed-off-by: Sven Pfennig --- .github/workflows/CI.yml | 16 +++++------ .github/workflows/bench.yml | 54 +++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/bench.yml 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