Skip to content

Commit 6f32bef

Browse files
authored
Merge branch 'develop' into strsv/ndarray
2 parents 6119f50 + 82b98d8 commit 6f32bef

6,468 files changed

Lines changed: 476780 additions & 21226 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.

.devcontainer/post-create

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,31 @@
1818

1919
# Script to set up a development environment.
2020

21-
make install
22-
make init
21+
arch="$(uname -m)"
2322

2423
sudo apt-get update
25-
sudo apt-get install -y gfortran
24+
25+
# On ARM64, pin gcc/g++/gfortran to version 12 to avoid a GCC 16 and binutils version mismatch:
26+
if [ "${arch}" = "aarch64" ]; then
27+
sudo apt-get install -y gfortran-12
28+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
29+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
30+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 100
31+
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-12 100
32+
else
33+
sudo apt-get install -y gfortran
34+
fi
35+
36+
make install
37+
make init
2638

2739
make install-deps-r
40+
41+
# On ARM64, replace the wrong-architecture shellcheck binary with the correct one:
42+
if [ "${arch}" = "aarch64" ]; then
43+
sc_version="$(shellcheck --version 2>/dev/null | grep '^version:' | awk '{print $2}')"
44+
if [ -n "${sc_version}" ]; then
45+
curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${sc_version}/shellcheck-v${sc_version}.linux.aarch64.tar.xz" \
46+
| sudo tar xJ --strip-components=1 -C /usr/local/bin "shellcheck-v${sc_version}/shellcheck"
47+
fi
48+
fi

.github/workflows/generate_pr_commit_message.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ name: generate_pr_commit_message
2121

2222
# Workflow triggers:
2323
on:
24-
pull_request_target:
25-
types:
26-
- labeled
24+
workflow_dispatch:
25+
26+
# pull_request_target:
27+
# types:
28+
# - labeled
2729

2830
# Global permissions:
2931
permissions:

.github/workflows/lint_changed_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ jobs:
305305
- name: 'Setup R'
306306
if: ( success() || failure() ) && steps.check-r-files.outputs.files != ''
307307
# Pin action to full length commit SHA
308-
uses: r-lib/actions/setup-r@a51a8012b0aab7c32ef9d19bf54da93f3254335e # v2.12.0
308+
uses: r-lib/actions/setup-r@d3c5be51b12e724e68f33216ca3c148b66d5f0b6 # v2.12.1
309309
with:
310310
r-version: '4.3.3'
311311

.github/workflows/lint_random_files.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,21 @@ jobs:
113113
node-version: '20' # 'lts/*'
114114
timeout-minutes: 5
115115

116+
# Restore cache if up-to-date:
117+
- name: 'Restore cache if up-to-date'
118+
# Pin action to full length commit SHA
119+
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
120+
id: cache
121+
with:
122+
path: |
123+
${{ github.workspace }}/node_modules
124+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
125+
restore-keys: |
126+
${{ runner.os }}-node-
127+
116128
# Install dependencies (accounting for possible network failures, etc, when installing node module dependencies):
117129
- name: 'Install dependencies'
130+
if: steps.cache.outputs.cache-hit != 'true'
118131
run: |
119132
make install-node-modules || make install-node-modules || make install-node-modules
120133
timeout-minutes: 15
@@ -206,17 +219,34 @@ jobs:
206219
id: lint-editorconfig
207220
env:
208221
FILES: ${{ steps.random-files.outputs.files }}
222+
223+
# Provide a token so that the editorconfig-checker binary download is authenticated, thus avoiding rate limiting:
224+
GITHUB_TOKEN: ${{ github.token }}
209225
run: |
210226
set -o pipefail
211227
files=$(echo "$FILES" | tr ',' ' ')
212228
make lint-editorconfig-files FILES="${files}" 2>&1 | tee lint_editorconfig_errors.txt
213229
230+
# Save cache after editorconfig-checker binary has been downloaded:
231+
- name: 'Save cache after editorconfig-checker binary has been downloaded'
232+
if: always() && steps.cache.outputs.cache-hit != 'true'
233+
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
234+
with:
235+
path: ${{ github.workspace }}/node_modules
236+
key: ${{ steps.cache.outputs.cache-primary-key }}
237+
214238
# Create sub-issue for EditorConfig lint failures:
215239
- name: 'Create sub-issue for EditorConfig lint failures'
216240
if: failure() && contains(steps.lint-editorconfig.outcome, 'failure')
217241
env:
218242
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
219243
run: |
244+
# Guard against creating spurious issues when the lint step failed due to an infrastructure error (e.g., failing to download the editorconfig-checker binary due to rate limiting) rather than actual lint errors:
245+
if grep -q 'Failed to download binary' lint_editorconfig_errors.txt 2>/dev/null; then
246+
echo 'EditorConfig lint step failed due to an infrastructure error (e.g., failed binary download). Skipping issue creation.'
247+
exit 0
248+
fi
249+
220250
strip_ansi() {
221251
sed -r 's/\x1B\[[0-9;]*[mK]//g'
222252
}
@@ -406,7 +436,7 @@ jobs:
406436
- name: 'Setup R'
407437
if: ( github.event.inputs.r != 'false' ) && ( success() || failure() )
408438
# Pin action to full length commit SHA
409-
uses: r-lib/actions/setup-r@a51a8012b0aab7c32ef9d19bf54da93f3254335e # v2.12.0
439+
uses: r-lib/actions/setup-r@d3c5be51b12e724e68f33216ca3c148b66d5f0b6 # v2.12.1
410440
with:
411441
r-version: '4.3.3'
412442

