Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/refresh-mex-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,20 @@ jobs:
steps:
- uses: actions/checkout@v6

# Download ALL artifacts into the workspace; merge-multiple preserves
# the repo-relative paths each artifact was uploaded with, dropping
# them back into libs/.../{,octave-<tag>/}.
# Download ALL artifacts and overlay them onto libs/.
# IMPORTANT: actions/upload-artifact trims the least-common-ancestor of
# the supplied paths, so each artifact's internal root is `FastSense/`
# (or `SensorThreshold/`) — NOT `libs/FastSense/`. We MUST set
# `path: libs` here so merge-multiple extracts under libs/, not the
# workspace root. Without `path: libs`, files land at workspace
# `FastSense/.../*.mex*`, the aggregator's `find libs` step sees
# nothing new, create-pull-request finds no diff, and the auto-PR
# silently fails to open.
- uses: actions/download-artifact@v8
with:
pattern: mex-*
merge-multiple: true
path: libs

- name: Regenerate .mex-version stamp
shell: bash
Expand Down
18 changes: 15 additions & 3 deletions install.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,24 @@
% NOT yet on path (e.g., when __probe_needs_build__ is called after a
% fresh addpath in the shim but before the candidates loop would run).
octTag = get_octave_platform_tag();
isOctave = exist('OCTAVE_VERSION', 'builtin');
probes = {
fullfile(mex_dir, ['binary_search_mex.' mexext()])
fullfile(mex_dir, 'binary_search_mex.mex')
};
if ~isempty(octTag)
probes{end+1} = fullfile(mex_dir, ['octave-' octTag], 'binary_search_mex.mex');
if isOctave
% On Octave, mexext() may be 'mex' already (covered by probe 1
% above) but legacy installs may also have a bare .mex file —
% keep that as a fallback. On MATLAB this probe is dangerous:
% stale Octave .mex files from before the octave-<tag>/ subdir
% convention sit alongside platform-specific binaries and
% falsely satisfy the "MEX present" check, causing
% FASTSENSE_SKIP_BUILD-like behaviour and an empty release
% artifact on platforms with no committed binary (e.g.
% Windows MATLAB).
probes{end+1} = fullfile(mex_dir, 'binary_search_mex.mex');
if ~isempty(octTag)
probes{end+1} = fullfile(mex_dir, ['octave-' octTag], 'binary_search_mex.mex');
end
end
core_ok = false;
for pi = 1:numel(probes)
Expand Down
Loading