Skip to content

continuous-integration #568

continuous-integration

continuous-integration #568

name: continuous-integration
# syntax https://help.github.com/en/articles/workflow-syntax-for-github-actions
on:
# Run at 2am every night.
schedule:
- cron: '0 2 * * *'
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
windows38:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Install Python packages
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python -m pip install numpy==1.20
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
chdir $env:GITHUB_WORKSPACE
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: win64-opensim-4.4-py38np120.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-4.4-py38np120.tar.bz2
windows39:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Install Python packages
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python -m pip install numpy==1.20
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
chdir $env:GITHUB_WORKSPACE
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: win64-opensim-4.4-py39np120.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-4.4-py39np120.tar.bz2
windows310:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Install Python packages
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python -m pip install numpy==1.21.4
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
chdir $env:GITHUB_WORKSPACE
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: win64-opensim-4.4-py310np121.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-4.4-py310np121.tar.bz2
windows311:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Install Python packages
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python -m pip install numpy==1.23
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
chdir $env:GITHUB_WORKSPACE
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: win64-opensim-4.4-py311np123.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-4.4-py311np123.tar.bz2
ubuntu38:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
channels: conda-forge,defaults
miniconda-version: "latest"
- name: Install Python packages
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install packages
run: sudo apt-get update && sudo apt-get install --yes build-essential libtool autoconf pkg-config gfortran libopenblas-dev liblapack-dev freeglut3-dev libxi-dev libxmu-dev doxygen python3.8 python3-dev python3-numpy python3-setuptools
- name: Install SWIG
run: |
mkdir ~/swig-source && cd ~/swig-source
wget https://github.com/swig/swig/archive/refs/tags/rel-4.0.2.tar.gz
tar xzf rel-4.0.2.tar.gz && cd swig-rel-4.0.2
sh autogen.sh && ./configure --prefix=$HOME/swig --disable-ccache
make && make -j4 install
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
cd $GITHUB_WORKSPACE/opensim
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: linux64-opensim-4.4-py38np120.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-4.4-py38np120.tar.bz2
ubuntu39:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9
channels: conda-forge,defaults
miniconda-version: "latest"
- name: Install Python packages
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python3 -m pip install numpy==1.20.2
- name: Install packages
run: sudo apt-get update && sudo apt-get install --yes build-essential libtool autoconf pkg-config gfortran libopenblas-dev liblapack-dev freeglut3-dev libxi-dev libxmu-dev doxygen python3 python3-dev python3-numpy python3-setuptools
- name: Install SWIG
run: |
mkdir ~/swig-source && cd ~/swig-source
wget https://github.com/swig/swig/archive/refs/tags/rel-4.0.2.tar.gz
tar xzf rel-4.0.2.tar.gz && cd swig-rel-4.0.2
sh autogen.sh && ./configure --prefix=$HOME/swig --disable-ccache
make && make -j4 install
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
cd $GITHUB_WORKSPACE/opensim
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: linux64-opensim-4.4-py39np120.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-4.4-py39np120.tar.bz2
ubuntu310:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: '3.10'
channels: conda-forge,defaults
miniconda-version: "latest"
- name: Install Python packages
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python3 -m pip install numpy==1.21
- name: Install packages
run: sudo apt-get update && sudo apt-get install --yes build-essential libtool autoconf pkg-config gfortran libopenblas-dev liblapack-dev freeglut3-dev libxi-dev libxmu-dev doxygen python3 python3-dev python3-numpy python3-setuptools
- name: Install SWIG
run: |
mkdir ~/swig-source && cd ~/swig-source
wget https://github.com/swig/swig/archive/refs/tags/rel-4.0.2.tar.gz
tar xzf rel-4.0.2.tar.gz && cd swig-rel-4.0.2
sh autogen.sh && ./configure --prefix=$HOME/swig --disable-ccache
make && make -j4 install
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
cd $GITHUB_WORKSPACE/opensim
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: linux64-opensim-4.4-py310np121.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-4.4-py310np121.tar.bz2
ubuntu311:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: '3.11'
channels: conda-forge,defaults
miniconda-version: "latest"
- name: Install Python packages
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install numpy
#Need numpy to use SWIG numpy typemaps.
run: python3 -m pip install numpy==1.23
- name: Install packages
run: sudo apt-get update && sudo apt-get install --yes build-essential libtool autoconf pkg-config gfortran libopenblas-dev liblapack-dev freeglut3-dev libxi-dev libxmu-dev doxygen python3 python3-dev python3-numpy python3-setuptools
- name: Install SWIG
run: |
mkdir ~/swig-source && cd ~/swig-source
wget https://github.com/swig/swig/archive/refs/tags/rel-4.0.2.tar.gz
tar xzf rel-4.0.2.tar.gz && cd swig-rel-4.0.2
sh autogen.sh && ./configure --prefix=$HOME/swig --disable-ccache
make && make -j4 install
- name: Install conda-build
run: conda install conda-build
- name: Conda build
run: |
cd $GITHUB_WORKSPACE/opensim
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: linux64-opensim-4.4-py311np123.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-4.4-py311np123.tar.bz2
style:
name: Style
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Check for tabs
# Ensure that there are no tabs in source code.
# GREP returns 0 (true) if there are any matches, and
# we don't want any matches. If there are matches,
# print a helpful message, and make the test fail by using "false".
# The GREP command here checks for any tab characters in the the files
# that match the specified pattern. GREP does not pick up explicit tabs
# (e.g., literally a \t in a source file).
run: if grep --line-num --recursive --exclude-dir="*dependencies*" --exclude-dir="*snopt*" --include={CMakeLists.txt,*.cpp,*.c,*.h} -P "\t" . ; then echo "Tabs found in the lines shown above. See CONTRIBUTING.md about tabs."; false; fi