.github/workflows/markdown_equations.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ jobs:
5959
# Specify whether to remove untracked files before checking out the repository:
6060
clean: true
6161

62-
# Limit clone depth to the most recent 100 commits:
63-
fetch-depth: 100
62+
# Fetch full history to find when SVGs were last modified:
63+
fetch-depth: 0
64+
65+
# Use a blobless clone to speed up the checkout:
66+
filter: blob:none
6467

6568
# Specify whether to download Git-LFS files:
6669
lfs: false
@@ -171,7 +174,7 @@ jobs:
171174
git commit -m "docs: update Markdown equation elements"
172175
echo "changed=true" >> $GITHUB_OUTPUT
173176
fi
174-
timeout-minutes: 15
177+
timeout-minutes: 60
175178

176179
# Delete remote PR branch to ensure a clean push when the branch has diverged:
177180
- name: 'Delete remote PR branch'

.github/workflows/markdown_links.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,22 @@ jobs:
119119

120120
# Check whether links are included in `docs/links/database.json` and use the correct identifier:
121121
- name: 'Check links against database'
122-
env:
123-
ALL_LINKS: ${{ steps.results.outputs.all_links }}
124122
run: |
125123
# Determine root directory:
126124
root=$(git rev-parse --show-toplevel)
127125
128126
# Define the path to a utility for validating links:
129127
validate="${root}/lib/node_modules/@stdlib/_tools/links/validate/bin/cli"
130128
129+
# Write the discovered links to a file, as the list may be too large to pass via an environment variable:
130+
all_links_file="${RUNNER_TEMP}/all_links.json"
131+
cat > "${all_links_file}" <<'STDLIB_ALL_LINKS_EOF'
132+
${{ steps.results.outputs.all_links }}
133+
STDLIB_ALL_LINKS_EOF
134+
131135
echo "## Link Validation" >> $GITHUB_STEP_SUMMARY
132136
133-
output=$(echo "$ALL_LINKS" | ${validate})
137+
output=$(${validate} < "${all_links_file}")
134138
if [[ "${output}" != "All links are valid." ]]; then
135139
echo "| URL | ID | Error |" >> $GITHUB_STEP_SUMMARY
136140
echo "| --- | -- | ----- |" >> $GITHUB_STEP_SUMMARY
@@ -144,12 +148,13 @@ jobs:
144148
145149
# Log the results:
146150
- name: 'Log results'
147-
env:
148-
FAILURES: ${{ steps.results.outputs.failures }}
149-
WARNINGS: ${{ steps.results.outputs.warnings }}
150151
run: |
151-
echo "$FAILURES" >> "${{ env.LOG_FILE_FAILURES }}"
152-
echo "$WARNINGS" >> "${{ env.LOG_FILE_WARNINGS }}"
152+
cat >> "${{ env.LOG_FILE_FAILURES }}" <<'STDLIB_FAILURES_EOF'
153+
${{ steps.results.outputs.failures }}
154+
STDLIB_FAILURES_EOF
155+
cat >> "${{ env.LOG_FILE_WARNINGS }}" <<'STDLIB_WARNINGS_EOF'
156+
${{ steps.results.outputs.warnings }}
157+
STDLIB_WARNINGS_EOF
153158
timeout-minutes: 2
154159

