Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci build moco #10

Open
wants to merge 108 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
fbd52f7
Use 4.2 codebase
aymanhab Jan 21, 2021
3bf6ca2
Use VS 2019, 4.2Beta code base dependencies build ok so far
aymanhab Jan 23, 2021
70ad8c7
Add numpy dependency and allow opensim to build to completion on windows
aymanhab Jan 28, 2021
8191f67
Force python 3.7
aymanhab Jan 28, 2021
ef4aa35
Update .travis.yml
aymanhab Jan 28, 2021
f63a136
Successful build on linux ubuntu, packaging in progress
aymanhab Jan 30, 2021
3c9d195
Merge branch 'use_opensim42' of https://github.com/opensim-org/conda-…
aymanhab Jan 30, 2021
e2c88cf
Update rev to commit built with swig 4.0
aymanhab Apr 15, 2021
b5a6384
Refresh variables in build script to correspond to master commit with…
aymanhab Apr 15, 2021
3192284
rename cp to copy in bat file
aymanhab Apr 15, 2021
5ea801f
Add ci file, windows only
aymanhab Apr 19, 2021
b3e8ea4
Update continuous_integration.yml
aymanhab Apr 19, 2021
f2597b3
try different path in ci
aymanhab Apr 19, 2021
19669b5
Update continuous_integration.yml
aymanhab Apr 19, 2021
36b3d6a
Update continuous_integration.yml
aymanhab Apr 19, 2021
472137e
use path for recipe
aymanhab Apr 19, 2021
626d384
Update continuous_integration.yml
aymanhab Apr 19, 2021
1574d1f
Update continuous_integration.yml
aymanhab Apr 19, 2021
4175e7e
Update continuous_integration.yml
aymanhab Apr 19, 2021
1fd2411
Update continuous_integration.yml
aymanhab Apr 19, 2021
4ade724
Update continuous_integration.yml
aymanhab Apr 19, 2021
00c414e
Manual install numpy
aymanhab Apr 21, 2021
a528cd2
Add Mac to script, change version number to 4-2- instead of 4.2. to a…
aymanhab Apr 21, 2021
8c11bdd
Update meta.yaml
aymanhab Apr 21, 2021
6c0e1f5
Update continuous_integration.yml
aymanhab Apr 21, 2021
81b071c
Update continuous_integration.yml
aymanhab Apr 21, 2021
8493f0c
remove py>=37 that triggers bug in conda_build /windows
aymanhab Apr 22, 2021
f90ca93
build on windows 4.3 codebase
aymanhab Feb 4, 2022
5222717
Build without Moco libraries for now
aymanhab Feb 7, 2022
eb11157
Add variants file for python, numpy
aymanhab Feb 9, 2022
4d9295c
Use later commit hash
aymanhab Feb 9, 2022
ffa4341
Update commit hash
aymanhab Feb 10, 2022
06fbaf7
Disable testing for now so the package can be uploaded/tested separately
aymanhab Feb 10, 2022
a1b8092
restrict variants to 3.8 and use cond-forge recommended settings for …
aymanhab Feb 11, 2022
f06549d
Restrict vs specification to windows platform
aymanhab Feb 11, 2022
e4f172b
Layout install per conda recommendation with Lib, Library folders
aymanhab Feb 14, 2022
a2244a5
Use py39 instead of 38 by default until we build variants
aymanhab Feb 14, 2022
2601b30
Create Lib folder and run install scripts
aymanhab Feb 15, 2022
acf979b
no install for now, allow for variants and name package accordingly
aymanhab Feb 16, 2022
2c2a955
Python 38, Numpy 1.19
aymanhab Feb 16, 2022
098aab5
More recent commit hash, remove toolchain on osx
aymanhab Feb 17, 2022
f743c10
use version 4.4 in script
aymanhab Feb 18, 2022
cbc8c17
Minimize variants until the build/packaging is operational
aymanhab Feb 18, 2022
b8db004
Rearrange layout on windows
aymanhab Feb 22, 2022
4f9b3a3
Disable broken osx for now
aymanhab Feb 22, 2022
9b1bd00
Update continuous_integration.yml
aymanhab Feb 24, 2022
32df2ad
Update continuous_integration.yml
aymanhab Feb 24, 2022
b7f6a73
Restore mac build
aymanhab Feb 24, 2022
9afacc0
fix indentation
aymanhab Feb 24, 2022
8cfde9e
Use cd instead of chdir
aymanhab Feb 24, 2022
b63b1f5
Use correct syntax for workspace on mac
aymanhab Feb 24, 2022
d005de3
Update meta.yaml
aymanhab Feb 25, 2022
90b8155
platfom specific switches for compilers
aymanhab Feb 25, 2022
658aaed
Merge branch 'ci_conda_build' of https://github.com/opensim-org/conda…
aymanhab Feb 25, 2022
4235c76
osx compiler flags
aymanhab Feb 25, 2022
47c7bab
specify clang
aymanhab Feb 25, 2022
ae17bd2
Build on osx
aymanhab Feb 26, 2022
36ab305
Help CMake find sdk on osx
aymanhab Feb 27, 2022
5b55c0d
Post install script on windows to add dll_directory
aymanhab Feb 27, 2022
133a179
Merge branch 'ci_conda_build' of https://github.com/opensim-org/conda…
aymanhab Feb 27, 2022
8f6c8f3
debug sdk location on osx
aymanhab Feb 27, 2022
8e93d98
runinstall script on windows, try tweaking osx build.sh
aymanhab Feb 28, 2022
5b2cb4e
patch to fix dll_directory
aymanhab Mar 1, 2022
1e26e31
Update commit hash and final tweaks of windows build
aymanhab Mar 2, 2022
712e67e
Working conda build on linux without moco
aymanhab Mar 3, 2022
350d32b
Update conda_build_config.yaml
aymanhab Mar 3, 2022
b4a5335
Update README.md
aymanhab Mar 3, 2022
fd0d218
Update meta.yaml
aymanhab Mar 3, 2022
ac810f9
ubunutu build attempt
aymanhab Mar 3, 2022
dc65447
unix platform
aymanhab Mar 3, 2022
fbad0d7
formatting
aymanhab Mar 3, 2022
af12532
install python and swig before building so that CMake can find them
aymanhab Mar 4, 2022
3f46e2a
Update meta.yaml
aymanhab Mar 4, 2022
45ba2de
Specify swig location for github action
aymanhab Mar 4, 2022
0a14e6a
Update build.sh
aymanhab Mar 4, 2022
4bd86cf
Update continuous_integration.yml
aymanhab Mar 5, 2022
ecb9210
Change path to sdk
aymanhab Mar 5, 2022
999d756
Merge branch 'ci_conda_build' of https://github.com/opensim-org/conda…
aymanhab Mar 5, 2022
e864c59
Use 12.4 and sdk 12.1
aymanhab Mar 5, 2022
1718153
Support osx package, no Moco
aymanhab Mar 8, 2022
1c685d3
Merge build.sh for osx and linux
aymanhab Mar 8, 2022
961111b
Fix swig path for linux
aymanhab Mar 9, 2022
23283d7
Update meta.yaml
aymanhab Mar 11, 2022
a9e2a36
Update meta.yaml
aymanhab Mar 19, 2022
36031c9
Use latest commit hash on master, and latest default setting for CMak…
aymanhab Apr 12, 2022
41e0731
no casdai or tropter by default and use more recent commit
aymanhab May 4, 2022
5166ece
Merge branch 'ci_conda_build' of https://github.com/opensim-org/conda…
aymanhab May 4, 2022
9cc49b1
No Moco by default, update commit hash
aymanhab May 5, 2022
972eb1a
No Moco on *nixes by default
aymanhab May 5, 2022
97a54f2
Both 3.7 and 3.9
aymanhab May 6, 2022
1ccd81a
Try make both py37, py39 window builds on ci
aymanhab May 6, 2022
2aaa1c3
fix syntax
aymanhab May 6, 2022
ce3c495
update hash
aymanhab May 6, 2022
5c14e59
Update meta.yaml
aymanhab May 13, 2022
675f380
Add python3.7 on ubuntu
aymanhab May 13, 2022
2f93c0a
Merge branch 'ci_conda_build' of https://github.com/opensim-org/conda…
aymanhab May 13, 2022
e50e0df
Update README.md
aymanhab Jun 5, 2022
0ed9054
Use 4.4 branch commit hash, build with python 3.8 and add variants to…
aymanhab Jun 10, 2022
04a0c49
use branch_4.4
aymanhab Jun 10, 2022
1829cbc
use git_rev instead of tag
aymanhab Jun 10, 2022
9416846
remove depth if branch is used
aymanhab Jun 10, 2022
0caf9ac
Update continuous_integration.yml
aymanhab Jun 14, 2022
499191d
turn moco build on
aymanhab Jun 14, 2022
68e2d76
update artifact names
aymanhab Jun 15, 2022
b1020c3
Merge pull request #8 from opensim-org/ci_conda_build
aymanhab Jun 20, 2022
34edb7f
turn moco build on
aymanhab Jun 14, 2022
c80403f
update artifact names
aymanhab Jun 15, 2022
bbe9344
Merge branch 'ci_build_moco' of https://github.com/opensim-org/conda-…
aymanhab Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 260 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
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:
- '*'

