@@ -22,41 +22,73 @@ jobs:
2222 matrix :
2323 os : [ubuntu-latest]
2424 python-version : ['3.9', '3.10', '3.11', '3.12']
25+ include :
26+ - os : macos-latest
27+ python-version : ' 3.12'
28+
2529 steps :
2630 - name : Checkout FFCx
2731 uses : actions/checkout@v4
32+
2833 - name : Set up Python
2934 uses : actions/setup-python@v5
3035 with :
3136 python-version : ${{ matrix.python-version }}
37+
38+ - name : Export GitHub Actions cache environment variables (Windows)
39+ if : runner.os == 'Windows'
40+ uses : actions/github-script@v6
41+ with :
42+ script : |
43+ core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
44+ core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
45+
3246 - name : Install dependencies (non-Python, Linux)
3347 if : runner.os == 'Linux'
3448 run : |
3549 sudo apt-get install -y graphviz libgraphviz-dev ninja-build pkg-config
3650 - name : Install dependencies (non-Python, macOS)
3751 if : runner.os == 'macOS'
38- run : brew install graphviz ninja pkg-config
39- - name : Install FEniCS dependencies (Python)
52+ run : brew install ninja pkg-config
53+
54+ - name : Install FEniCS dependencies (Python, Unix)
55+ if : runner.os == 'Linux' || runner.os == 'macOS'
4056 run : |
4157 pip install git+https://github.com/FEniCS/ufl.git
4258 pip install git+https://github.com/FEniCS/basix.git
43- - name : Install FFCx
59+
60+ - name : Install FEniCS dependencies (Python, Windows)
61+ if : runner.os == 'Windows'
62+ env :
63+ VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
64+ run : |
65+ pip install git+https://github.com/FEniCS/ufl.git
66+ pip install -v git+https://github.com/FEniCS/basix.git --config-settings=cmake.args=-DINSTALL_RUNTIME_DEPENDENCIES=ON --config-settings=cmake.args=-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
67+
68+ - name : Install FFCx (Linux, with optional dependencies)
69+ if : runner.os == 'Linux'
70+ run : pip install .[ci,optional]
71+ - name : Install FFCx (macOS, Windows)
72+ if : runner.os != 'Linux'
4473 run : pip install .[ci]
74+
4575 - name : Static check with mypy
4676 run : mypy ffcx/
47- if : matrix.python-version != '3.12'
4877 - name : ruff checks
4978 run : |
5079 ruff check .
5180 ruff format --check .
81+
5282 - name : Run units tests
5383 run : python -m pytest -n auto --cov=ffcx/ --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml test/
84+
5485 - name : Upload to Coveralls
5586 if : ${{ github.repository == 'FEniCS/ffcx' && github.head_ref == '' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' }}
5687 env :
5788 COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
5889 run : coveralls
5990 continue-on-error : true
91+
6092 - name : Upload pytest results
6193 uses : actions/upload-artifact@v4
6294 with :
@@ -65,10 +97,15 @@ jobs:
6597 # Use always() to always run this step to publish test results
6698 # when there are test failures
6799 if : always()
100+
101+ - name : Setup cl.exe (Windows)
102+ if : runner.os == 'Windows'
103+ uses : ilammy/msvc-dev-cmd@v1
104+
68105 - name : Run FFCx demos
69106 run : |
70107 pytest demo/test_demos.py
71- rm -Rf ufl/
108+
72109 - name : Build documentation
73110 run : |
74111 cd doc
80117 path : doc/build/html/
81118 retention-days : 2
82119 if-no-files-found : error
120+
83121 - name : Checkout FEniCS/docs
84122 if : ${{ github.repository == 'FEniCS/ffcx' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }}
85123 uses : actions/checkout@v4
0 commit comments