-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Stress test the package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- 'bin/**' | ||
- 'fitsio/**' | ||
- 'fitsio-derive/**' | ||
- 'fitsio-sys/**' | ||
- 'testdata/**' | ||
- 'Cargo.toml' | ||
- 'Cargo.lock' | ||
- 'Cross.toml' | ||
- 'rust-toolchain.toml' | ||
- '.github/workflows/*.yml' | ||
|
||
# Only one pull-request triggered run should be executed at a time | ||
# (head_ref is only set for PR events, otherwise fallback to run_id which differs for every run). | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
stress: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- macos-13 | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install ubuntu dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install --no-install-recommends -y \ | ||
llvm-dev \ | ||
libcfitsio-dev \ | ||
pkg-config \ | ||
libssl-dev \ | ||
python3 | ||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: beta | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: cargo generate-lockfile | ||
# enable this ci template to run regardless of whether the lockfile is checked in or not | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
|
||
- name: Install cargo-stress | ||
run: cargo install cargo-stress | ||
|
||
- name: Stress test the code | ||
working-directory: fitsio | ||
run: cargo stress | ||
|