Skip to content

Commit b1c4910

Browse files
committed
(WIP) Port to uv + Cmake driven scikit-core-build
1 parent a451acb commit b1c4910

36 files changed

+4552
-10443
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,50 @@
11
name: Fidimag test
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
unit-tests:
77

88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ['3.14']
11+
python-version: ['3.12', '3.13', '3.14']
12+
os: [ubuntu-latest]
1213

13-
runs-on: ubuntu-latest
14+
runs-on: ${{ matrix.os }}
1415

1516
steps:
1617
- name: "Checkout"
17-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1819

1920
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v5
2122
with:
2223
python-version: ${{ matrix.python-version }}
2324

24-
- name: "Update apt and install cmake"
25+
- name: "Update apt and install dependencies"
2526
run: |
2627
sudo apt-get -y update
27-
sudo apt-get install -y cmake
28+
sudo apt-get install -y cmake gcc g++
2829
sudo apt-get install -y libatlas-base-dev libatlas3-base
2930
30-
- name: "Install sundials and fftw"
31+
- name: "Install SUNDIALS and FFTW"
3132
working-directory: ./bin
3233
run: |
3334
bash install-fftw.sh
3435
bash install-sundials.sh
35-
36-
- name: "Install pip and packages"
37-
working-directory: ./
36+
37+
- name: "Install uv"
3838
run: |
39-
python3 -m ensurepip
40-
python3 -m pip install --upgrade pip
41-
python3 -m pip install --user scipy numpy pytest matplotlib
42-
python3 -m pip install --user setuptools pyvtk cython psutil
39+
curl -LsSf https://astral.sh/uv/install.sh | sh
40+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
4341
44-
- name: "Install FIDIMAG"
42+
- name: "Build and install Fidimag"
4543
run: |
46-
python3 setup.py build_ext --inplace
47-
PWD=$(pwd)
48-
export PYTHONPATH=$PWD:$PYTHONPATH
49-
echo "PYTHONPATH=$PYTHONPATH"
50-
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
51-
echo "LD_LIBRARY_PATH=$PWD/local/lib" >> $GITHUB_ENV
52-
53-
- name: "Run test"
44+
uv sync --frozen --all-extras
45+
echo "LD_LIBRARY_PATH=$PWD/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
46+
47+
- name: "Run tests"
5448
working-directory: ./tests
5549
run: |
56-
python3 -m pytest -v
57-
# env:
58-
# PYTHONPATH: $PWD
50+
uv run pytest -v -m "not slow and not run_oommf"

0 commit comments

Comments
 (0)