Skip to content

Commit

Permalink
Merge branch 'master' into CGAL-reuse_compliance-lrineau
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau authored Jul 12, 2023
2 parents 6c6ae1f + 602d022 commit 2330898
Show file tree
Hide file tree
Showing 3,938 changed files with 208,667 additions and 126,032 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: 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@v6
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@v6
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."
})
62 changes: 43 additions & 19 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@v6
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@v6
if: steps.get_round.outputs.result != 'stop'
id: get_pr_number
with:
Expand All @@ -40,24 +47,35 @@ 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@v6
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@v3
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/~cgaltest/doxygen_1_8_13_patched/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 "[email protected]"
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@v6
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@v6
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
7 changes: 5 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
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@v3
- name: install dependencies
run: |
.github/install.sh
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/cmake-all.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
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@v3
- name: install dependencies
run: sudo apt-get install -y libboost-dev libboost-program-options-dev libmpfr-dev libeigen3-dev
- name: configure all
Expand All @@ -22,7 +25,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
- name: install dependencies
run: sudo bash -e .github/install.sh
- name: configure all
Expand Down
11 changes: 8 additions & 3 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@v3
- name: delete directory
run: |
set -x
git config --global user.email "[email protected]"
git config --global user.name "cgaltest"
git clone https://maxGimeno:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git --depth=5
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@v3
- 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@v3
- 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@v3
- 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@v3
- name: install dependencies
run: .github/install.sh
- name: run4
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/filter_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ name: Filter Testsuite
on:
issue_comment:
types: [created]
workflow_dispatch:

permissions: {}
jobs:
build:
permissions:
pull-requests: write # to create comment

if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
- uses: actions/github-script@v6
id: get_label
with:
result-encoding: string
Expand Down Expand Up @@ -58,7 +63,7 @@ jobs:
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
done
- name: Post address
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
script: |
const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml "
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/list_workflow_last_run.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
table {
margin-left: auto;
margin-right: auto;
margin-bottom: 24px;
border-spacing: 0;
border-bottom: 2px solid black;
border-top: 2px solid black;
}
table th {
padding: 3px 10px;
background-color: white;
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1px solid black;
}
table td {
padding: 3px 10px;
border-top: none;
border-left: none;
border-bottom: none;
border-right: none;
}

table tr.odd {
background-color: #f0f0f0;
}
table tr.even {
background-color: #e0e0e0;
}
Loading

0 comments on commit 2330898

Please sign in to comment.