Skip to content

Commit

Permalink
Remove deprecated MacOS 10.15 runner from CI script (#3454)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbianco committed May 18, 2023
1 parent 791b41b commit 380688a
Showing 1 changed file with 0 additions and 151 deletions.
151 changes: 0 additions & 151 deletions .github/workflows/continuous_integration.yml
Expand Up @@ -253,160 +253,9 @@ jobs:
name: opensim-core-${{ steps.configure.outputs.version }}-win
path: opensim-core-${{ steps.configure.outputs.version }}.zip


mac:
name: Mac

runs-on: macos-10.15

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.8'

- 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
brew reinstall gcc
pip3 install numpy==1.20.2
gfortran -v
mkdir gfortran_version
gfortran -v &> gfortran_version/gfortran_version.txt
- name: Cache SWIG
id: cache-swig
uses: actions/cache@v3
with:
path: ~/swig
key: ${{ runner.os }}-swig

- name: Install SWIG
# if: steps.cache-swig.outputs.cache-hit != 'true'
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: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: ~/opensim_dependencies_install
# If Homebrew updates the gcc package, then our cache of IPOPT is invalid.
# Specifically, the pkgcfg_lib_IPOPT_gfortran CMake variable becomes
# undefined.
key: ${{ runner.os }}-dependencies-${{ hashFiles('dependencies/*') }}-${{ hashFiles('gfortran_version/*') }}

- name: Build dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
mkdir $GITHUB_WORKSPACE/../build_deps
cd $GITHUB_WORKSPACE/../build_deps
DEP_CMAKE_ARGS=($GITHUB_WORKSPACE/dependencies -LAH)
DEP_CMAKE_ARGS+=(-DCMAKE_INSTALL_PREFIX=~/opensim_dependencies_install)
DEP_CMAKE_ARGS+=(-DCMAKE_BUILD_TYPE=Release)
DEP_CMAKE_ARGS+=(-DSUPERBUILD_ezc3d=ON)
DEP_CMAKE_ARGS+=(-DOPENSIM_WITH_TROPTER=ON)
DEP_CMAKE_ARGS+=(-DOPENSIM_WITH_CASADI=ON)
DEP_CMAKE_ARGS+=(-DOPENSIM_DISABLE_LOG_FILE=ON)
DEP_CMAKE_ARGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10)
printf '%s\n' "${DEP_CMAKE_ARGS[@]}"
cmake "${DEP_CMAKE_ARGS[@]}"
make --jobs 4
- name: Configure opensim-core
id: configure
run: |
mkdir $GITHUB_WORKSPACE/../build
cd $GITHUB_WORKSPACE/../build
OSIM_CMAKE_ARGS=($GITHUB_WORKSPACE -LAH)
OSIM_CMAKE_ARGS+=(-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../opensim-core-install)
OSIM_CMAKE_ARGS+=(-DCMAKE_BUILD_TYPE=Release)
OSIM_CMAKE_ARGS+=(-DOPENSIM_DEPENDENCIES_DIR=~/opensim_dependencies_install)
OSIM_CMAKE_ARGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10)
OSIM_CMAKE_ARGS+=(-DOPENSIM_C3D_PARSER=ezc3d)
OSIM_CMAKE_ARGS+=(-DBUILD_PYTHON_WRAPPING=on -DBUILD_JAVA_WRAPPING=on)
OSIM_CMAKE_ARGS+=(-DSWIG_EXECUTABLE=$HOME/swig/bin/swig)
OSIM_CMAKE_ARGS+=(-DOPENSIM_INSTALL_UNIX_FHS=OFF)
OSIM_CMAKE_ARGS+=(-DOPENSIM_DOXYGEN_USE_MATHJAX=off)
# TODO: Update to simbody.github.io/latest
OSIM_CMAKE_ARGS+=(-DOPENSIM_SIMBODY_DOXYGEN_LOCATION="https://simbody.github.io/simtk.org/api_docs/simbody/latest/")
OSIM_CMAKE_ARGS+=(-DCMAKE_CXX_FLAGS="-Werror")
printf '%s\n' "${OSIM_CMAKE_ARGS[@]}"
cmake "${OSIM_CMAKE_ARGS[@]}"
VERSION=`cmake -L . | grep OPENSIM_QUALIFIED_VERSION | cut -d "=" -f2`
echo $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build opensim-core
run: |
cd $GITHUB_WORKSPACE/../build
make --jobs 4
- name: Test opensim-core
run: |
cd $GITHUB_WORKSPACE/../build
ctest --parallel 4 --output-on-failure
- name: Install opensim-core
run: |
cd $GITHUB_WORKSPACE/../build
make doxygen
make install
cd $GITHUB_WORKSPACE
mv $GITHUB_WORKSPACE/../opensim-core-install opensim-core-${{ steps.configure.outputs.version }}
zip --symlinks --recurse-paths --quiet opensim-core-${{ steps.configure.outputs.version }}.zip opensim-core-${{ steps.configure.outputs.version }}
mv opensim-core-${{ steps.configure.outputs.version }} $GITHUB_WORKSPACE/../opensim-core-install
- name: Test Python bindings
run: |
cd $GITHUB_WORKSPACE/../opensim-core-install/sdk/Python
# Run the python tests, verbosely.
python3 -m unittest discover --start-directory opensim/tests --verbose
- name: Upload opensim-core
uses: actions/upload-artifact@v3
with:
# The upload-artifact zipping does not preserve symlinks or executable
# bits. So we zip ourselves, even though this causes a double-zip.
name: opensim-core-${{ steps.configure.outputs.version }}-mac
path: opensim-core-${{ steps.configure.outputs.version }}.zip

# - name: Create release
# id: create-release
# uses: actions/create-release@v1.0.0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: OpenSim Core ${{ steps.configure.outputs.version }}
# draft: true
# prerelease: false

# - name: Zip opensim-core
# run: |
# zip --symlinks --recurse-paths --quiet opensim-core-$VERSION.zip opensim-core-${VERSION}

# - name: Upload release asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1.0.1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create-release.outputs.upload_url }}
# asset_path: ./opensim-core-${{ steps.configure.outputs.version }}.zip
# asset_name: opensim-core-${{ steps.configure.outputs.version }}.zip
# asset_content_type: application/zip

mac11:
name: Mac11

runs-on: macos-11

steps:
Expand Down

0 comments on commit 380688a

Please sign in to comment.