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

47-add-self-hosted-runner #62

Merged
merged 7 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
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
67 changes: 67 additions & 0 deletions .github/workflows/scheduled_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Scheduled

on:
workflow_dispatch:
pull_request:
branches:
- main

# runs every day at 09:00 UTC
schedule:
- cron: '0 9 * * *'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip nox
- name: Unit tests with nox
run: |
python -m nox -s unit

#M-series Mac Mini
build-apple-mseries:
runs-on: [self-hosted, macOS, ARM64]
env:
GITHUB_PATH: ${PYENV_ROOT/bin:$PATH}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v4
- name: Install python & create virtualenv
shell: bash
run: |
eval "$(pyenv init -)"
pyenv install ${{ matrix.python-version }} -s
pyenv virtualenv ${{ matrix.python-version }} pybop-${{ matrix.python-version }}

- name: Install dependencies & run unit tests
shell: bash
run: |
eval "$(pyenv init -)"
pyenv activate pybop-${{ matrix.python-version }}
python -m pip install --upgrade pip wheel setuptools nox
python -m nox -s unit

- name: Uninstall pyenv-virtualenv & python
if: always()
shell: bash
run: |
eval "$(pyenv init -)"
pyenv activate pybop-${{ matrix.python-version }}
pyenv uninstall -f $( python --version )
11 changes: 3 additions & 8 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyBOP
name: test_on_push

on:
push:
Expand Down Expand Up @@ -29,9 +29,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade pip nox
pip install -e .
python -m pip install --upgrade pip nox
- name: Unit tests with nox
run: |
nox -s unit
Expand All @@ -56,10 +54,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade pip nox
pip install -e .

python -m pip install --upgrade pip nox
- name: Run coverage tests for Ubuntu with Python 3.11 and generate report
run: nox -s coverage

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
<img src="https://raw.githubusercontent.com/pybop-team/PyBOP/develop/assets/Temp_Logo.png" alt="logo" width="400" height="auto" />
<h1>Python Battery Optimisation and Parameterisation</h1>


<p>
<a href="https://github.com/pybop-team/PyBOP/actions/workflows/test_on_push.yaml">
<img src="https://img.shields.io/github/actions/workflow/status/pybop-team/PyBOP/test_on_push.yaml?label=Build%20Status" alt="build" />
<a href="https://github.com/pybop-team/PyBOP/actions/workflows/scheduled_tests.yaml">
<img src="https://github.com/pybop-team/PyBOP/actions/workflows/scheduled_tests.yaml/badge.svg" alt="Scheduled" />
</a>
<a href="https://github.com/pybop-team/PyBOP/graphs/contributors">
<img src="https://img.shields.io/github/contributors/pybop-team/PyBOP" alt="contributors" />
Expand Down