2021-09-05 13:53:42 +05:30
|
|
|
name: Processing Tools
|
2021-09-02 02:22:45 +05:30
|
|
|
on: [push]
|
2021-09-02 02:41:39 +05:30
|
|
|
|
2021-09-02 02:22:45 +05:30
|
|
|
jobs:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
pip:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 02:41:39 +05:30
|
|
|
runs-on: ${{ matrix.os }}
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 02:41:39 +05:30
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-11-02 16:56:28 +05:30
|
|
|
python-version: ['3.8', '3.9', '3.10']
|
2022-03-27 02:45:26 +05:30
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2022-04-15 19:18:21 +05:30
|
|
|
fail-fast: false
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 02:22:45 +05:30
|
|
|
steps:
|
2022-11-02 20:24:48 +05:30
|
|
|
- uses: actions/checkout@v3
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 02:41:39 +05:30
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2022-11-02 20:24:48 +05:30
|
|
|
uses: actions/setup-python@v4
|
2021-09-02 02:41:39 +05:30
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 02:41:39 +05:30
|
|
|
- name: Install dependencies
|
2021-09-02 02:22:45 +05:30
|
|
|
run: |
|
2021-09-02 02:41:39 +05:30
|
|
|
python -m pip install --upgrade pip
|
2022-10-13 16:31:42 +05:30
|
|
|
pip install pytest pandas scipy h5py vtk matplotlib pyyaml build
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2022-04-27 10:20:22 +05:30
|
|
|
- name: Strip git hash (Unix)
|
|
|
|
if: runner.os != 'Windows'
|
|
|
|
run: |
|
|
|
|
export VERSION=$(cat VERSION)
|
|
|
|
echo ${VERSION%-*} > VERSION
|
|
|
|
|
2022-05-09 01:39:10 +05:30
|
|
|
- name: Strip git hash (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
|
|
|
$VERSION = Get-Content VERSION -first 1
|
|
|
|
$VERSION,$_ = $VERSION -Split '-g',2,"simplematch"
|
|
|
|
$VERSION | Out-File VERSION
|
|
|
|
|
2022-10-13 16:31:42 +05:30
|
|
|
- name: Build and Install
|
|
|
|
run: |
|
|
|
|
cd python
|
|
|
|
python -m build
|
|
|
|
python -m pip install dist/*.whl
|
|
|
|
python -c 'import damask;print(damask.__version__)'
|
|
|
|
|
2022-03-27 02:45:26 +05:30
|
|
|
- name: Install and run unit tests (Unix)
|
|
|
|
if: runner.os != 'Windows'
|
2021-09-02 02:41:39 +05:30
|
|
|
run: |
|
2022-05-12 04:09:19 +05:30
|
|
|
python -m pip install ./python --no-deps -vv
|
2021-09-02 12:21:45 +05:30
|
|
|
COLUMNS=256 pytest python
|
2021-09-02 03:07:46 +05:30
|
|
|
|
2022-03-27 02:45:26 +05:30
|
|
|
- name: Install and run unit tests (Windows)
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2022-05-12 04:09:19 +05:30
|
|
|
python -m pip install ./python --no-deps -vv
|
2022-03-27 02:45:26 +05:30
|
|
|
pytest python -k 'not XDMF'
|
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
apt:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
runs-on: ubuntu-latest
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
steps:
|
2022-11-02 20:24:48 +05:30
|
|
|
- uses: actions/checkout@v3
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
- name: Install pytest
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install pytest
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
- name: Install dependencies
|
2021-12-23 23:53:02 +05:30
|
|
|
# https://github.com/actions/virtual-environments/issues/4790
|
2021-09-02 03:07:46 +05:30
|
|
|
run: >
|
|
|
|
sudo apt-get update &&
|
2021-12-23 23:53:02 +05:30
|
|
|
sudo apt-get remove mysql* &&
|
|
|
|
sudo apt-get install python3-pandas python3-scipy python3-h5py python3-vtk7 python3-matplotlib python3-yaml -y
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-02 03:07:46 +05:30
|
|
|
- name: Run unit tests
|
|
|
|
run: |
|
2021-09-02 11:34:09 +05:30
|
|
|
export PYTHONPATH=${PWD}/python
|
2021-12-23 23:53:02 +05:30
|
|
|
COLUMNS=256 pytest python
|