moeix 0.11.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. moeix-0.11.9/.cargo/config.toml +3 -0
  2. moeix-0.11.9/.github/CODEOWNERS +1 -0
  3. moeix-0.11.9/.github/ISSUE_TEMPLATE/01_BUG_REPORT.md +30 -0
  4. moeix-0.11.9/.github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md +19 -0
  5. moeix-0.11.9/.github/PULL_REQUEST_TEMPLATE.md +23 -0
  6. moeix-0.11.9/.github/workflows/build.yml +27 -0
  7. moeix-0.11.9/.github/workflows/release.yml +296 -0
  8. moeix-0.11.9/.github/workflows/stale.yml +21 -0
  9. moeix-0.11.9/.github/workflows/tier3.yml +69 -0
  10. moeix-0.11.9/.github/workflows/wheels.yml +96 -0
  11. moeix-0.11.9/.gitignore +107 -0
  12. moeix-0.11.9/CHANGELOG.md +289 -0
  13. moeix-0.11.9/CODE_OF_CONDUCT.md +49 -0
  14. moeix-0.11.9/Cargo.lock +2183 -0
  15. moeix-0.11.9/Cargo.toml +116 -0
  16. moeix-0.11.9/LICENSE +21 -0
  17. moeix-0.11.9/PKG-INFO +36 -0
  18. moeix-0.11.9/README.md +263 -0
  19. moeix-0.11.9/SECURITY.md +13 -0
  20. moeix-0.11.9/benches/search.rs +72 -0
  21. moeix-0.11.9/clippy.toml +93 -0
  22. moeix-0.11.9/deny.toml +34 -0
  23. moeix-0.11.9/docs/.ixd.toml.md +88 -0
  24. moeix-0.11.9/docs/BENCHMARKS.md +86 -0
  25. moeix-0.11.9/docs/CONTRIBUTING.md +51 -0
  26. moeix-0.11.9/docs/DAEMON-RUNBOOK.md +484 -0
  27. moeix-0.11.9/docs/DELTA-FORMAT.md +367 -0
  28. moeix-0.11.9/docs/QUICKSTART.md +323 -0
  29. moeix-0.11.9/docs/README.md +217 -0
  30. moeix-0.11.9/docs/SOCKET-API.md +469 -0
  31. moeix-0.11.9/docs/bugs/BUG--service-install-multi-root.md +193 -0
  32. moeix-0.11.9/docs/images/logo.svg +4 -0
  33. moeix-0.11.9/docs/internals/DAEMON-SOCKET-INTERNALS.md +347 -0
  34. moeix-0.11.9/docs/internals/POSTMORTEM-2026-05-03-disk-exhaustion.md +472 -0
  35. moeix-0.11.9/docs/v0.8.0-UPGRADE-GUIDE.md +414 -0
  36. moeix-0.11.9/ix-py/.gitignore +5 -0
  37. moeix-0.11.9/ix-py/Cargo.toml +27 -0
  38. moeix-0.11.9/ix-py/README.md +3 -0
  39. moeix-0.11.9/ix-py/src/error.rs +134 -0
  40. moeix-0.11.9/ix-py/src/index.rs +432 -0
  41. moeix-0.11.9/ix-py/src/lib.rs +51 -0
  42. moeix-0.11.9/ix-py/src/safety.rs +93 -0
  43. moeix-0.11.9/ix-py/src/types.rs +136 -0
  44. moeix-0.11.9/ix-py/tests/conftest.py +89 -0
  45. moeix-0.11.9/ix-py/tests/test_error.py +42 -0
  46. moeix-0.11.9/ix-py/tests/test_index.py +150 -0
  47. moeix-0.11.9/ix-py/tests/test_module.py +35 -0
  48. moeix-0.11.9/pyproject.toml +78 -0
  49. moeix-0.11.9/python/ix/__init__.py +129 -0
  50. moeix-0.11.9/python/ix/__init__.pyi +105 -0
  51. moeix-0.11.9/python/ix/py.typed +0 -0
  52. moeix-0.11.9/scripts/stress-test.sh +325 -0
  53. moeix-0.11.9/scripts/test-framework.sh +532 -0
  54. moeix-0.11.9/scripts/verify-docs.sh +102 -0
  55. moeix-0.11.9/src/bin/ix.rs +1398 -0
  56. moeix-0.11.9/src/bin/ixd.rs +60 -0
  57. moeix-0.11.9/src/lib/api.rs +35 -0
  58. moeix-0.11.9/src/lib/archive.rs +176 -0
  59. moeix-0.11.9/src/lib/bloom.rs +176 -0
  60. moeix-0.11.9/src/lib/builder.rs +1341 -0
  61. moeix-0.11.9/src/lib/cache_policy.rs +376 -0
  62. moeix-0.11.9/src/lib/config.rs +117 -0
  63. moeix-0.11.9/src/lib/daemon.rs +670 -0
  64. moeix-0.11.9/src/lib/daemon_sock.rs +1288 -0
  65. moeix-0.11.9/src/lib/decompress.rs +45 -0
  66. moeix-0.11.9/src/lib/error.rs +100 -0
  67. moeix-0.11.9/src/lib/executor.rs +912 -0
  68. moeix-0.11.9/src/lib/format.rs +688 -0
  69. moeix-0.11.9/src/lib/idle.rs +92 -0
  70. moeix-0.11.9/src/lib/lib.rs +167 -0
  71. moeix-0.11.9/src/lib/neg_cache.rs +332 -0
  72. moeix-0.11.9/src/lib/planner.rs +273 -0
  73. moeix-0.11.9/src/lib/posting.rs +167 -0
  74. moeix-0.11.9/src/lib/posting_cache.rs +557 -0
  75. moeix-0.11.9/src/lib/reader.rs +679 -0
  76. moeix-0.11.9/src/lib/regex_pool.rs +261 -0
  77. moeix-0.11.9/src/lib/scanner.rs +334 -0
  78. moeix-0.11.9/src/lib/streaming.rs +384 -0
  79. moeix-0.11.9/src/lib/string_pool.rs +242 -0
  80. moeix-0.11.9/src/lib/trigram.rs +217 -0
  81. moeix-0.11.9/src/lib/varint.rs +112 -0
  82. moeix-0.11.9/src/lib/watcher.rs +286 -0
  83. moeix-0.11.9/tests/boundary_tests.rs +421 -0
  84. moeix-0.11.9/tests/concurrent_tests.rs +152 -0
  85. moeix-0.11.9/tests/critical_fixes.rs +108 -0
  86. moeix-0.11.9/tests/error_handling.rs +123 -0
  87. moeix-0.11.9/tests/fault_injection.rs +80 -0
  88. moeix-0.11.9/tests/integration.rs +86 -0
  89. moeix-0.11.9/tests/property_tests.rs +318 -0
  90. moeix-0.11.9/tests/robustness.rs +290 -0
  91. moeix-0.11.9/tests/streaming.rs +159 -0
