[com9] Add com9 compilation (instead of fixed .exe)#1281
Open
fso42 wants to merge 12 commits into
Open
Conversation
Remove precompiled binaries from version control. Add build script that fetches the C source from the upstream GitHub repo and compiles for the current platform. Integration via setup.py hook, pixi task, and CI (cibuildwheel + sdist cross-compilation).
Contributor
Analysis for project
|
| Tool | Category | Rule | Count | |
|---|---|---|---|---|
| ruff | Lint | Local variable mock\_run is assigned to but never used |
1 | ❌ |
| qlty | Structure | Function with many returns (count = 4): _compile | 1 |
Contributor
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on 🛟 Help
|
Run full com9MoTVoellmyMain pipeline with simType=null, verify peak files and config files are produced. Skip when MoT binary is absent. Also add `pixi run compilemot` to CI so the binary is built before tests run.
…y` build script Relocated the `com9MoTVoellmy` build script to the `avaframe` directory across all platforms in the GitHub Actions workflow. Ensures correct script execution during the build process.
Set `CIBW_ENVIRONMENT` to include `GITHUB_TOKEN` in the PyPI build and upload workflow. Ensures access to GitHub secrets during the build process.
Remove the `-static` flag from the Linux build command in `_buildMoTVoellmy.py` to address compatibility issues with dynamic linking. Ensures smoother builds on Linux systems.
| if system != "Windows": | ||
| os.chmod(outPath, 0o755) | ||
|
|
||
| print(f"Compiled {outPath}") |
Contributor
| patch("os.chdir"), | ||
| patch("os.path.dirname"), | ||
| patch("os.path.abspath"), | ||
| patch("avaframe.com9MoTVoellmy.com9MoTVoellmy.mT.runAndCheckMoT") as mock_run, |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Remove precompiled MoT-Voellmy binaries from version control and instead compile them at package time. A build script fetches the C source from the upstream GitHub repository and compiles for the target platform.
Changes
avaframe/com9MoTVoellmy/_buildMoTVoellmy.py): discovers the latest C source from the upstream repo via the GitHub API, caches it, and compiles withgccpixi run compilemotfor manual compilation, optionally with a local.cfile pathpip install(best-effort, warns if gcc is missing)CIBW_BEFORE_BUILD_*runs the build script in each platform environmentmingw-w64, ships both binaries in the source tarball