Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stress step to CI #383

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Stress test the package

on:
# workflow_dispatch:
# TMP: only add this automatic step while developing
pull_request:
paths:
- 'fitsio/**'
- 'fitsio-derive/**'
- 'fitsio-sys/**'
- '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:
- ubuntu-latest
- macos-latest
- macos-13

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install dependencies
if: matrix.os != 'ubuntu-latest'
run: |
brew install cfitsio python3

- name: Install ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
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

Loading