Skip to content

Commit

Permalink
Workflow updates for AL2023 (#814)
Browse files Browse the repository at this point in the history
* Update workflows to latest versions

Signed-off-by: James Bornholt <[email protected]>

* Remove cargo cache

Signed-off-by: James Bornholt <[email protected]>

* Replace actions-rs/toolchain

Signed-off-by: James Bornholt <[email protected]>

* Fix a syntax thing for the cache workflow

Signed-off-by: James Bornholt <[email protected]>

* Run ASan on ARM runners

Signed-off-by: James Bornholt <[email protected]>

* Don't publish benchmark results from non-`main` branches

Signed-off-by: James Bornholt <[email protected]>

---------

Signed-off-by: James Bornholt <[email protected]>
  • Loading branch information
jamesbornholt authored Mar 13, 2024
1 parent 5cba78f commit 4ac1fcf
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 262 deletions.
82 changes: 16 additions & 66 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
inputs:
environment:
type: string
publish:
type: boolean
default: false
ref:
required: true
type: string
Expand All @@ -29,13 +32,13 @@ jobs:

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_IAM_ROLE }}
aws-region: ${{ vars.S3_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -47,36 +50,11 @@ jobs:
libunwind: true
fio: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore Cargo cache
id: restore-cargo-cache
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_bench.sh
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR benchmarks'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
Expand All @@ -87,7 +65,7 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

Expand All @@ -99,13 +77,13 @@ jobs:

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_IAM_ROLE }}
aws-region: ${{ vars.S3_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -117,36 +95,11 @@ jobs:
libunwind: true
fio: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore Cargo cache
id: restore-cargo-cache
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_latency_bench.sh
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR benchmarks'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
Expand All @@ -158,7 +111,7 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

Expand All @@ -170,13 +123,13 @@ jobs:

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_IAM_ROLE }}
aws-region: ${{ vars.S3_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -188,15 +141,12 @@ jobs:
libunwind: true
fio: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run Benchmark
env:
S3_MOUNT_LOCAL_STORAGE: ${{ vars.MOUNT_LOCAL_STORAGE || 'yes' }}
S3_MOUNT_LOCAL_STORAGE: yes
run: mountpoint-s3/scripts/fs_cache_bench.sh
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
Expand All @@ -209,6 +159,6 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20
2 changes: 2 additions & 0 deletions .github/workflows/bench_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
uses: ./.github/workflows/bench.yml
with:
ref: ${{ github.event.after }}
publish: ${{ github.event.ref == 'refs/heads/main' }}
s3express-integration:
name: Benchmarks (s3express)
uses: ./.github/workflows/bench_s3express.yml
with:
ref: ${{ github.event.after }}
publish: ${{ github.event.ref == 'refs/heads/main' }}
69 changes: 11 additions & 58 deletions .github/workflows/bench_s3express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
inputs:
environment:
type: string
publish:
type: boolean
default: false
ref:
required: true
type: string
Expand All @@ -29,13 +32,13 @@ jobs:

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_IAM_ROLE }}
aws-region: ${{ vars.S3_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -47,36 +50,11 @@ jobs:
libunwind: true
fio: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore Cargo cache
id: restore-cargo-cache
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_bench.sh
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR benchmarks'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
Expand All @@ -88,7 +66,7 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

Expand All @@ -100,13 +78,13 @@ jobs:

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_IAM_ROLE }}
aws-region: ${{ vars.S3_REGION }}
role-duration-seconds: 21600
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -118,36 +96,11 @@ jobs:
libunwind: true
fio: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore Cargo cache
id: restore-cargo-cache
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_latency_bench.sh
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR benchmarks'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
Expand All @@ -159,6 +112,6 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20
7 changes: 2 additions & 5 deletions .github/workflows/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable
- name: Package ${{ matrix.crate }} crate
# `--no-verify` avoids building using crates.io dependencies, which for local packages may not be updated yet
run: cargo package -p ${{ matrix.crate }} --no-verify
Expand Down
Loading

0 comments on commit 4ac1fcf

Please sign in to comment.