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

Set Python to known version for all CI workflows #2058

Merged
merged 8 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 4 additions & 2 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-20.04, ubuntu-22.04]
python-version: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: arbor

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Spack cache
uses: actions/cache@v3
with:
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/test-everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ jobs:
run: scripts/run_cpp_examples.sh "mpirun -n 4 -oversubscribe"
- name: Run python tests
run: |
python3 -m unittest discover -v -s python
python -m unittest discover -v -s python
- if: ${{ matrix.config.mpi == 'ON' }}
name: Run python+MPI tests
run: mpirun -n 4 -oversubscribe python3 -m unittest discover -v -s python
run: mpirun -n 4 -oversubscribe python -m unittest discover -v -s python
# - name: Run Python examples (plotting leads to time outs on macos, the step under testpip is enough)
# run: scripts/run_python_examples.sh
- name: Build and test a catalogue
Expand All @@ -195,18 +195,32 @@ jobs:
./scripts/test-catalogue.py ./default-catalogue.so
testpip:
name: "Pip build test + Python examples test"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
python-version: [3.7, 3.11]
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Clone w/ submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Update pip
run: python -m pip install --upgrade pip
- name: Debug info Python
run: |
which python
python --version
pip --version
- name: Build and install Arbor using pip + build flags
run: CMAKE_ARGS="-DARB_VECTORIZE=ON -DARB_ARCH=native" python3 -m pip install .
run: CMAKE_ARGS="-DARB_VECTORIZE=ON -DARB_ARCH=native" python -m pip install .
- name: Check that build flags match
run: |
python3 -c "import arbor; print(arbor.config())" | grep -q "'arch': 'native'"
python -c "import arbor; print(arbor.config())" | grep -q "'arch': 'native'"
- name: Run Python tests
run: python3 -m unittest discover -v -s python
run: python -m unittest discover -v -s python
- name: Run Python examples
run: scripts/run_python_examples.sh