155160
# Fail the workflow if the status is not "success":
@@ -172,10 +177,15 @@ jobs:
172177
if: failure() && contains(steps.check-status.outcome, 'failure')
173178
env:
174179
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
175-
FAILURES: ${{ steps.results.outputs.failures }}
176180
run: |
181+
# Write the failures list to a file, as it may be too large to pass via an environment variable or command-line argument:
182+
failures_file="${RUNNER_TEMP}/failures.json"
183+
cat > "${failures_file}" <<'STDLIB_FAILURES_EOF'
184+
${{ steps.results.outputs.failures }}
185+
STDLIB_FAILURES_EOF
186+
177187
"$GITHUB_WORKSPACE/.github/workflows/scripts/markdown_links/create_broken_link_issues" \
178-
"$FAILURES" \
188+
"${failures_file}" \
179189
"9112"
180190
timeout-minutes: 30
181191

.github/workflows/markdown_src_attributes.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,18 @@ jobs:
9797

9898
# Log the results:
9999
- name: 'Log results'
100-
env:
101-
FAILURES: ${{ steps.results.outputs.failures }}
102-
WARNINGS: ${{ steps.results.outputs.warnings }}
103100
run: |
104-
echo "$FAILURES" >> "${{ env.LOG_FILE_FAILURES }}"
105-
echo "$WARNINGS" >> "${{ env.LOG_FILE_WARNINGS }}"
101+
cat >> "${{ env.LOG_FILE_FAILURES }}" <<'STDLIB_FAILURES_EOF'
102+
${{ steps.results.outputs.failures }}
103+
STDLIB_FAILURES_EOF
104+
cat >> "${{ env.LOG_FILE_WARNINGS }}" <<'STDLIB_WARNINGS_EOF'
105+
${{ steps.results.outputs.warnings }}
106+
STDLIB_WARNINGS_EOF
106107
timeout-minutes: 2
107108

108109
# Fail the workflow if the status is not "success":
109110
- name: 'Check status'
110-
if: ${{ steps.results.outputs.status }} != 'success'
111+
if: ${{ steps.results.outputs.status != 'success' }}
111112
run: |
112113
exit 1
113114

.github/workflows/random_benchmarks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ jobs:
8888
make benchmark-random-javascript RANDOM_SELECTION_SIZE=50 BUILD_ADDONS=1
8989
timeout-minutes: 60
9090

91+
# Install Cephes dependencies (required by C benchmarks which compare against the Cephes math library; accounting for possible network failures when downloading):
92+
- name: 'Install Cephes dependencies'
93+
run: |
94+
make install-deps-cephes || make install-deps-cephes || make install-deps-cephes
95+
timeout-minutes: 15
96+
9197
# Run C benchmarks:
9298
- name: 'Run C benchmarks'
9399
run: |

.github/workflows/run_affected_benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
132132
fi
133133
fi
134-
directories=$(for file in $files; do dirname $file; done | uniq | tr '\n' ' ' | sed 's/ $//')
134+
directories=$(for file in $files; do dirname $file; done | sort -u | tr '\n' ' ' | sed 's/ $//')
135135
echo "directories=${directories}" >> $GITHUB_OUTPUT
136136
137137
# Get list of changed directories from workflow dispatch event:

.github/workflows/run_affected_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
164164
fi
165165
fi
166-
directories=$(for file in $files; do dirname $file; done | uniq | tr '\n' ' ' | sed 's/ $//')
166+
directories=$(for file in $files; do dirname $file; done | sort -u | tr '\n' ' ' | sed 's/ $//')
167167
echo "directories=${directories}" >> $GITHUB_OUTPUT
168168
169169
# Get list of changed directories from workflow dispatch event:

0 commit comments

Comments
 (0)