-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from pybop-team/47-add-self-hosted-runner
47-add-self-hosted-runner
- Loading branch information
Showing
3 changed files
with
72 additions
and
11 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: 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 ) |
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
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