Skip to content

Commit

Permalink
Workflow updates for AL2023
Browse files Browse the repository at this point in the history
1. Remove Cargo caching -- we have too many build variants in CI at this
   point, and the cache is limited to 10GB per repo, so in practice it
   never/rarely hits before evicting random variants.
2. Update actions to versions that we previously deferred because they
   required the node20 runtime, which didn't work on AL2.
3. Fix a syntax thing in the cache build workflow.

Signed-off-by: James Bornholt <bornholt@amazon.com>
  • Loading branch information
jamesbornholt committed Mar 12, 2024
1 parent 1f071e0 commit cfd46aa
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 162 deletions.
58 changes: 7 additions & 51 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,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 @@ -51,32 +51,10 @@ jobs:
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') }}
- 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 @@ -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 @@ -121,32 +99,10 @@ jobs:
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') }}
- 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 @@ -170,13 +126,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 @@ -196,7 +152,7 @@ jobs:
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 Down
30 changes: 4 additions & 26 deletions .github/workflows/bench_s3express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,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 @@ -51,32 +51,10 @@ jobs:
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') }}
- 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 @@ -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 Down
2 changes: 1 addition & 1 deletion .github/workflows/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Set up stable Rust
Expand Down
78 changes: 6 additions & 72 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ 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 }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -76,17 +76,6 @@ jobs:
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 }}-integration-fuse${{ matrix.fuseVersion }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
Expand All @@ -95,17 +84,6 @@ jobs:
run: cargo test --features $RUST_FEATURES --no-run
- name: Run tests
run: cargo test --features $RUST_FEATURES
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR integration tests'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}

s3express-test:
name: S3 Express One Zone tests (${{ matrix.runner.name }}, FUSE ${{ matrix.fuseVersion }})
Expand All @@ -131,12 +109,12 @@ 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 }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -146,17 +124,6 @@ jobs:
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 }}-integration-fuse${{ matrix.fuseVersion }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
Expand All @@ -165,17 +132,6 @@ jobs:
run: cargo test --features '${{ env.RUST_FEATURES }},s3express_tests' --no-run
- name: Run tests
run: cargo test --features '${{ env.RUST_FEATURES }},s3express_tests'
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR integration tests'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}

asan:
name: Address sanitizer
Expand All @@ -187,12 +143,12 @@ 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 }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
Expand All @@ -202,17 +158,6 @@ jobs:
toolchain: stable
override: true
components: rust-src
- 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 }}-integration-asan-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
Expand All @@ -222,14 +167,3 @@ jobs:
run: make test-asan-working
- name: Run tests
run: make test-asan
- name: Save Cargo cache
uses: actions/cache/save@v3
if: inputs.environment != 'PR integration tests'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ steps.restore-cargo-cache.outputs.cache-primary-key }}
4 changes: 2 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
fuseVersion: 2
- name: Build Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
tags: mountpoint-builder
context: ./package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
create-github-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
title: "mountpoint-s3 v$version"
Expand Down
Loading

0 comments on commit cfd46aa

Please sign in to comment.