jobs:
windows37:
runs-on: windows-2019

steps:
- uses: actions/checkout@v1

- name: Install Python packages
uses: actions/setup-python@v2
with:
python-version: '3.7'

- 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-moco-4.4-py37np120.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-moco-4.4-py37np120.tar.bz2
windows38:
runs-on: windows-2019

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-moco-4.4-py38np120.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-moco-4.4-py38np120.tar.bz2
windows39:
runs-on: windows-2019

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-moco-4.4-py39np120.tar.bz2
path: C:/Miniconda3/envs/test/conda-bld/win-64/opensim-moco-4.4-py39np120.tar.bz2

mac:
name: Mac

runs-on: macos-10.15

steps:
- uses: actions/checkout@v1

- name: Install Homebrew packages
# Save the gfortran version to a file so we can use it in the cache key.
run: |
brew install cmake pkgconfig autoconf libtool automake wget pcre doxygen [email protected]
brew reinstall gcc
pip3 install numpy==1.20.2
gfortran -v
mkdir gfortran_version
gfortran -v &> gfortran_version/gfortran_version.txt

- 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: |
cd $GITHUB_WORKSPACE
conda build .

ubuntu37:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"

- 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.7 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-moco-4.4-py37np120.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-moco-4.4-py37np120.tar.bz2
ubuntu38:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"

