Skip to content

add lib dir to dynamic linker path on macos#6

Merged
Kazutaka333 merged 7 commits into
mainfrom
kaz/fix-mac-bug
May 11, 2026
Merged

add lib dir to dynamic linker path on macos#6
Kazutaka333 merged 7 commits into
mainfrom
kaz/fix-mac-bug

Conversation

@Kazutaka333

@Kazutaka333 Kazutaka333 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

closing qunasys/quri-sdk-issues#626

This PR fixes macos bug and CI instability .

Issue

  • dynamic linker path needed to be added
  • CI imported qret_cli_bundle, which triggers GitHub release API/download requests.
  • In GitHub Actions, repeated unauthenticated requests could hit rate limits and fail CI.
  • On Windows, GRIDSYNTH_PATH was only set when bundle/bin/gridsynth existed, but the bundled executable may be named gridsynth.exe or gridsynth.cmd.

Fix

  • Pass GITHUB_TOKEN into the pytest workflow and use it when available for GitHub release API/download requests.
    • This is only to avoid CI rate limits; local environments still work without a token via unauthenticated requests.
  • Detect gridsynth, gridsynth.exe, or gridsynth.cmd when setting GRIDSYNTH_PATH, so Windows CI resolves the bundled executable correctly.

@Kazutaka333 Kazutaka333 changed the title add lib dir for dynamic linker on macos add lib dir to dynamic linker path on macos Apr 9, 2026
with:
python-version: "3.11"

- name: Install package and test deps

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out Install package and test deps and Prepare qret stub for test (Unix) to check tool download.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo: debug用に残しとく

Comment thread qret_cli_bundle/__init__.py Outdated

elif platform.system() == "Darwin":
_append_env_path("DYLD_FALLBACK_LIBRARY_PATH", str(lib_dir))
if not (bin_dir / "qret").exists() or not (bin_dir / "gridsynth").exists():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check cannot support Windows because you should specify .exe extension.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the code! thanks

@Kazutaka333 Kazutaka333 requested a review from yasuo-ozu April 23, 2026 01:53
Comment thread .github/workflows/test.yml Outdated
# chmod +x .ci-bin/gridsynth
# echo "$GITHUB_WORKSPACE/.ci-bin" >> "$GITHUB_PATH"

- name: Prepare qret stub for test (Windows)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also comment out this

@Kazutaka333 Kazutaka333 requested a review from yasuo-ozu April 27, 2026 04:46
@Kazutaka333 Kazutaka333 merged commit 67877c9 into main May 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants