@@ -2,13 +2,16 @@ name: Measure Code Coverage
22env :
33 CLONE_PATH : ${{ github.workspace }}
44 GH_ACTIONS_PATH : ${{ github.workspace }}/.github/workflows
5+ MINQ_COMMIT_FILE : ${{ github.workspace }}/REQUIRED_MINQ_COMMIT
56 IBCDFO_PKG : ${{ github.workspace }}/ibcdfo_pypkg
7+ MINQ5_M_PATH : ${{ github.workspace }}/MINQ/m/minq5
8+ MINQ8_M_PATH : ${{ github.workspace }}/MINQ/m/minq8
69 BENDFO_M_PATH : ${{ github.workspace }}/BenDFO/m
710 BENDFO_DATA_PATH : ${{ github.workspace }}/BenDFO/data
811 POUNDERS_M_PATH : ${{ github.workspace }}/pounders/m
912 MSAMP_M_PATH : ${{ github.workspace }}/manifold_sampling/m
1013 BENDFO_PY_PATH : ${{ github.workspace }}/BenDFO/py
11- MINQ5_PY_PATH : ${{ github.workspace }}/minq /py/minq5
14+ MINQ5_PY_PATH : ${{ github.workspace }}/MINQ /py/minq5
1215 PY_COV_FILE : coverage_ibcdfo
1316 PY_COV_XML_FILE : cobertura_ibcdfo_py.xml
1417 PY_COV_HTML_FILE : htmlcov_ibcdfo_py
2326 branches : [main]
2427
2528jobs :
29+ # ----- LOAD OFFICIAL MINQ COMMIT INFO FOR PROPER SETUP FOR IBCDFO
30+ # Load this eagerly so that it is available for immediate use in all
31+ # subsequent jobs.
32+ load_minq_sha :
33+ outputs :
34+ minq_sha : ${{ steps.load_sha.outputs.minq_sha }}
35+ runs-on : ubuntu-latest
36+ steps :
37+ - name : Checkout IBCDFO repository
38+ uses : actions/checkout@v6
39+ - name : Load Official MINQ SHA
40+ id : load_sha
41+ run : |
42+ MINQ_SHA=$(cat $MINQ_COMMIT_FILE)
43+ echo "The valid MINQ commit hash is $MINQ_SHA"
44+ echo "minq_sha=$MINQ_SHA" >> "$GITHUB_OUTPUT"
45+
2646 # ----- MEASURE COVERAGE ACROSS ALL PYTHON PACKAGES
2747 # Prefer using the latest Python version supported by the package
2848 coverage_py :
2949 runs-on : ubuntu-latest
50+ needs : load_minq_sha
51+ env :
52+ MINQ_SHA : ${{ needs.load_minq_sha.outputs.minq_sha }}
3053 steps :
3154 # -- General Setup Steps
32- # This action requires minq
3355 - name : Checkout IBCDFO repository
34- uses : actions/checkout@v4
56+ uses : actions/checkout@v6
57+ - name : Checkout MINQ repository
58+ uses : actions/checkout@v6
3559 with :
36- submodules : recursive
60+ repository : POptUS/MINQ
61+ path : MINQ
62+ ref : ${{ env.MINQ_SHA }}
3763 - name : Checkout BenDFO repository
38- uses : actions/checkout@v4
64+ uses : actions/checkout@v6
3965 with :
4066 repository : POptUS/BenDFO
4167 path : BenDFO
4268 - name : Set up Python
43- uses : actions/setup-python@v5
69+ uses : actions/setup-python@v6
4470 with :
4571 python-version : " 3.14"
4672 - name : Setup Python with tox
6187
6288 # -- Publish as artifact for users and subsequent jobs
6389 - name : Archive Python coverage results
64- uses : actions/upload-artifact@v4
90+ uses : actions/upload-artifact@v6
6591 with :
6692 name : python-coverage-results
6793 path : |
@@ -73,29 +99,38 @@ jobs:
7399 # Prefer using the latest MATLAB version available
74100 coverage_m :
75101 runs-on : ubuntu-latest
102+ needs : load_minq_sha
103+ env :
104+ MINQ_SHA : ${{ needs.load_minq_sha.outputs.minq_sha }}
76105 steps :
77106 # -- General Setup Steps
78107 - name : Checkout IBCDFO repository
79- uses : actions/checkout@v4
108+ uses : actions/checkout@v6
109+ - name : Checkout MINQ repository
110+ uses : actions/checkout@v6
80111 with :
81- submodules : recursive
112+ repository : POptUS/MINQ
113+ path : MINQ
114+ ref : ${{ env.MINQ_SHA }}
82115 - name : Checkout BenDFO repository
83- uses : actions/checkout@v4
116+ uses : actions/checkout@v6
84117 with :
85118 repository : POptUS/BenDFO
86119 path : BenDFO
87120 - name : Set up MATLAB
88- uses : matlab-actions/setup-matlab@v2
121+ uses : matlab-actions/setup-matlab@v3
89122 with :
90123 release : " latest"
91124 products : Optimization_Toolbox
92125
93126 # -- Test Execution Step
94127 # This requires R2023b or higher
95128 - name : Generate code coverage report for MATLAB code
96- uses : matlab-actions/run-command@v2
129+ uses : matlab-actions/run-command@v3
97130 with :
98131 command : >
132+ addpath("${{ env.MINQ5_M_PATH }}"),
133+ addpath("${{ env.MINQ8_M_PATH }}"),
99134 addpath("${{ env.BENDFO_M_PATH }}"),
100135 addpath("${{ env.BENDFO_DATA_PATH }}"),
101136 cd ${{ env.POUNDERS_M_PATH }},
@@ -112,7 +147,7 @@ jobs:
112147
113148 # -- Publish as artifact for users and subsequent jobs
114149 - name : Archive MATLAB coverage results
115- uses : actions/upload-artifact@v4
150+ uses : actions/upload-artifact@v6
116151 with :
117152 name : matlab-coverage-results
118153 path : |
@@ -127,18 +162,16 @@ jobs:
127162 runs-on : ubuntu-latest
128163 steps :
129164 - name : Checkout IBCDFO repository
130- uses : actions/checkout@v4
131- with :
132- submodules : false
165+ uses : actions/checkout@v6
133166
134167 - name : Access Python coverage reports
135- uses : actions/download-artifact@v4
168+ uses : actions/download-artifact@v8
136169 with :
137170 name : python-coverage-results
138171 path : ${{ env.CLONE_PATH }}
139172
140173 - name : Access MATLAB coverage reports
141- uses : actions/download-artifact@v4
174+ uses : actions/download-artifact@v8
142175 with :
143176 name : matlab-coverage-results
144177 path : ${{ env.CLONE_PATH }}
@@ -151,4 +184,6 @@ jobs:
151184 ${{ env.CLONE_PATH }}/${{ env.POUNDERS_M_COV_XML_FILE }},
152185 ${{ env.CLONE_PATH }}/${{ env.MSAMP_M_COV_XML_FILE }},
153186 ${{ env.CLONE_PATH }}/${{ env.PY_COV_XML_FILE }}
187+ disable_search : true
188+ verbose : true
154189 fail_ci_if_error : true
0 commit comments