Skip to content

Update main/master branch to build bleeding edge from opensim-core #761

Update main/master branch to build bleeding edge from opensim-core

Update main/master branch to build bleeding edge from opensim-core #761

name: continuous-integration
# syntax https://help.github.com/en/articles/workflow-syntax-for-github-actions
on:
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
windows310:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- 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.25
- name: Install SWIG
run: |
choco install swig --version 4.1.1 --yes --limit-output --allow-downgrade
swig -swiglib
- 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/opensim
conda build .
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: win64-opensim-4.5.99-py310np125.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-4.5.99-py310np125.tar.bz2
ubuntu310:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- 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.25
- 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/v4.1.1.tar.gz
tar xzf v4.1.1.tar.gz && cd swig-4.1.1
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@v4
with:
name: linux64-opensim-4.5.99-py310np125.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-4.5.99-py310np125.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