-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example build-and-test CI workflow
- Loading branch information
Michael O'Keefe
authored and
Michael O'Keefe
committed
Nov 14, 2024
1 parent
7842832
commit 18b20f5
Showing
1 changed file
with
41 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,41 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [fastsim-3] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test: | ||
name: build ${{ matrix.python-version }} on ${{ matrix.platform || matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- ubuntu | ||
- macos | ||
- windows | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
runs-on: ${{ format(`{0}-latest`, matrix.os) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: set up rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- run: rustup target add aarch64-apple-darwin | ||
if: matrix.os == 'macos' | ||
- name: set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: install python dependencies | ||
run: python -m pip install --upgrade pip setuptools wheel pytest | ||
- name: run cargo tests | ||
run: cargo test | ||
- name: install FASTSim python | ||
run: pip install -e . | ||
- name: run pytest | ||
run: pytest -v |