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

BMI Unit test gh workflow #33

Merged
merged 4 commits into from
Jul 10, 2023
Merged
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
48 changes: 48 additions & 0 deletions .github/workflows/build_and_run_unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Test changes that have been pushed to the master and dev branches

name: Topmodel BMI Unit Testing

# Controls when the action will run.
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

env:
# Obtained from https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
# TODO: add something later that can check the runners for hyperthreading
LINUX_NUM_PROC_CORES: 2
MACOS_NUM_PROC_CORES: 3

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Run general unit tests in linux environment
test_unit:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout the commit
uses: actions/checkout@v2

- name: Build and Run Unit Test
run: |
cd ./test
make clean
make
./run_bmi_unit_test

- name: Build and Run Standalone
run: |
cd src/
make clean
make
cd ..
./run_bmi