build-and-test #228
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
name: build-and-test | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
schedule: | |
# At 23:25 on Thursday. | |
- cron: "25 23 * * 4" | |
workflow_dispatch: | |
jobs: | |
# Build on all platforms | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-latest, windows-2019, windows-latest] | |
python-version: [ '3.8', '3.x' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Build and install flydra_core | |
run: python -m pip install ./flydra_core | |
- name: Build and install flydra_analysis | |
run: python -m pip install ./flydra_analysis | |
# Test on Ubuntu with system python | |
test-ubuntu-system-python: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update package index | |
run: sudo apt-get update | |
- name: Install system packages | |
run: sudo apt-get install -y libcairo2-dev octave # mayavi2 python3-sympy python3-docopt python3-cherrypy3 python3-pkgconfig python-is-python3 | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Build and install flydra_core | |
run: | | |
cd flydra_core | |
python -m pip install -e . | |
- name: Test flydra_core | |
run: | | |
python -m pip install pytest | |
cd flydra_core | |
pytest | |
- name: Build and install flydra_analysis | |
run: | | |
cd flydra_analysis | |
python -m pip install -e . | |
- name: Test flydra_analysis | |
run: | | |
python -m pip install pytest | |
cd flydra_analysis | |
pytest |