Skip to content

Commit

Permalink
Merge branch 'master' into Gaussian_map_3-efif
Browse files Browse the repository at this point in the history
  • Loading branch information
efifogel committed Jan 15, 2024
2 parents d5095e4 + a484bfa commit abf2420
Show file tree
Hide file tree
Showing 5,852 changed files with 523,450 additions and 338,151 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
33 changes: 25 additions & 8 deletions .github/install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
#!/bin/bash
sudo add-apt-repository ppa:mikhailnov/pulseeffects -y

set -ex

sudo apt-get update
sudo apt-get install -y libmpfr-dev \
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost-dev libinsighttoolkit4-dev zsh
#update cmake to 3.18.4
sudo apt-get install -y \
libmpfr-dev \
libtbb-dev \
libmetis-dev \
libssh-dev \
libeigen3-dev \
qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5websockets5-dev \
libqt5svg5-dev qttools5-dev qttools5-dev-tools \
libboost-dev libboost-serialization-dev libboost-iostreams-dev libboost-filesystem-dev libboost-filesystem-dev \
libvtk9-dev libgdcm-tools libvtkgdcm-dev libunwind-dev \
libinsighttoolkit5-dev \
libceres-dev \
libglpk-dev \
libopencv-dev \
zsh \
qt6-base-dev qt6-declarative-dev libqt6svg6-dev libqt6websockets6-dev

#update CMake
sudo apt purge --auto-remove cmake
cd /tmp
wget https://cmake.org/files/v3.18/cmake-3.18.4-Linux-x86_64.sh
sudo sh cmake-3.18.4-Linux-x86_64.sh --skip-license --prefix=/usr/local
rm cmake-3.18.4-Linux-x86_64.sh
CMAKE_VER=$(curl --silent https://cmake.org/files/LatestRelease/cmake-latest-files-v1.json | jq -r .version.string)
wget https://cmake.org/files/LatestRelease/cmake-$CMAKE_VER-linux-x86_64.sh
sudo sh cmake-*.sh --skip-license --prefix=/usr/local
rm cmake-*.sh
5 changes: 2 additions & 3 deletions .github/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
FACTOR=$1
set -ex
cd Polyhedron/demo
LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build . -t help | egrep 'plugin$' |& cut -d\ -f2)
/usr/local/bin/cmake -S Polyhedron -B build -DCGAL_DIR=$2
LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build build -t help | egrep 'plugin$' |& cut -d\ -f2)
PLUGINS_ARRAY=(${LIST_OF_PLUGINS});
NB_OF_PLUGINS=${#PLUGINS_ARRAY[@]}
DEL=$(($NB_OF_PLUGINS / 4))
mkdir build
cd build
/usr/local/bin/cmake -DCGAL_DIR=$2 ../Polyhedron
make -j2 ${PLUGINS_ARRAY[@]:$(($FACTOR * $DEL)):$((($FACTOR + 1) * $DEL))}
33 changes: 33 additions & 0 deletions .github/workflows/Remove_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: remove_labels
on:
pull_request_target:
types: [synchronize]
workflow_dispatch:
jobs:
remove_label:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'Tested')
name: remove label
steps:
- name: removelabel
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: "Tested",
});
- name: Post address
uses: actions/github-script@v7
if: ${{ success() }}
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "This pull-request was previously marked with the label `Tested`, but has been modified with new commits. That label has been removed."
})
66 changes: 45 additions & 21 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ on:
issue_comment:
types: [created]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
build:

permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create comment

runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
- uses: actions/github-script@v7
id: get_round
with:
result-encoding: string
Expand All @@ -31,7 +38,7 @@ jobs:
}
}
return 'stop'
- uses: actions/github-script@v3
- uses: actions/github-script@v7
if: steps.get_round.outputs.result != 'stop'
id: get_pr_number
with:
Expand All @@ -40,28 +47,39 @@ jobs:
//get pullrequest url
const pr_number = context.payload.issue.number
return pr_number
- uses: actions/checkout@v2
name: "checkout branch"
- name: Emoji-comment
uses: actions/github-script@v7
if: steps.get_round.outputs.result != 'stop'
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
fetch-depth: 2
script: |
github.rest.reactions.createForIssueComment({
comment_id: ${{ github.event.comment.id }},
owner: context.repo.owner,
repo: context.repo.repo,
content: 'rocket'
})
- uses: actions/checkout@v4
name: "checkout branch"
if: steps.get_round.outputs.result != 'stop'
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
fetch-depth: 2

