-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,92 +10,40 @@ on: | |
|
||
jobs: | ||
build: | ||
name: Building with ${{ matrix.sofa_version }} | ||
runs-on: ubuntu-24.04 | ||
container: ${{ matrix.CONTAINER }} | ||
name: Run on ${{ matrix.os }} with SOFA ${{ matrix.sofa_branch }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sofa_version: [ master ] | ||
include: | ||
- sofa_version: master | ||
SOFA_VERSION_I: 999999 | ||
CONTAINER: jnbrunet/caribou-ubuntu-2004-builder:latest | ||
PYTHON_VERSION: 3.8 | ||
PYBIND11_VERSION: 2.6 | ||
env: | ||
SOFA_VERSION: ${{ matrix.sofa_version }} | ||
SOFA_ROOT: /opt/sofa | ||
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | ||
os: [ubuntu-22.04] | ||
sofa_branch: [master] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup SOFA and environment | ||
id: sofa | ||
uses: sofa-framework/sofa-setup-action@v5 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Caribou Github" | ||
git fetch origin | ||
git merge origin/master | ||
- name: Install pybind11 | ||
if: ${{ matrix.PYBIND11_VERSION != '2.4' }} | ||
run: | | ||
git clone --depth 1 -b v${{ matrix.PYBIND11_VERSION }} https://github.com/pybind/pybind11.git /tmp/pybind11 | ||
cmake -GNinja -S/tmp/pybind11 -B/tmp/pybind11/build -DPYBIND11_TEST=OFF -DCMAKE_BUILD_TYPE=Release | ||
cmake --install /tmp/pybind11/build | ||
rm -rf /tmp/pybind11 | ||
- 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/lastStableBuild/CI_BRANCH=master,CI_SCOPE=standard/artifact/Linux/*zip*/Linux.zip" | ||
unzip sofa.zip -d temp | ||
mv temp/Linux/`ls temp/Linux` sofa.zip | ||
rm -rf temp | ||
unzip sofa.zip -d temp | ||
mv temp/`ls temp` $SOFA_ROOT | ||
else | ||
curl --output sofa.zip -L "https://github.com/sofa-framework/sofa/releases/download/$SOFA_VERSION/SOFA_"$SOFA_VERSION"_Linux.zip" | ||
unzip sofa.zip -d temp | ||
mv temp/`ls temp` $SOFA_ROOT | ||
fi | ||
- name: Get Time | ||
id: time | ||
uses: nanzm/[email protected] | ||
sofa_root: ${{ github.workspace }}/sofa | ||
sofa_version: ${{ matrix.sofa_branch }} | ||
sofa_scope: 'standard' | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
with: | ||
timeZone: 8 | ||
format: 'YYYY-MM-DD-HH-mm-ss' | ||
|
||
- name: ccache cache files | ||
uses: actions/cache@v2 | ||
if: ${{ always() }} | ||
with: | ||
path: .ccache | ||
key: ubuntu-ccache-${{ steps.time.outputs.time }} | ||
restore-keys: | | ||
ubuntu-ccache- | ||
path: ${{ env.WORKSPACE_SRC_PATH }} | ||
|
||
- 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 && | ||
run: | | ||
cd "$WORKSPACE_BUILD_PATH" | ||
cmake | ||
-GNinja | ||
-DPYTHON_EXECUTABLE=$PYTHONEXE | ||
-DCARIBOU_BUILD_TESTS=ON | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_INSTALL_PREFIX=SofaCaribou | ||
-DCMAKE_INSTALL_PREFIX="$WORKSPACE_INSTALL_PATH" | ||
-DCMAKE_PREFIX_PATH=$SOFA_ROOT/lib/cmake | ||
. | ||
&& cmake --build . && cmake --install . | ||
&& tar czvf SofaCaribou.tar.gz SofaCaribou | ||
cmake --build . && cmake --install . | ||
tar czvf SofaCaribou.tar.gz SofaCaribou | ||
- name: Archive production | ||
uses: actions/[email protected] | ||
|