@@ -0,0 +1,3 @@
1
+
2
+ [target.aarch64-unknown-linux-gnu]
3
+ linker = "aarch64-linux-gnu-gcc"
@@ -0,0 +1 @@
1
+ * @moeshawky
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear and concise description of what the bug is.
11
+
12
+ **To Reproduce**
13
+ Steps to reproduce the behavior:
14
+ 1. Run command '...'
15
+ 2. Search for '...'
16
+ 3. See error
17
+
18
+ **Expected behavior**
19
+ A clear and concise description of what you expected to happen.
20
+
21
+ **Screenshots**
22
+ If applicable, add screenshots to help explain your problem.
23
+
24
+ **Desktop (please complete the following information):**
25
+ - OS: [e.g. Linux, macOS]
26
+ - Rust Version [e.g. 1.70.0]
27
+ - Version [e.g. 0.1.0]
28
+
29
+ **Additional context**
30
+ Add any other context about the problem here.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ **Is your feature request related to a problem? Please describe.**
10
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11
+
12
+ **Describe the solution you'd like**
13
+ A clear and concise description of what you want to happen.
14
+
15
+ **Describe alternatives you've considered**
16
+ A clear and concise description of any alternative solutions or features you've considered.
17
+
18
+ **Additional context**
19
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,23 @@
1
+ ## Description
2
+
3
+ Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
4
+
5
+ Fixes # (issue)
6
+
7
+ ## Type of change
8
+
9
+ - [ ] Bug fix (non-breaking change which fixes an issue)
10
+ - [ ] New feature (non-breaking change which adds functionality)
11
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12
+ - [ ] This change requires a documentation update
13
+
14
+ ## Checklist:
15
+
16
+ - [ ] My code follows the style guidelines of this project
17
+ - [ ] I have performed a self-review of my own code
18
+ - [ ] I have commented my code, particularly in hard-to-understand areas
19
+ - [ ] I have made corresponding changes to the documentation
20
+ - [ ] My changes generate no new warnings
21
+ - [ ] I have added tests that prove my fix is effective or that my feature works
22
+ - [ ] New and existing unit tests pass locally with my changes
23
+ - [ ] Any dependent changes have been merged and published in downstream modules
@@ -0,0 +1,27 @@
1
+ name: Rust
2
+ on:
3
+ push:
4
+ branches: [ "main" ]
5
+ pull_request:
6
+ branches: [ "main" ]
7
+
8
+ env:
9
+ CARGO_TERM_COLOR: always
10
+
11
+ jobs:
12
+ build:
13
+ name: Build and Test
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ matrix:
17
+ os: [ubuntu-latest, macos-latest, windows-latest]
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Build
21
+ run: cargo build --verbose
22
+ - name: Run tests
23
+ run: cargo test --verbose
24
+ - name: Run Clippy
25
+ run: cargo clippy -- -D warnings
26
+ - name: Check Formatting
27
+ run: cargo fmt -- --check
@@ -0,0 +1,296 @@
1
+ # This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist
2
+ #
3
+ # Copyright 2022-2024, axodotdev
4
+ # SPDX-License-Identifier: MIT or Apache-2.0
5
+ #
6
+ # CI that:
7
+ #
8
+ # * checks for a Git Tag that looks like a release
9
+ # * builds artifacts with dist (archives, installers, hashes)
10
+ # * uploads those artifacts to temporary workflow zip
11
+ # * on success, uploads the artifacts to a GitHub Release
12
+ #
13
+ # Note that the GitHub Release will be created with a generated
14
+ # title/body based on your changelogs.
15
+
16
+ name: Release
17
+ permissions:
18
+ "contents": "write"
19
+
20
+ # This task will run whenever you push a git tag that looks like a version
21
+ # like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
22
+ # Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where
23
+ # PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION
24
+ # must be a Cargo-style SemVer Version (must have at least major.minor.patch).
25
+ #
26
+ # If PACKAGE_NAME is specified, then the announcement will be for that
27
+ # package (erroring out if it doesn't have the given version or isn't dist-able).
28
+ #
29
+ # If PACKAGE_NAME isn't specified, then the announcement will be for all
30
+ # (dist-able) packages in the workspace with that version (this mode is
31
+ # intended for workspaces with only one dist-able package, or with all dist-able
32
+ # packages versioned/released in lockstep).
33
+ #
34
+ # If you push multiple tags at once, separate instances of this workflow will
35
+ # spin up, creating an independent announcement for each one. However, GitHub
36
+ # will hard limit this to 3 tags per commit, as it will assume more tags is a
37
+ # mistake.
38
+ #
39
+ # If there's a prerelease-style suffix to the version, then the release(s)
40
+ # will be marked as a prerelease.
41
+ on:
42
+ pull_request:
43
+ push:
44
+ tags:
45
+ - '**[0-9]+.[0-9]+.[0-9]+*'
46
+
47
+ jobs:
48
+ # Run 'dist plan' (or host) to determine what tasks we need to do
49
+ plan:
50
+ runs-on: "ubuntu-22.04"
51
+ outputs:
52
+ val: ${{ steps.plan.outputs.manifest }}
53
+ tag: ${{ !github.event.pull_request && github.ref_name || '' }}
54
+ tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }}
55
+ publishing: ${{ !github.event.pull_request }}
56
+ env:
57
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
+ steps:
59
+ - uses: actions/checkout@v6
60
+ with:
61
+ persist-credentials: false
62
+ submodules: recursive
63
+ - name: Install dist
64
+ # we specify bash to get pipefail; it guards against the `curl` command
65
+ # failing. otherwise `sh` won't catch that `curl` returned non-0
66
+ shell: bash
67
+ run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0/cargo-dist-installer.sh | sh"
68
+ - name: Cache dist
69
+ uses: actions/upload-artifact@v6
70
+ with:
71
+ name: cargo-dist-cache
72
+ path: ~/.cargo/bin/dist
73
+ # sure would be cool if github gave us proper conditionals...
74
+ # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
75
+ # functionality based on whether this is a pull_request, and whether it's from a fork.
76
+ # (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
77
+ # but also really annoying to build CI around when it needs secrets to work right.)
78
+ - id: plan
79
+ run: |
80
+ dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
81
+ echo "dist ran successfully"
82
+ cat plan-dist-manifest.json
83
+ echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
84
+ - name: "Upload dist-manifest.json"
85
+ uses: actions/upload-artifact@v6
86
+ with:
87
+ name: artifacts-plan-dist-manifest
88
+ path: plan-dist-manifest.json
89
+
90
+ # Build and packages all the platform-specific things
91
+ build-local-artifacts:
92
+ name: build-local-artifacts (${{ join(matrix.targets, ', ') }})
93
+ # Let the initial task tell us to not run (currently very blunt)
94
+ needs:
95
+ - plan
96
+ if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
97
+ strategy:
98
+ fail-fast: false
99
+ # Target platforms/runners are computed by dist in create-release.
100
+ # Each member of the matrix has the following arguments:
101
+ #
102
+ # - runner: the github runner
103
+ # - dist-args: cli flags to pass to dist
104
+ # - install-dist: expression to run to install dist on the runner
105
+ #
106
+ # Typically there will be:
107
+ # - 1 "global" task that builds universal installers
108
+ # - N "local" tasks that build each platform's binaries and platform-specific installers
109
+ matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
110
+ runs-on: ${{ matrix.runner }}
111
+ container: ${{ matrix.container && matrix.container.image || null }}
112
+ env:
113
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114
+ BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
115
+ steps:
116
+ - name: enable windows longpaths
117
+ run: |
118
+ git config --global core.longpaths true
119
+ - uses: actions/checkout@v6
120
+ with:
121
+ persist-credentials: false
122
+ submodules: recursive
123
+ - name: Install Rust non-interactively if not already installed
124
+ if: ${{ matrix.container }}
125
+ run: |
126
+ if ! command -v cargo > /dev/null 2>&1; then
127
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
128
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
129
+ fi
130
+ - name: Install dist
131
+ run: ${{ matrix.install_dist.run }}
132
+ # Get the dist-manifest
133
+ - name: Fetch local artifacts
134
+ uses: actions/download-artifact@v7
135
+ with:
136
+ pattern: artifacts-*
137
+ path: target/distrib/
138
+ merge-multiple: true
139
+ - name: Install dependencies
140
+ run: |
141
+ ${{ matrix.packages_install }}
142
+ - name: Build artifacts
143
+ run: |
144
+ # Actually do builds and make zips and whatnot
145
+ dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
146
+ echo "dist ran successfully"
147
+ - id: cargo-dist
148
+ name: Post-build
149
+ # We force bash here just because github makes it really hard to get values up
150
+ # to "real" actions without writing to env-vars, and writing to env-vars has
151
+ # inconsistent syntax between shell and powershell.
152
+ shell: bash
153
+ run: |
154
+ # Parse out what we just built and upload it to scratch storage
155
+ echo "paths<<EOF" >> "$GITHUB_OUTPUT"
156
+ dist print-upload-files-from-manifest --manifest dist-manifest.json >> "$GITHUB_OUTPUT"
157
+ echo "EOF" >> "$GITHUB_OUTPUT"
158
+
159
+ cp dist-manifest.json "$BUILD_MANIFEST_NAME"
160
+ - name: "Upload artifacts"
161
+ uses: actions/upload-artifact@v6
162
+ with:
163
+ name: artifacts-build-local-${{ join(matrix.targets, '_') }}
164
+ path: |
165
+ ${{ steps.cargo-dist.outputs.paths }}
166
+ ${{ env.BUILD_MANIFEST_NAME }}
167
+
168
+ # Build and package all the platform-agnostic(ish) things
169
+ build-global-artifacts:
170
+ needs:
171
+ - plan
172
+ - build-local-artifacts
173
+ runs-on: "ubuntu-22.04"
174
+ env:
175
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176
+ BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
177
+ steps:
178
+ - uses: actions/checkout@v6
179
+ with:
180
+ persist-credentials: false
181
+ submodules: recursive
182
+ - name: Install cached dist
183
+ uses: actions/download-artifact@v7
184
+ with:
185
+ name: cargo-dist-cache
186
+ path: ~/.cargo/bin/
187
+ - run: chmod +x ~/.cargo/bin/dist
188
+ # Get all the local artifacts for the global tasks to use (for e.g. checksums)
189
+ - name: Fetch local artifacts
190
+ uses: actions/download-artifact@v7
191
+ with:
192
+ pattern: artifacts-*
193
+ path: target/distrib/
194
+ merge-multiple: true
195
+ - id: cargo-dist
196
+ shell: bash
197
+ run: |
198
+ dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
199
+ echo "dist ran successfully"
200
+
201
+ # Parse out what we just built and upload it to scratch storage
202
+ echo "paths<<EOF" >> "$GITHUB_OUTPUT"
203
+ jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
204
+ echo "EOF" >> "$GITHUB_OUTPUT"
205
+
206
+ cp dist-manifest.json "$BUILD_MANIFEST_NAME"
207
+ - name: "Upload artifacts"
208
+ uses: actions/upload-artifact@v6
209
+ with:
210
+ name: artifacts-build-global
211
+ path: |
212
+ ${{ steps.cargo-dist.outputs.paths }}
213
+ ${{ env.BUILD_MANIFEST_NAME }}
214
+ # Determines if we should publish/announce
215
+ host:
216
+ needs:
217
+ - plan
218
+ - build-local-artifacts
219
+ - build-global-artifacts
220
+ # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
221
+ if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
222
+ env:
223
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
224
+ runs-on: "ubuntu-22.04"
225
+ outputs:
226
+ val: ${{ steps.host.outputs.manifest }}
227
+ steps:
228
+ - uses: actions/checkout@v6
229
+ with:
230
+ persist-credentials: false
231
+ submodules: recursive
232
+ - name: Install cached dist
233
+ uses: actions/download-artifact@v7
234
+ with:
235
+ name: cargo-dist-cache
236
+ path: ~/.cargo/bin/
237
+ - run: chmod +x ~/.cargo/bin/dist
238
+ # Fetch artifacts from scratch-storage
239
+ - name: Fetch artifacts
240
+ uses: actions/download-artifact@v7
241
+ with:
242
+ pattern: artifacts-*
243
+ path: target/distrib/
244
+ merge-multiple: true
245
+ - id: host
246
+ shell: bash
247
+ run: |
248
+ dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
249
+ echo "artifacts uploaded and released successfully"
250
+ cat dist-manifest.json
251
+ echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
252
+ - name: "Upload dist-manifest.json"
253
+ uses: actions/upload-artifact@v6
254
+ with:
255
+ # Overwrite the previous copy
256
+ name: artifacts-dist-manifest
257
+ path: dist-manifest.json
258
+ # Create a GitHub Release while uploading all files to it
259
+ - name: "Download GitHub Artifacts"
260
+ uses: actions/download-artifact@v7
261
+ with:
262
+ pattern: artifacts-*
263
+ path: artifacts
264
+ merge-multiple: true
265
+ - name: Cleanup
266
+ run: |
267
+ # Remove the granular manifests
268
+ rm -f artifacts/*-dist-manifest.json
269
+ - name: Create GitHub Release
270
+ env:
271
+ PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
272
+ ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
273
+ ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
274
+ RELEASE_COMMIT: "${{ github.sha }}"
275
+ run: |
276
+ # Write and read notes from a file to avoid quoting breaking things
277
+ echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
278
+
279
+ gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
280
+
281
+ announce:
282
+ needs:
283
+ - plan
284
+ - host
285
+ # use "always() && ..." to allow us to wait for all publish jobs while
286
+ # still allowing individual publish jobs to skip themselves (for prereleases).
287
+ # "host" however must run to completion, no skipping allowed!
288
+ if: ${{ always() && needs.host.result == 'success' }}
289
+ runs-on: "ubuntu-22.04"
290
+ env:
291
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
292
+ steps:
293
+ - uses: actions/checkout@v6
294
+ with:
295
+ persist-credentials: false
296
+ submodules: recursive
@@ -0,0 +1,21 @@
1
+ name: Mark stale issues and pull requests
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 0 * * *'
6
+
7
+ jobs:
8
+ stale:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ issues: write
12
+ pull-requests: write
13
+
14
+ steps:
15
+ - uses: actions/stale@v9
16
+ with:
17
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
18
+ stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
19
+ stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
20
+ days-before-stale: 30
21
+ days-before-close: 7
@@ -0,0 +1,69 @@
1
+ name: Tier 3 - Quality Verification
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, release/* ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+ RUST_BACKTRACE: 1
12
+ RUST_LOG: info
13
+
14
+ jobs:
15
+ quality-gate:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Install toolchain
21
+ uses: dtolnay/rust-toolchain@stable
22
+ with:
23
+ components: llvm-tools-preview, rustfmt, clippy
24
+ target: x86_64-unknown-linux-gnu
25
+
26
+ - name: Install cargo tools
27
+ run: |
28
+ cargo install cargo-llvm-cov cargo-semver-checks cargo-udeps cargo-outdated cargo-deny
29
+
30
+ - name: Check formatting
31
+ run: cargo fmt --check --all
32
+
33
+ - name: Lint (clippy)
34
+ run: cargo clippy --all-targets --all-features -- -D warnings
35
+
36
+ - name: Tier 1 - Clippy lints
37
+ run: |
38
+ cargo clippy --all-targets --all-features \
39
+ -D clippy::dbg_macro -D clippy::todo \
40
+ -D clippy::wildcard_imports -D clippy::panic_in_result_fn \
41
+ -D clippy::missing_const_for_fn -D clippy::large_enum_variant
42
+
43
+ - name: Tier 2 - Supply chain
44
+ run: cargo deny check licenses advisories bans
45
+
46
+ - name: Build
47
+ run: cargo build --all-features --verbose
48
+
49
+ - name: Test
50
+ run: cargo test --all-features
51
+
52
+ - name: Coverage
53
+ run: |
54
+ cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
55
+ cargo llvm-cov --all-features --workspace --summary-only
56
+
57
+ - name: Outdated deps
58
+ run: cargo outdated --exit-code 1
59
+
60
+ - name: Upload coverage
61
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
62
+ uses: codecov/codecov-action@v4
63
+ with:
64
+ files: lcov.info
65
+ fail_ci_if_error: true
66
+
67
+ - name: Deny report
68
+ if: always()
69
+ run: cargo deny check licenses advisories bans --output json > deny-report.json || true
@@ -0,0 +1,96 @@
1
+ name: Wheels
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ release:
9
+ types: [published]
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ sdist:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Build sdist
21
+ working-directory: ix-py
22
+ run: pipx run build --sdist
23
+ - uses: actions/upload-artifact@v4
24
+ with:
25
+ name: sdist
26
+ path: ix-py/dist/*.tar.gz
27
+
28
+ build:
29
+ needs: [sdist]
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ include:
34
+ - target: x86_64
35
+ os: ubuntu-latest
36
+ container: quay.io/pypa/manylinux_2_28_x86_64
37
+ - target: aarch64
38
+ os: ubuntu-24.04-arm
39
+ container: quay.io/pypa/manylinux_2_28_aarch64
40
+ - target: x86_64
41
+ os: macos-latest
42
+ - target: aarch64
43
+ os: macos-latest
44
+ - target: x86_64
45
+ os: windows-latest
46
+ - target: i686
47
+ os: windows-latest
48
+ runs-on: ${{ matrix.os }}
49
+ container: ${{ matrix.container }}
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+
53
+ - name: Install Rust (Linux container)
54
+ if: matrix.container
55
+ run: |
56
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
57
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
58
+
59
+ - name: Build wheels
60
+ uses: PyO3/maturin-action@v1
61
+ with:
62
+ working-directory: ix-py
63
+ args: --release --out dist
64
+ before-script-linux: |
65
+ yum install -y openssl-devel
66
+ manylinux: ${{ matrix.container && 'auto' || 'off' }}
67
+
68
+ - name: Run pytest
69
+ if: ${{ !matrix.container }}
70
+ working-directory: ix-py
71
+ run: |
72
+ pip install --no-index --find-links dist ix
73
+ pip install '.[dev]'
74
+ python -m pytest tests/
75
+
76
+ - uses: actions/upload-artifact@v4
77
+ with:
78
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
79
+ path: ix-py/dist
80
+
81
+ publish:
82
+ if: github.event_name == 'release'
83
+ needs: [build]
84
+ runs-on: ubuntu-latest
85
+ environment: pypi
86
+ permissions:
87
+ id-token: write
88
+ steps:
89
+ - uses: actions/download-artifact@v4
90
+ with:
91
+ pattern: "*"
92
+ path: dist
93
+ merge-multiple: true
94
+ - uses: pypa/gh-action-pypi-publish@release/v1
95
+ with:
96
+ packages-dir: dist