- name: install dependencies
if: steps.get_round.outputs.result != 'stop'
run: |
set -x
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
sudo pip install lxml
sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen/build_1_8_13/bin/doxygen
sudo pip install pyquery
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_9_6_patched/doxygen
sudo mv doxygen_exe /usr/bin/doxygen
sudo chmod +x /usr/bin/doxygen
git config --global user.email "maxime.gimeno@geometryfactory.com"
git config --global user.name "Maxime Gimeno"
git config --global user.email "cgal@geometryfactory.com"
git config --global user.name "cgaltest"
- name: configure all
if: steps.get_round.outputs.result != 'stop'
Expand All @@ -83,14 +101,17 @@ jobs:
#list impacted packages
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
if [ "$LIST_OF_PKGS" = "" ]; then
echo "::set-output name=DoxygenError::No package affected."
echo "DoxygenError=No package affected." >> $GITHUB_OUTPUT
exit 1
fi
cd build_doc && make -j2 doc
make -j2 doc_with_postprocessing 2>tmp.log
if [ -s tmp.log ]; then
content=`cat ./tmp.log`
echo "::set-output name=DoxygenError::$(cat tmp.log)"
delimiter="$(openssl rand -hex 8)"
echo "DoxygenError<<${delimiter}" >> "${GITHUB_OUTPUT}"
cat tmp.log >> "${GITHUB_OUTPUT}"
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
exit 1
fi
cd ..
Expand All @@ -110,34 +131,37 @@ jobs:
mv tmp.html index.html
git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
else
echo "::set-output name=DoxygenError::This round already exists. Overwrite it with /force-build."
echo "DoxygenError=This round already exists. Overwrite it with /force-build." >> $GITHUB_OUTPUT
exit 1
fi
- name: Post address
uses: actions/github-script@v3
uses: actions/github-script@v7
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
const tmp_round = "${{ steps.get_round.outputs.result }}";
const id = tmp_round.indexOf(":");
const round = tmp_round.substring(0,id);
const address = "The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/"+round+"/Manual/index.html"
github.issues.createComment({
github.rest.issues.createComment({
owner: "CGAL",
repo: "cgal",
issue_number: ${{ github.event.issue.number }},
body: address
});
- name: Post error
uses: actions/github-script@v3
env:
ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}}
uses: actions/github-script@v7
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
const msg = "There was an error while building the doc: \n"+error
github.issues.createComment({
const error = process.env.ERRORMSG
const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}`
const msg = "There was an error while building the doc: \n```\n"+error + "\n```\n" + job_url
github.rest.issues.createComment({
owner: "CGAL",
repo: "cgal",
issue_number: ${{ github.event.issue.number }},
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
name: CMake Test Merge Branch

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/install.sh
set -x
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
sudo pip install lxml
sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen/build_1_8_13/bin/doxygen
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen
sudo mv doxygen_exe /usr/bin/doxygen
sudo chmod +x /usr/bin/doxygen
git config --global user.email "maxime.gimeno@geometryfactory.com"
git config --global user.name "Maxime Gimeno"
git config --global user.email "cgal@geometryfactory.com"
git config --global user.name "cgaltest"
- name: Run checks
run: |
zsh Scripts/developer_scripts/test_merge_of_branch HEAD
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/cmake-all.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
name: CMake Testsuite

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

jobs:
cmake-testsuite:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt-get install -y libboost-dev libboost-program-options-dev libmpfr-dev libeigen3-dev
- name: configure all
run: |
set -e
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DBUILD_TESTING=ON ..
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DCGAL_ENABLE_TESTING=ON ..
ctest -L Installation -j $(getconf _NPROCESSORS_ONLN)
cmake-testsuite-with-qt5:
cmake-testsuite-with-qt:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: sudo bash -e .github/install.sh
- name: configure all
run: |
set -e
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DBUILD_TESTING=ON ..
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DCGAL_ENABLE_TESTING=ON ..
ctest -L Installation -j $(getconf _NPROCESSORS_ONLN)
15 changes: 10 additions & 5 deletions .github/workflows/delete_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ name: Documentation Removal

on:
pull_request_target:
types: [closed, removed]
types: [closed, removed, workflow_dispatch]
permissions:
contents: read

jobs:
build:

permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: delete directory
run: |
set -x
git config --global user.email "maxime.gimeno@geometryfactory.com"
git config --global user.name "Maxime Gimeno"
git clone https://maxGimeno:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git --depth=5
git config --global user.email "cgal@geometryfactory.com"
git config --global user.name "cgaltest"
git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git
PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])")
cd cgal.github.io/
egrep -v " ${PR_NUMBER}\." index.html > tmp.html || true
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
name: Test Polyhedron Demo

on: [push, pull_request]
on: [push, pull_request,workflow_dispatch]

permissions:
contents: read

jobs:
batch_1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: .github/install.sh
- name: run1
run: ./.github/test.sh 0 ${{ github.workspace }}
batch_2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: .github/install.sh
- name: run2
run: ./.github/test.sh 1 ${{ github.workspace }}
batch_3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: .github/install.sh
- name: run3
run: ./.github/test.sh 2 ${{ github.workspace }}
batch_4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
- name: install dependencies
run: .github/install.sh
- name: run4
Expand Down
Loading

0 comments on commit abf2420

Please sign in to comment.