diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 059febc1..00000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,222 +0,0 @@ -name: MacOS - -on: - pull_request: - branches: - - master - schedule: - # Runs every day at 23:15 - - cron: '15 23 * * *' - -jobs: - build: - name: Building with ${{ matrix.sofa_version }} - runs-on: macos-10.15 - strategy: - fail-fast: false - matrix: - sofa_version: [ v20.06.01, v20.12.03, v21.06.03, v21.12.00, master ] - include: - - sofa_version: master - SOFA_VERSION_I: 999999 - PYTHON_VERSION: 3.9 - PYBIND11_VERSION: 2.6 - BOOST_VERSION: 1.76.0 - BOOST_LINK: https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz - QT_VERSION: 5.12.6 - - sofa_version: v21.12.00 - SOFA_VERSION_I: 211200 - PYTHON_VERSION: 3.9 - PYBIND11_VERSION: 2.6 - BOOST_VERSION: 1.76.0 - BOOST_LINK: https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz - QT_VERSION: 5.12.6 - - sofa_version: v21.06.03 - SOFA_VERSION_I: 210603 - PYTHON_VERSION: 3.9 - PYBIND11_VERSION: 2.6 - BOOST_VERSION: 1.76.0 - BOOST_LINK: https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz - QT_VERSION: 5.12.6 - - sofa_version: v20.12.03 - SOFA_VERSION_I: 201203 - PYTHON_VERSION: 3.7 - PYBIND11_VERSION: 2.6 - BOOST_VERSION: 1.67.0 - BOOST_LINK: https://boostorg.jfrog.io/artifactory/main/release/1.67.0/source/boost_1_67_0.tar.gz - QT_VERSION: 5.12.6 - - sofa_version: v20.06.01 - SOFA_VERSION_I: 200601 - PYTHON_VERSION: 2.7 - PYBIND11_VERSION: 2.6 - BOOST_VERSION: 1.67.0 - BOOST_LINK: https://boostorg.jfrog.io/artifactory/main/release/1.67.0/source/boost_1_67_0.tar.gz - QT_VERSION: 5.11.1 - env: - SOFA_VERSION: ${{ matrix.sofa_version }} - SOFA_ROOT: /opt/sofa - PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} - BOOST_VERSION: ${{ matrix.BOOST_VERSION }} - QT_VERSION: ${{ matrix.QT_VERSION }} - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - run: | - git fetch origin - git rebase origin/master - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.7' #${{ matrix.PYTHON_VERSION }} - - - name: Install requirements - run: | - brew install ccache eigen libpng libjpeg libtiff glew - python3 -m pip install numpy - -# PYBIND11 - - name: Install pybind11 - run: | - git clone --depth 1 -b v${{ matrix.PYBIND11_VERSION }} https://github.com/pybind/pybind11.git /tmp/pybind11 - cmake -S/tmp/pybind11 -B/tmp/pybind11/build -DPYBIND11_TEST=OFF -DCMAKE_BUILD_TYPE=Release - sudo cmake --install /tmp/pybind11/build - rm -rf /tmp/pybind11 - - - name: Opt permission - run: sudo chown -R $(whoami) /opt - -# BOOST - - name: cache boost - uses: actions/cache@v2 - id: cache-boost - with: - path: /opt/boost - key: boost-${{ matrix.BOOST_VERSION }}-macos-1015 - - name: Download boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: | - curl --output boost.tar.gz -L "${{ matrix.BOOST_LINK }}" - tar xzf boost.tar.gz - - name: Patch boost - if: ${{ steps.cache-boost.outputs.cache-hit != 'true' && matrix.BOOST_VERSION == '1.67.0' }} - run: | - curl --output a.patch -L "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - git apply -v --directory=boost_1_67_0/tools/build a.patch - curl --output b.patch -L "https://gist.githubusercontent.com/jnbrunet/d9537ff8679b2b35976356f11f334777/raw/8d2a2a1e46d13064c2e18c5caa229b9b81933285/6e14ca24.patch" - patch -d boost_1_67_0 boost/atomic/detail/ops_gcc_x86_dcas.hpp < b.patch - - name: Build boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: | - if [ "$BOOST_VERSION" = "1.76.0" ]; then - cd boost_1_76_0 - ./bootstrap.sh --prefix=/opt/boost --without-libraries=python,mpi,log --without-icu --libdir=/opt/boost/lib - ./b2 cxxflags=-std=c++11 link=shared threading=multi,single --layout=tagged -d0 -q variant=release architecture=x86 install - else - cd boost_1_67_0 - ./bootstrap.sh --prefix=/opt/boost --without-libraries=python,mpi,log --without-icu --libdir=/opt/boost/lib -with-toolset=darwin - ./b2 toolset=darwin cxxflags=-std=c++11 link=shared threading=multi,single --layout=tagged -d0 -q variant=release architecture=x86 install - fi - -# QT - - name: Cache Qt - id: cache-qt - uses: actions/cache@v1 - with: - path: /opt/qt - key: ${{ format('qt-{0}-macos-10.15', matrix.QT_VERSION) }} - - - name: Install Qt - uses: jurplel/install-qt-action@v2 - with: - version: ${{ matrix.QT_VERSION }} - dir: '/opt/qt' - cached: ${{ steps.cache-qt.outputs.cache-hit }} - modules: 'qtcharts qtwebengine' - aqtversion: '==2.0.5' - setup-python: false - - -# SOFA - - name: Download SOFA Release - run: | - if [ "$SOFA_VERSION" = "master" ]; then - curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/CI_BRANCH=master,CI_SCOPE=standard/lastSuccessfulBuild/artifact/MacOS/*zip*/MacOS.zip" - else - curl --output sofa.zip -L "https://github.com/sofa-framework/sofa/releases/download/$SOFA_VERSION/SOFA_"$SOFA_VERSION"_MacOS.zip" - fi - unzip sofa.zip -d temp - sudo mv temp/`ls temp` $SOFA_ROOT - - -# CCACHE - - name: Get Time - id: time - uses: nanzm/get-time-action@v1.0 - with: - timeZone: 8 - format: 'YYYY-MM-DD-HH-mm-ss' - - - name: ccache cache files - uses: actions/cache@v2 - if: ${{ always() }} - with: - path: .ccache - key: macos-ccache-${{ steps.time.outputs.time }} - restore-keys: | - macos-ccache- - - -# MKL - - name: cache MKL - uses: actions/cache@v2 - id: cache-mkl - with: - path: /opt/intel - key: mkl-macos-10.15 - - - name: Install MKL - if: steps.cache-mkl.outputs.cache-hit != 'true' - run: | - URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/17714/m_BaseKit_p_2021.2.0.2855_offline.dmg - curl --output intel_mkl.dmg --url "$URL" --retry 5 --retry-delay 5 - hdiutil attach intel_mkl.dmg - echo "MKL volume mounted. Now trying to install..." - sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper --action install --components intel.oneapi.mac.mkl.devel --eula=accept --continue-with-optional-error=yes --log-dir=. -c - sudo chown -R $(whoami) /opt - echo "MKL installation done." - - -# CARIBOU - - name: Build caribou - env: - CCACHE_COMPRESS: true - CCACHE_COMPRESSLEVEL: 6 - CCACHE_MAXSIZE: "500M" - PYTHONEXE: ${{ format('/usr/bin/python{0}', matrix.PYTHON_VERSION) }} - run: - export CCACHE_BASEDIR=$GITHUB_WORKSPACE && - export CCACHE_DIR=$GITHUB_WORKSPACE/.ccache && - ccache -z && - cmake - -DBOOST_ROOT=/opt/boost - -DPYTHON_EXECUTABLE=$PYTHONEXE - -DCMAKE_C_COMPILER_LAUNCHER=ccache - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - -DCARIBOU_BUILD_TESTS=ON - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=SofaCaribou - . - && make && make install - && tar czvf SofaCaribou.tar.gz SofaCaribou - && echo ${CCACHE_BASEDIR} - && ccache -s - - - name: Archive production - uses: actions/upload-artifact@v2 - with: - name: caribou_macos_${{ matrix.sofa_version }} - path: SofaCaribou.tar.gz diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 7892807d..fd003f6e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -19,6 +19,7 @@ jobs: include: - sofa_version: master PYTHON_VERSION: 3.8 + EIGEN_VERSION: 3.4 env: SOFA_VERSION: ${{ matrix.sofa_version }} SOFA_ROOT: ${{ format('{0}/sofa', github.workspace) }} @@ -46,7 +47,14 @@ jobs: python-version: ${{ matrix.PYTHON_VERSION }} # Eigen3 + - name: cache eigen + uses: actions/cache@v2 + id: cache-eigen + with: + path: ${{ github.workspace }}/eigen + key: eigen-${{ matrix.EIGEN_VERSION }}-windows - name: Install Eigen + if: steps.cache-eigen.outputs.cache-hit != 'true' shell: bash run: | git clone --depth 1 -b 3.4 https://gitlab.com/libeigen/eigen.git eigen_src @@ -71,6 +79,7 @@ jobs: key: boost-1.69.0-windows - name: Install Boost + if: steps.cache-Boost.outputs.cache-hit != 'true' run: | $BOOST_MAJOR = 1 $BOOST_MINOR = 69