Skip to content

Add missing build dependencies to readthedoc files #1732

Add missing build dependencies to readthedoc files

Add missing build dependencies to readthedoc files #1732

Workflow file for this run

name: CI/CD
on: [push, workflow_dispatch]
jobs:
ci_ubuntu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04']
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '3.9.13'
- name: Install dependencies
run: |
python3 -m pip install numpy matplotlib Cython netCDF4 pyyaml h5py vtk
- name: Install MDANSE
run: |
cd $GITHUB_WORKSPACE
python3 setup.py install
- name: Run tests
if: false
run: |
export PATH=$PATH:/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
$GITHUB_WORKSPACE/BuildServer/Unix/tests.sh
deploy_ubuntu:
needs: ci_ubuntu
runs-on: ${{ matrix.os }}
env:
PYTHON_MINOR_VER: 9
PYTHON_VER: 3.9.13
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04']
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VER }}
- name: Install netcdf
run: |
sudo apt-get update
sudo apt-get install dos2unix graphviz libgtk-3-dev
- name: Install packages with pip
run: |
python3 -m pip install numpy matplotlib Cython netCDF4 pyyaml h5py vtk attrdict3 sphinx distro psutil
- name: Install wxpython with conda
run: |
sudo conda create -p ~/tempenv -c conda-forge python=$PYTHON_VER wxpython
sudo cp -rfv ~/tempenv/lib/python3.$PYTHON_MINOR_VER/site-packages/wx $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib/python3.9/site-packages
sudo cp -rfv ~/tempenv/lib/python3.$PYTHON_MINOR_VER/site-packages/wxPython* $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib/python3.9/site-packages
sudo cp -rfv ~/tempenv/lib/wx $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib
sudo cp -rfv ~/tempenv/include/wx-3.1 $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/include
sudo cp -v ~/tempenv/lib/libwx* $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib
sudo cp -v ~/tempenv/lib/libiconv* $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib/python3.$PYTHON_MINOR_VER/site-packages/wx
sudo cp -v ~/tempenv/lib/libjpeg* $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib/python3.$PYTHON_MINOR_VER/site-packages/wx
- name: Deploy
run: |
sudo ~/python/bin/python -m pip install sphinx==1.6.7 stdeb docutils==0.17.1 graphviz
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}_installer
path: ${{ github.workspace }}/*.deb
retention-days: 90
- name: Edit postinst
if: ${{ (matrix.os == 'ubuntu-20.04') }}
run: |
sed -i '$ a ln -s /usr/lib/x86_64-linux-gnu/libnetcdf.so.18 /usr/local/lib/libnetcdf.so.15' $GITHUB_WORKSPACE/BuildServer/Unix/Debian/Resources/DEBIAN/postinst
sed -i '$ a rm /usr/local/lib/libnetcdf.so.15' $GITHUB_WORKSPACE/BuildServer/Unix/Debian/Resources/DEBIAN/postrm
- name: Deploy for ubuntu 21
if: ${{ (matrix.os == 'ubuntu-20.04') }}
run: |
sudo cp -fv /usr/lib/x86_64-linux-gnu/libffi* $RUNNER_TOOL_CACHE/Python/$PYTHON_VER/x64/lib/python3.$PYTHON_MINOR_VER/site-packages/wx
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
export DISTRO=ubuntu-21.04
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
- name: Upload ubuntu21 artifacts
if: ${{ (matrix.os == 'ubuntu-20.04') }}
uses: actions/upload-artifact@v2
with:
name: ubuntu-21.04_installer
path: ${{ github.workspace }}/*21*.deb
retention-days: 90
ci_ubuntu22:
runs-on: 'ubuntu-22.04'
strategy:
fail-fast: false
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev libgtk2.0-0 libgtk2.0-dev
- name: Create conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 2.7.18
activate-environment: mdanse
- name: Install python netCDF4 package
run: conda install netCDF4 -n mdanse
- name: Install python packages
run: |
$CONDA/envs/mdanse/bin/python -m pip install numpy matplotlib Cython Pyro stdeb pyyaml h5py psutil
- name: Install ScientificPython
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/scientific-python.git
cd scientific-python/
sudo $CONDA/envs/mdanse/bin/python setup.py install
- name: Install MMTK
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/mmtk.git
cd mmtk
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/Unix/setup.py ~/mmtk
sudo $CONDA/envs/mdanse/bin/python setup.py install
- name: Install MDANSE
run: |
cd $GITHUB_WORKSPACE
$CONDA/envs/mdanse/bin/python setup.py install
- name: Run unit tests
run: |
cd $GITHUB_WORKSPACE/Tests/UnitTests
$CONDA/envs/mdanse/bin/python AllTests.py
- name: Run dependency tests
run: |
cd $GITHUB_WORKSPACE/Tests/DependenciesTests
$CONDA/envs/mdanse/bin/python AllTests.py
- name: Run functional tests
run: |
cd $GITHUB_WORKSPACE/Tests/FunctionalTests/Jobs
$CONDA/envs/mdanse/bin/python BuildJobTests.py
$CONDA/envs/mdanse/bin/python AllTests.py
- name: Tar python
if: |
contains( github.ref, 'legacy' )
run: |
cd $CONDA/envs
tar -czf python.tar.gz mdanse
- name: Upload artifacts
if: |
contains( github.ref, 'legacy' )
uses: actions/upload-artifact@v2
with:
name: ubuntu-22.04_artifacts
path: /usr/share/miniconda/envs/python.tar.gz
retention-days: 1
deploy_ubuntu22:
needs: ci_ubuntu22
runs-on: 'ubuntu-22.04'
strategy:
fail-fast: false
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Initialise conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 2.7.18
activate-environment: mdanse
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: ubuntu-22.04_artifacts
path: /usr/share/miniconda/envs
- name: Untar python
run: |
cd $CONDA/envs
tar -xzf python.tar.gz
- name: Install netcdf
run: |
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev
- name: Install wxPython and VTK python packages
run: |
sudo conda install -n mdanse -c daf wxpython
sudo conda install -n mdanse -c ccordoba12 vtk
- run: sudo apt-get install dos2unix graphviz
- run: conda remove ncurses --force
- name: Deploy
run: |
sudo $CONDA/envs/mdanse/bin/python -m pip install sphinx==1.6.7 docutils==0.17.1 graphviz
sed -i 's|PYTHONEXE=$HOME/python|PYTHONEXE=$CONDA/envs/mdanse|' $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
sudo rm $CONDA/envs/mdanse/lib/libtinfo*
sudo rm $CONDA/envs/mdanse/lib/libncurses*
sudo rm -v $CONDA/envs/mdanse/lib/libstdc*
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-22.04_installer
path: ${{ github.workspace }}/*.deb
retention-days: 90
# OSX
ci_osx:
runs-on: ${{ matrix.os }}
if: |
contains( github.ref, 'legacy' )
strategy:
fail-fast: false
matrix:
os: ['macos-11', 'macos-12']
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '3.9.13'
- name: Install dependencies with pip
run: |
python3 -m pip install numpy matplotlib Cython pyyaml h5py vtk netCDF4
- name: Install MDANSE
run: |
cd $GITHUB_WORKSPACE
python3 setup.py install
- name: Run unit tests
if: false
run: |
cd $GITHUB_WORKSPACE/Tests/UnitTests
python3 AllTests.py
- name: Run unit tests
run: |
cd $GITHUB_WORKSPACE/Tests/UnitTests
python2 AllTests.py
- name: Run functional tests
if: false
run: |
cd $GITHUB_WORKSPACE/Tests/FunctionalTests/Jobs
python3 BuildJobTests.py
python3 AllTests.py
- name: Tar python
if: ${{ (matrix.os == 'macos-12') && ( contains( github.ref, 'legacy' ) ) }}
run: |
cd $RUNNER_TOOL_CACHE/Python/3.9.13
mv x64 Resources
tar -czf python.tar.gz Resources
- name: Upload artifacts
if: ${{ (matrix.os == 'macos-12') && ( contains( github.ref, 'legacy' ) ) }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}_artifacts
path: ${{ runner.tool_cache }}/Python/3.9.13/python.tar.gz
retention-days: 1
deploy_osx:
needs: ci_osx
runs-on: macos-12
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: macos-12_artifacts
path: ~/
- run: brew install graphviz
- name: Untar python
run: |
mkdir -p ~/Contents
tar -xzf ~/python.tar.gz -C $HOME/Contents
- name: Install py2app, wxpython, and sphinx
run: |
sudo install_name_tool -change /Users/runner/hostedtoolcache/Python/3.9.13/x64/lib/libpython3.9.dylib /Users/runner/Contents/Resources/lib/libpython3.9.dylib /Users/runner/Contents/Resources/bin/python3.9
sudo install_name_tool -change /Users/runner/hostedtoolcache/Python/3.9.13/x64/lib/libpython3.9.dylib /Users/runner/Contents/Resources/lib/libpython3.9.dylib /Users/runner/Contents/Resources/bin/python
$HOME/Contents/Resources/bin/python -m pip install py2app==0.26.1 wxpython sphinx psutil distro
- name: Install vtk
run: |
sudo conda install -p $HOME/tempenv -c free vtk
sudo cp -r $HOME/tempenv/lib/python2.7/site-packages/vtk ~/Contents/Resources/lib/python2.7/site-packages
sudo cp $HOME/tempenv/lib/libvtk* ~/Contents/Resources/lib
- name: Deploy MDANSE
run: |
source $GITHUB_WORKSPACE/BuildServer/Unix/MacOS/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/MacOS/deploy.sh
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/Unix/MacOS/Resources/README.txt $GITHUB_WORKSPACE
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: MacOS executable
path: |
${{ github.workspace }}/*.dmg
${{ github.workspace }}/README.txt
retention-days: 90
# WINDOWS
ci_windows:
runs-on: windows-latest
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '3.9.13'
- name: Install backend dependencies
run: |
python3 -m pip install numpy matplotlib Cython pyyaml h5py netCDF4 vtk
shell: cmd
- name: Install MDANSE
run: |
cd %GITHUB_WORKSPACE%
python3 setup.py install
shell: cmd
- name: Run unit tests
if: false
run: |
cd %GITHUB_WORKSPACE%\Tests\UnitTests\
python3 AllTests.py
shell: cmd
- name: Run functional tests
if: false
run: |
cd %GITHUB_WORKSPACE%\Tests\FunctionalTests\Jobs
python3 BuildJobTests.py
python3 AllTests.py
shell: cmd
deploy_windows:
runs-on: windows-latest
needs: ci_windows
if: |
contains( github.ref, 'legacy' )
steps:
- uses: actions/checkout@v2
- name: Create conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9.13
activate-environment: mdanse
- name: Install h5py and netCDF4 witch conda
run: |
conda install h5py netCDF4 graphviz
shell: cmd /C CALL {0}
- name: Install other dependencies with pip
run: |
%CONDA%\envs\mdanse\python.exe -m pip install numpy matplotlib Cython pyyaml vtk psutil wxpython sphinx distro
shell: cmd /C CALL {0}
- name: Alter conf_api.py for correct sphinx build
run: |
Set-Location $Env:GITHUB_WORKSPACE\Doc\
(gc conf_api.py) -replace '#graphviz_dot', 'graphviz_dot' | Out-File -encoding UTF8 conf_api.py
- name: Deploy
run: |
mkdir %GITHUB_WORKSPACE%\BuildServer\Windows\Build
cd %GITHUB_WORKSPACE%\BuildServer\Windows\Build\
call "%GITHUB_WORKSPACE%\BuildServer\Windows\definitions.bat"
call "%GITHUB_WORKSPACE%\BuildServer\Windows\setup_ci.bat"
call "%GITHUB_WORKSPACE%\BuildServer\Windows\deploy.bat"
shell: cmd /C CALL {0}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Windows_executable
path: |
${{ github.workspace }}\*.exe
retention-days: 90