Skip to content

Commit b3527c3

Browse files
authored
Merge pull request #783 from e0404/rc/v3
Update to release v3 "Cleve"
2 parents 5b175b9 + 1bf700b commit b3527c3

File tree

625 files changed

+51394
-15613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

625 files changed

+51394
-15613
lines changed

.github/PULL_REQUEST_TEMPLATE/release_checklist_pull_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Version of new Release and Type (new major release, minor release, patch release
33

44
### Release Checklist
55

6-
- [ ] Version number changed in matRad_getVersion
7-
- [ ] Adapted Changelog.txt
6+
- [ ] Adapted Changelog.md
87
- [ ] All required mex files compiled
98
- [ ] Third Party libraries / scripts up to date
109
- [ ] Standalone(s) generated and tested
1110
- [ ] Wiki adapted
1211
- [ ] Optional changes to README.md
1312
- [ ] Check license information
13+
- [ ] Version number changed in matRad_getVersion
1414

1515
### References
1616
Any references regarding new functionality etc.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Matlab Test'
2+
author: 'e0404'
3+
description: 'Runs a Matlab Test for a given version'
4+
5+
inputs:
6+
matlab-version:
7+
description: Matlab Version, e.g. R2022b
8+
required: true
9+
10+
runs:
11+
using: 'composite'
12+
steps:
13+
# Install MATLAB
14+
- name: Install MATLAB
15+
uses: matlab-actions/setup-matlab@v2
16+
with:
17+
release: ${{ inputs.matlab-version }}
18+
products: Image_Processing_Toolbox Parallel_Computing_Toolbox Optimization_Toolbox
19+
20+
# Runs test command
21+
- name: Run Tests
22+
uses: matlab-actions/run-command@v2
23+
with:
24+
command: matRad_runTests('test',true);
25+
26+
- name: Upload Test Results
27+
if: always()
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: test-results-matlab-${{ inputs.matlab-version }}
31+
path: |
32+
testresults.xml
33+
coverage.xml
34+
coverage.json
35+
36+
37+
- name: Publish Test Results
38+
uses: test-summary/action@v2
39+
if: success() || failure()
40+
with:
41+
paths: testresults.xml
42+
# check_name: "${{ github.job }}"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Octave Test'
2+
author: 'e0404'
3+
description: 'Runs an Octave test. Uses the version in the respective Ubuntu-OS'
4+
5+
runs:
6+
using: 'composite'
7+
steps:
8+
- name: Install OCTAVE
9+
shell: bash
10+
run: |
11+
sudo apt update
12+
sudo apt-get install -y gdb gfortran fonts-freefont-otf gnuplot-x11 libgdcm-dev octave liboctave-dev
13+
- name: Prepare Test Environment
14+
shell: bash
15+
run: |
16+
sudo chmod +x .github/before_install_linux.sh
17+
sudo .github/before_install_linux.sh
18+
- name: Run Tests
19+
shell: bash
20+
run: xvfb-run -a .github/runtests.sh octave-cli
21+
# uses: GabrielBB/xvfb-action@v1 #For Headless tests
22+
# with:
23+
# run: .github/runtests.sh octave-cli
24+
- name: Upload Test Results
25+
if: always()
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: test-results-octave
29+
path: testresults.xml
30+
31+
- name: Publish Test Results
32+
# uses: EnricoMi/publish-unit-test-result-action@v2
33+
uses: test-summary/action@v2
34+
if: success() || failure()
35+
with:
36+
# files: |
37+
# testresults.xml
38+
paths: testresults.xml
39+
# check_name: "${{ github.job }}"

.github/before_install_linux.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env bash
22

33
sudo chmod +x .github/runtests.sh
4-
sudo chmod +x MCsquare/bin/MCsquare_linux
4+
sudo chmod +x thirdParty/MCsquare/bin/MCsquare_linux
55

6-
mv optimization/optimizer/ipopt.m optimization/optimizer/ipopt.m.bak
6+
mv matRad/optimization/optimizer/ipopt.m optimization/optimizer/ipopt.m.bak
77

88
octave --no-gui --eval "pkg install -forge dicom"
99
octave --no-gui --eval "pkg install -forge nan"
10+
octave --no-gui --eval "pkg install -forge image"

.github/codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage:
2+
range: 50...75

.github/runtests.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set CONTINUOUS_INTEGRATION=true
3333
set CI=true
3434

3535
REM Actually run the test suite
36-
cd unitTest
36+
cd test
3737
set TESTDIR="%cd%"
3838
REM also CD in MATLAB/Octave to make sure that startup files
3939
REM cannot play any role in setting the path

.github/runtests.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ export CONTINUOUS_INTEGRATION=true
3939
export CI=true
4040

4141
## Actually run the test suite
42-
cd unitTest
43-
TESTDIR=`pwd`
4442
# also CD in MATLAB/Octave to make sure that startup files
4543
# cannot play any role in setting the path
46-
${Runner} ${Switches} "cd('${TESTDIR}'); matRad_runTests" > ../runtests.log #2> ../runtests.err put stdout to log, but let it print error messages
44+
${Runner} ${Switches} "matRad_runTests('test');" > ../runtests.log #2> ../runtests.err put stdout to log, but let it print error messages
4745
exitIfError $?
48-
cd ..
4946

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Coverage Report
2+
3+
permissions:
4+
checks: write
5+
pull-requests: write
6+
actions: read
7+
contents: read
8+
9+
10+
on:
11+
workflow_call:
12+
13+
jobs:
14+
coverage_report:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
19+
- name: Download Coverage Artifact
20+
uses: actions/download-artifact@v4
21+
with:
22+
name: test-results-matlab-R2022b
23+
path: coverage
24+
25+
- name: Upload to Coveralls
26+
uses: coverallsapp/github-action@v2
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
file: coverage/coverage.json
30+
format: coveralls
31+
32+
- name: Upload to Codecov
33+
uses: codecov/codecov-action@v4
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}
36+
file: coverage/coverage.xml
37+
fail_ci_if_error: false
38+
39+
- name: Publish Coverage Report
40+
uses: irongut/[email protected]
41+
with:
42+
filename: coverage/coverage.xml
43+
badge: true
44+
fail_below_min: false
45+
format: markdown
46+
hide_branch_rate: true
47+
hide_complexity: true
48+
indicators: true
49+
output: both
50+
thresholds: '50 70'
51+
52+
- name: Attach Job Summary
53+
uses: actions/github-script@v7
54+
with:
55+
script: |
56+
const fs = require('fs');
57+
const markdownContent = fs.readFileSync('code-coverage-results.md', 'utf8');
58+
core.summary.addRaw(markdownContent);
59+
core.summary.write();
60+
61+
- name: Add Coverage PR Comment
62+
uses: marocchino/sticky-pull-request-comment@v2
63+
if: github.event_name == 'pull_request'
64+
with:
65+
recreate: true
66+
path: code-coverage-results.md

