Skip to content
Open
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
46 changes: 19 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,50 @@
name: Fidimag test

on: [push]
on: [push, pull_request]

jobs:
unit-tests:

strategy:
fail-fast: false
matrix:
python-version: ['3.10']
python-version: ['3.12', '3.13', '3.14']
os: [ubuntu-latest]

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: "Update apt and install cmake"
- name: "Update apt and install dependencies"
run: |
sudo apt-get -y update
sudo apt-get install -y cmake
sudo apt-get install -y cmake gcc g++
sudo apt-get install -y libatlas-base-dev libatlas3-base

- name: "Install sundials and fftw"
- name: "Install SUNDIALS and FFTW"
working-directory: ./bin
run: |
bash install-fftw.sh
bash install-sundials.sh

- name: "Install pip and packages"
working-directory: ./

- name: "Install uv"
run: |
python3 -m ensurepip
python3 -m pip install --upgrade pip
python3 -m pip install --user scipy numpy pytest matplotlib
python3 -m pip install --user setuptools pyvtk cython psutil
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: "Install FIDIMAG"
- name: "Build and install Fidimag"
run: |
python3 setup.py build_ext --inplace
PWD=$(pwd)
export PYTHONPATH=$PWD:$PYTHONPATH
echo "PYTHONPATH=$PYTHONPATH"
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$PWD/local/lib" >> $GITHUB_ENV

- name: "Run test"
uv sync --frozen --all-extras
echo "LD_LIBRARY_PATH=$PWD/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV

- name: "Run tests"
working-directory: ./tests
run: |
python3 -m pytest -v
# env:
# PYTHONPATH: $PWD
uv run pytest -v -m "not slow and not run_oommf"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.txt
!CMakeLists.txt
*.pyc
*.ndt
*.gch
Expand Down
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

Loading