Fix path #737
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: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Free Disk Space (Ubuntu) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: jlumbroso/free-disk-space@main | |
with: | |
haskell: false | |
large-packages: false | |
- name: setup apt dependencies for Linux | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo mkdir --parents --mode=0755 /etc/apt/keyrings | |
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \ | |
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null | |
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.2.1/ubuntu jammy main" \ | |
| sudo tee /etc/apt/sources.list.d/amdgpu.list | |
sudo apt update | |
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.2.1 jammy main" \ | |
| sudo tee --append /etc/apt/sources.list.d/rocm.list | |
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \ | |
| sudo tee /etc/apt/preferences.d/rocm-pin-600 | |
sudo apt update | |
sudo apt install amdgpu-dkms | |
sudo apt install rocm-opencl | |
sudo ldconfig | |
dkms status | |
/opt/rocm-6.2.1/bin/rocminfo | |
/opt/rocm-6.2.1/bin/clinfo | |
sudo apt list --installed | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel setuptools | |
python -m pip install mako | |
python -m pip install numpy==1.* | |
python -m pip install scipy matplotlib docutils pytest sphinx bumps unittest-xml-reporting tinycc | |
- name: setup pyopencl on Linux + macOS | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
python -m pip install pyopencl | |
- name: setup pyopencl on Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
python -m pip install pytools mako cffi | |
choco install opencl-intel-cpu-runtime | |
python -m pip install --only-binary=pyopencl --find-links http://www.silx.org/pub/wheelhouse/ --trusted-host www.silx.org pyopencl | |
- name: Test with pytest | |
env: | |
PYOPENCL_COMPILER_OUTPUT: 1 | |
run: | | |
# other CI uses the following, but `setup.py test` is a deprecated way | |
# of running tests | |
# python setup.py test --pytest-args -v | |
pytest -v | |
- name: check that the docs build (linux only) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
make -j 4 -C doc SPHINXOPTS="-W --keep-going -n" html | |
- name: Publish samodels docs | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'}} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sasmodels-docs-${{ matrix.os }}-${{ matrix.python-version }} | |
path: | | |
doc/_build/html | |
if-no-files-found: error |