.github/workflows/test-results.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test Report
2+
3+
permissions:
4+
checks: write
5+
pull-requests: write
6+
7+
on:
8+
workflow_call:
9+
10+
jobs:
11+
test_report:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: Download Results for Matlab R2022b
17+
uses: actions/download-artifact@v4
18+
with:
19+
name: test-results-matlab-R2022b
20+
path: test-results/matlab-R2022b
21+
22+
- name: Download Results for Matlab Latest
23+
uses: actions/download-artifact@v4
24+
with:
25+
name: test-results-matlab-latest
26+
path: test-results/matlab-latest
27+
28+
- name: Download Results for Octave
29+
uses: actions/download-artifact@v4
30+
with:
31+
name: test-results-octave
32+
path: test-results/octave
33+
34+
- name: Publish Test Results
35+
uses: EnricoMi/publish-unit-test-result-action@v2
36+
with:
37+
files: |
38+
test-results/*/testresults.xml
39+
40+

.github/workflows/tests.yml

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,52 @@
11
# This is a basic workflow to help you get started with Actions
22
name: Tests
3+
4+
permissions:
5+
checks: write
6+
pull-requests: write
7+
actions: read
8+
contents: read
9+
310
# Controls when the action will run.
411
on: [push, pull_request, workflow_dispatch]
512
jobs:
613
test-matlab-stable: #Matlab test Job for supported Release
714
runs-on: ubuntu-latest
815
steps:
9-
- uses: actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
10-
# Install MATLAB
11-
- name: Install MATLAB
12-
uses: matlab-actions/setup-matlab@v1
16+
- uses: actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
1317
with:
14-
release: R2022b
15-
# Runs test command
16-
- name: Run Tests
17-
uses: matlab-actions/run-command@v1
18+
submodules: 'true'
19+
- name: Run Test
20+
uses: ./.github/actions/test-matlab
1821
with:
19-
command: cd unitTest; matRad_runTests
22+
matlab-version: R2022b
23+
2024
test-matlab-latest: #Matlab test Job for latest Matlab release
2125
runs-on: ubuntu-latest
2226
steps:
23-
- uses: actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
24-
# Install MATLAB
25-
- name: Install MATLAB
26-
uses: matlab-actions/setup-matlab@v1
27+
- uses: actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
2728
with:
28-
release: latest
29-
# Runs test command
30-
- name: Run Tests
31-
uses: matlab-actions/run-command@v1
29+
submodules: 'true'
30+
- uses: ./.github/actions/test-matlab
3231
with:
33-
command: cd unitTest; matRad_runTests
32+
matlab-version: latest
33+
3434
test-octave-6: #Octave test Job
3535
runs-on: ubuntu-22.04 # We use Ubuntu-22.04 because it has Octave 6.4
3636
steps:
37-
- uses: actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
38-
- name: Install OCTAVE
39-
run: |
40-
sudo apt update
41-
sudo apt-get install -y gdb gfortran fonts-freefont-otf gnuplot-x11 libgdcm-dev octave liboctave-dev
42-
- name: Prepare Test Environment
43-
run: |
44-
sudo chmod +x .github/before_install_linux.sh
45-
sudo .github/before_install_linux.sh
46-
- name: Run Tests
47-
run: xvfb-run -a .github/runtests.sh octave-cli
48-
# uses: GabrielBB/xvfb-action@v1 #For Headless tests
49-
# with:
50-
# run: .github/runtests.sh octave-cli
51-
- name: Upload logs if test fails
52-
uses: actions/upload-artifact@v3
53-
if: failure()
37+
- uses: actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
5438
with:
55-
name: Test Log
56-
path: runtests.log
57-
39+
submodules: 'true'
40+
- uses: ./.github/actions/test-octave
41+
42+
test-report:
43+
name: Collect Test Results
44+
needs: [test-matlab-stable, test-matlab-latest, test-octave-6]
45+
uses: ./.github/workflows/test-results.yml
46+
secrets: inherit
47+
48+
coverage-report:
49+
name: Collect Coverage Report
50+
needs: [test-matlab-stable]
51+
uses: ./.github/workflows/coverage-report.yml
52+
secrets: inherit

0 commit comments

Comments
 (0)