- 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-moco
conda build .

- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: linux64-opensim-moco-4.4-py38np120.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-moco-4.4-py38np120.tar.bz2
ubuntu39:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"

- 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-moco-4.4-py39np120.tar.bz2
path: /usr/share/miniconda3/conda-bld/linux-64/opensim-moco-4.4-py39np120.tar.bz2

style:
name: Style

runs-on: ubuntu-18.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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
*~
*~
/opensim/.vs/ProjectSettings.json
/opensim/.vs/VSWorkspaceState.json
/opensim/.vs/opensim/v16/.suo
/opensim/.vs/slnx.sqlite
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "2.7"
- "3.7"
install:
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
Expand All @@ -24,4 +24,4 @@ install:
- conda-build opensim

script:
# Your test script goes here
# Your test script goes here
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# conda-opensim
Unofficial conda recipe for OpenSim 4.0-alpha
Unofficial conda recipe for OpenSim 4.4

Usage:

cd conda-opensim
conda build opensim

For python 3, use the python3 branch and

conda build opensim --python 3.5
Only python 3 is supported. Default settings/package doesn't include Moco
35 changes: 28 additions & 7 deletions opensim/bld.bat
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
mkdir opensim_dependencies_build
cd .\opensim_dependencies_build
cmake ..\dependencies^
-G"Visual Studio 14 2015 Win64"^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%"
-G"Visual Studio 16 2019"^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%"^
-DSUPERBUILD_ezc3d=ON^
-DOPENSIM_WITH_TROPTER=ON^
-DOPENSIM_WITH_CASADI=ON

cmake --build . --config Release -- /maxcpucount:8
cd ..

mkdir opensim_build
cd .\opensim_build
cmake ..\^
-G"Visual Studio 14 2015 Win64"^
-G"Visual Studio 16 2019"^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%"^
-DOPENSIM_DEPENDENCIES_DIR="%LIBRARY_PREFIX%"^
-DCMAKE_INSTALL_INCLUDEDIR="%LIBRARY_PREFIX%/include"^
-DCMAKE_INSTALL_LIBDIR="%LIBRARY_PREFIX%/lib"^
-DCMAKE_INSTALL_DOCDIR="%LIBRARY_PREFIX%/doc"^
-DCMAKE_INSTALL_SYSCONFDIR="%LIBRARY_PREFIX%/Library"^
-DOPENSIM_INSTALL_PYTHONDIR="%LIBRARY_PREFIX%/Lib/site-packages"^
-DOPENSIM_INSTALL_SIMBODYDIR="%LIBRARY_PREFIX%/Library/Simbody"^
-DOPENSIM_INSTALL_SPDLOGDIR="%LIBRARY_PREFIX%/Library/spdlog"^
-DOPENSIM_INSTALL_CASADIDIR="%LIBRARY_PREFIX%/Library"^
-DBUILD_PYTHON_WRAPPING=ON^
-DWITH_BTK=ON
-DOPENSIM_C3D_PARSER=ezc3d^
-DOPENSIM_PYTHON_STANDALONE=ON^
-DOPENSIM_WITH_CASADI=ON^
-DOPENSIM_WITH_TROPTER=ON^
-DBUILD_TESTING=OFF^
-DBUILD_API_EXAMPLES=OFF^
-DOPENSIM_BUILD_INDIVIDUAL_APPS=OFF^
-DOPENSIM_PYTHON_CONDA=ON
cmake --build . --target install --config Release -- /maxcpucount:8

cp %LIBRARY_PREFIX%\simbody\bin\simbody-visualizer.exe %PREFIX%\simbody-visualizer.exe
cd %LIBRARY_PREFIX%\sdk\python
Rem move Library\sdk\Python Lib
move %LIBRARY_PREFIX%\sdk\Python %LIBRARY_PREFIX%\..\Lib
cd %LIBRARY_PREFIX%\..\Lib
Rem python setup_win_python38.py conda
python setup.py install

Loading