diff --git a/.github/workflows/CI_ReSim_trigger.yml b/.github/workflows/CI_ReSim_trigger.yml new file mode 100644 index 0000000000..f6fdfc7c58 --- /dev/null +++ b/.github/workflows/CI_ReSim_trigger.yml @@ -0,0 +1,18 @@ +name: CI ReSim Trigger + +on: + pull_request: + workflow_dispatch: + +env: + EVENT_NUMBER: ${{ github.event.number }} + PR_SHA: ${{ github.event.pull_request.base.sha }} + +jobs: + get PR data: + runs-on: ubuntu-latest + steps: + - name: print vars + run: + echo "Event Number: ${{ github.env.EVENT_NUMBER }}" + echo "PR Base Hash: ${{ github.env.PR_SHA }}" \ No newline at end of file diff --git a/.github/workflows/PRTesting.yml b/.github/workflows/PRTesting.yml new file mode 100644 index 0000000000..fd0992bc3e --- /dev/null +++ b/.github/workflows/PRTesting.yml @@ -0,0 +1,47 @@ +name: CI ReSim +on: + workflow_run: + workflows: ["Trigger CI ReSim"] + types: + - completed + +env: + PR_SERVER: ${{ vars.LTX_PR_SERVER }} + TESTING_TOOLS: ${{ vars.LTX_TESTING_TOOLS }} + EVENT_NUMBER: ${{ github.event.workflow_run.env.EVENT_NUMBER }} + PR_SHA: ${{ github.event.workflow_run.env.PR_SHA }} +jobs: + prepare: + runs-on: [ self-hosted, Linux, regression_testing ] + steps: + - uses: actions/checkout@v6 + with: + sparse-checkout: './.CI/ReSim' + + - name: Checkout code in docker + run: ./.CI/ReSim/prepare_pr.sh ${{ github.env.EVENT_NUMBER }} + + testrun_modelica: + needs: prepare + runs-on: [ self-hosted, Linux, regression_testing ] + #environment: + # name: Report modelica + # url: $PR_SERVER/${{ github.env.EVENT_NUMBER }}/Modelica/report/PR_comparison_report.html + steps: + - name: print envs + run: echo "TESTING_TOOLS=$TESTING_TOOLS" + env: + TESTING_TOOLS: ${{ vars.LTX_TESTING_TOOLS }} + - name: Run tests modelica + run: ./.CI/ReSim/run_pr.sh ${{ github.env.EVENT_NUMBER }} ${{ github.env.PR_SHA }} Modelica ${{ github.env.TESTING_TOOLS }} + + + testrun_modelicatest: + needs: prepare + runs-on: [ self-hosted, Linux, regression_testing ] + #environment: + # name: Report modelicatest + # url: $PR_SERVER/${{ github.env.EVENT_NUMBER }}/ModelicaTest/report/PR_comparison_report.html + steps: + - name: Run tests modelicatest + run: ./.CI/ReSim/run_pr.sh ${{ github.env.EVENT_NUMBER }} ${{ github.env.PR_SHA }} ModelicaTest ${{ github.env.TESTING_TOOLS }} \ No newline at end of file diff --git a/Modelica/Blocks/Continuous.mo b/Modelica/Blocks/Continuous.mo index bd3b79f9f1..fc168e718a 100644 --- a/Modelica/Blocks/Continuous.mo +++ b/Modelica/Blocks/Continuous.mo @@ -765,7 +765,7 @@ to compute u by an algebraic equation. "Control error (set point - measurement)"; parameter .Modelica.Blocks.Types.SimpleController controllerType= .Modelica.Blocks.Types.SimpleController.PID "Type of controller"; - parameter Real k = 1 "Gain of controller, must be non-zero"; + parameter Real k=1 "Gain of controller, must be non-zero"; parameter SI.Time Ti(min=Modelica.Constants.small)=0.5 "Time constant of Integrator block" annotation (Dialog(enable= controllerType == .Modelica.Blocks.Types.SimpleController.PI or diff --git a/Modelica/Blocks/Sources.mo b/Modelica/Blocks/Sources.mo index 8fbd5f270a..718977bebb 100644 --- a/Modelica/Blocks/Sources.mo +++ b/Modelica/Blocks/Sources.mo @@ -1595,16 +1595,16 @@ parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4]; parameter Real table[:, :] = fill(0.0, 0, 2) "Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])" annotation (Dialog(group="Table data definition",enable=not tableOnFile)); - parameter String tableName="NoName" + parameter String tableName = "NoName" "Table name on file or in function usertab (see docu)" annotation (Dialog(group="Table data definition",enable=tableOnFile)); - parameter String fileName="NoName" "File where matrix is stored" + parameter String fileName = "NoName" "File where matrix is stored" annotation (Dialog( group="Table data definition", enable=tableOnFile, loadSelector(filter="Text files (*.txt);;MATLAB MAT-files (*.mat);;Comma-separated values files (*.csv)", caption="Open file in which table is present"))); - parameter String delimiter="," "Column delimiter character for CSV file" + parameter String delimiter = "," "Column delimiter character for CSV file" annotation (Dialog( group="Table data definition", enable=tableOnFile and isCsvExt), @@ -1618,10 +1618,10 @@ parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4]; "Columns of table to be interpolated" annotation (Dialog(group="Table data interpretation", groupImage="modelica://Modelica/Resources/Images/Blocks/Sources/CombiTimeTable.png")); - parameter Modelica.Blocks.Types.Smoothness smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments + parameter Modelica.Blocks.Types.Smoothness smoothness = Modelica.Blocks.Types.Smoothness.LinearSegments "Smoothness of table interpolation" annotation (Dialog(group="Table data interpretation")); - parameter Modelica.Blocks.Types.Extrapolation extrapolation=Modelica.Blocks.Types.Extrapolation.LastTwoPoints + parameter Modelica.Blocks.Types.Extrapolation extrapolation = Modelica.Blocks.Types.Extrapolation.LastTwoPoints "Extrapolation of data outside the definition range" annotation (Dialog(group="Table data interpretation")); parameter SI.Time timeScale( @@ -1635,7 +1635,7 @@ parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4]; parameter SI.Time shiftTime=startTime "Shift time of first table column" annotation (Dialog(group="Table data interpretation")); - parameter Modelica.Blocks.Types.TimeEvents timeEvents=Modelica.Blocks.Types.TimeEvents.Always + parameter Modelica.Blocks.Types.TimeEvents timeEvents = Modelica.Blocks.Types.TimeEvents.Always "Time event handling of table interpolation" annotation (Dialog(group="Table data interpretation", enable=smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments)); parameter Boolean verboseExtrapolation=false @@ -1650,7 +1650,7 @@ parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4]; final parameter Real t_maxScaled=Internal.getTimeTableTmax(tableID) "Maximum (scaled) abscissa value defined in table"; protected - final parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset[1] else offset) + final parameter Real p_offset[nout] = (if size(offset, 1) == 1 then ones(nout)*offset[1] else offset) "Offsets of output signals"; parameter Modelica.Blocks.Types.ExternalCombiTimeTable tableID= Modelica.Blocks.Types.ExternalCombiTimeTable(