-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (51 loc) · 1.83 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build
on: [push, pull_request]
jobs:
conda-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
- name: Build
shell: bash -l {0}
run: |
conda install -y openturns numpy pytest joblib ipyparallel pathos dask asyncssh sphinx numpydoc build twine
pip install .
pytest -s
make html -C doc BUILDDIR=~/.local/share/otwrapy/doc
- name: Upload doc
if: ${{ github.ref == 'refs/heads/master' }}
run: |
git clone --depth 1 https://${{ secrets.GH_TOKEN }}@github.com/openturns/openturns.github.io.git /tmp/io
mkdir -p /tmp/io/otwrapy/master
cp -r ~/.local/share/otwrapy/doc/html/* /tmp/io/otwrapy/master
cd /tmp/io
touch .nojekyll
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git add -A .
if test `git diff HEAD | wc -c` -eq 0; then exit 0; fi
git commit -a -m "GitHub Actions build ${GITHUB_REPOSITORY} ${GITHUB_RUN_ID}"
git push --quiet origin master > /dev/null 2>&1
- name: Upload PyPI
if: startsWith(github.ref, 'refs/tags/')
shell: bash -l {0}
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
python -m build
twine upload --non-interactive dist/*.whl
conda-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
- name: Build
run: |
conda install -y openturns joblib ipyparallel pathos dask asyncssh numpy pytest
pytest -s