Skip to content

Commit b531a6b

Browse files
committed
merge
2 parents fbc46e0 + 2f95232 commit b531a6b

96 files changed

Lines changed: 3812 additions & 1154 deletions

File tree

Some content is hidden

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

.black

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.black]
22
line-length = 200
3-
target-version = ['py37', 'py38', 'py39', 'py310']
3+
target-version = ['py310', 'py311', 'py312', 'py313', 'py314']
44
force-exclude = '''
55
(
66
/(

.github/workflows/build_docs.yml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,63 @@
11
name: Build Guides
22
env:
3-
IBCDFO_PKG: ${{ github.workspace }}/ibcdfo_pypkg
4-
PY_VENV: ${{ github.workspace }}/ibcdfo_venv
5-
DOCS_PATH: ${{ github.workspace }}/docs
3+
GH_ACTIONS_PATH: ${{ github.workspace }}/.github/workflows
4+
IBCDFO_PKG: ${{ github.workspace }}/ibcdfo_pypkg
5+
DOCS_PATH: ${{ github.workspace }}/docs
66
on:
77
push:
88
branches: [main]
99
pull_request:
1010
branches: [main]
1111

1212
jobs:
13+
# Get user/group of runner account so that subsequent jobs can run containers
14+
# using that account rather than root. Based on discussions in:
15+
# https://github.com/actions/runner/issues/691
16+
configure:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
uid_gid: ${{ steps.get_user.outputs.uid_gid }}
20+
steps:
21+
- id: get_user
22+
run: |
23+
MY_UID=$(id -u)
24+
MY_GID=$(id -g)
25+
echo "User = $(id -u -n) ($MY_UID)"
26+
echo "Group = $(id -g -n) ($MY_GID)"
27+
echo "uid_gid=$MY_UID:$MY_GID" >> "$GITHUB_OUTPUT"
28+
1329
# Prefer using the latest Python version supported by the package
1430
build_sphinx:
1531
# Prefer LaTeX installation by official image over manual installation to
1632
# get more consistent and quick setup times.
1733
runs-on: ubuntu-latest
34+
needs: configure
35+
env:
36+
UID_GID: ${{ needs.configure.outputs.uid_gid }}
1837
container:
1938
image: texlive/texlive:latest
39+
options: --user ${{ needs.configure.outputs.uid_gid }}
2040
steps:
2141
##-- General Setup Steps
22-
# Submodule contents are not used to build User or Developer Guides
2342
- name: Checkout IBCDFO repository
24-
uses: actions/checkout@v4
25-
with:
26-
submodules: false
43+
uses: actions/checkout@v6
2744
- name: Set up Python
28-
uses: actions/setup-python@v5
45+
uses: actions/setup-python@v6
2946
with:
3047
python-version: 3.14
3148
- name: Setup Python with tox
3249
run: |
33-
# As a consequence of using a container, we need to setup Python cleanly
34-
# in dedicated venv to avoid breaking default Python installation.
35-
python -m venv $PY_VENV
36-
. $PY_VENV/bin/activate
37-
python -m pip install --upgrade pip
38-
python -m pip install tox
50+
echo "UID/GID from configure = $UID_GID"
51+
echo "UID/GID actual = $(id -u):$(id -g)"
52+
$GH_ACTIONS_PATH/setup_tox_github_action.sh ${{ runner.os }}
3953
- name: Build Sphinx docs
4054
run: |
41-
. $PY_VENV/bin/activate
42-
pip list
43-
which tox
55+
# TODO: Local PDF builds failing at present (Issue 243).
4456
cd $IBCDFO_PKG
45-
# TODO: Local PDF builds failing at present.
4657
tox -r -e html
4758
4859
- name: Archive IBCDFO docs
49-
uses: actions/upload-artifact@v4
60+
uses: actions/upload-artifact@v6
5061
with:
5162
name: ibcdfo-sphinx-docs
5263
path: |

.github/workflows/check_matlab_standards.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
# -- General Setup Steps
18-
# No need to check standards in submodules
1918
- name: Checkout IBCDFO repository
20-
uses: actions/checkout@v4
21-
with:
22-
submodules: false
19+
uses: actions/checkout@v6
2320
- name: Set up Python
24-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2522
with:
2623
python-version: "3.14"
2724
- name: Install dependencies

.github/workflows/check_python_standards.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
# -- General Setup Steps
17-
# No need to check standards in submodules
1817
- name: Checkout IBCDFO repository
19-
uses: actions/checkout@v4
20-
with:
21-
submodules: false
18+
uses: actions/checkout@v6
2219
- name: Set up Python
23-
uses: actions/setup-python@v5
20+
uses: actions/setup-python@v6
2421
with:
2522
python-version: "3.14"
2623
- name: Setup Python with tox

.github/workflows/check_spelling.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@ on:
1212

1313
jobs:
1414
spelling:
15-
# No need to spell check submodules
1615
name: Spell Check with Typos
1716
runs-on: ubuntu-latest
1817
steps:
1918
- name: Checkout IBCDFO repository
20-
uses: actions/checkout@v4
21-
with:
22-
submodules: false
19+
uses: actions/checkout@v6
2320
- name: Spell Check Repo
24-
uses: crate-ci/typos@v1.38.1
21+
uses: crate-ci/typos@v1.44.0
2522
with:
2623
config: ${{ env.TYPOS_CFG }}

.github/workflows/measure_coverage.yml

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ name: Measure Code Coverage
22
env:
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
@@ -23,24 +26,47 @@ on:
2326
branches: [main]
2427

2528
jobs:
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
@@ -61,7 +87,7 @@ jobs:
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

Comments
 (0)