Skip to content

Commit

Permalink
Merge pull request #39 from opensim-org/update_46
Browse files Browse the repository at this point in the history
Update main/master branch to build bleeding edge from opensim-core
  • Loading branch information
aymanhab authored Oct 31, 2024
2 parents dc55086 + f12d191 commit b443051
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 330 deletions.
281 changes: 8 additions & 273 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,238 +2,19 @@ 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
jobs:
ubuntu310:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
Expand All @@ -248,62 +29,16 @@ jobs:

- 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
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/rel-4.0.2.tar.gz
tar xzf rel-4.0.2.tar.gz && cd swig-rel-4.0.2
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
Expand All @@ -316,10 +51,10 @@ jobs:
conda build .
- name: upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: linux64-opensim-4.4-py311np123.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-4.4-py311np123.tar.bz2
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
Expand Down
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# conda-opensim
Conda recipe for OpenSim 4.4
Conda recipe for opensim packages

Usage:

cd conda-opensim
conda build opensim

Only python 3 is supported. Default settings/package doesn't include Moco
Packages with Moco are in a separate opensim-with-moco packages
Packages come with Moco and have version number ending in .99 for dev builds
13 changes: 8 additions & 5 deletions opensim/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cmake ..\dependencies^
-G"Visual Studio 17 2022"^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%"^
-DSUPERBUILD_ezc3d=ON^
-DOPENSIM_WITH_TROPTER=OFF^
-DOPENSIM_WITH_CASADI=OFF
-DOPENSIM_WITH_TROPTER=ON^
-DOPENSIM_WITH_CASADI=ON

cmake --build . --config Release -- /maxcpucount:8
cd ..
Expand All @@ -26,12 +26,15 @@ cmake ..\^
-DBUILD_PYTHON_WRAPPING=ON^
-DOPENSIM_C3D_PARSER=ezc3d^
-DOPENSIM_PYTHON_STANDALONE=ON^
-DOPENSIM_WITH_CASADI=OFF^
-DOPENSIM_WITH_CASADI=ON^
-DOPENSIM_WITH_TROPTER=OFF^
-DBUILD_TESTING=OFF^
-DBUILD_TESTING=ON^
-DBUILD_API_EXAMPLES=OFF^
-DOPENSIM_BUILD_INDIVIDUAL_APPS=ON^
-DOPENSIM_PYTHON_CONDA=ON
-DOPENSIM_PYTHON_CONDA=ON^
-DSWIG_EXECUTABLE="C:/ProgramData/chocolatey/bin/swig.exe"
-LAH

cmake --build . --target install --config Release -- /maxcpucount:8

Rem move Library\sdk\Python Lib
Expand Down
Loading

0 comments on commit b443051

Please sign in to comment.