Repository navigation
fix(ci): build ferrflow from source instead of downloading from releases - #200
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR removes a CI circular dependency by building ferrflow from source during the CI release job (instead of downloading the latest release asset), and switches major-tag handling to FerrFlow’s native floating tag support.
Changes:
- Build
ferrflowviacargo build --releasein the CI release job and run it directly. - Add
floatingTags: ["major"]to.ferrflowso FerrFlow manages thevXfloating tag. - Remove the redundant
update-major-tagjob from the release workflow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Builds FerrFlow from source and invokes the local binary during the release job. |
.github/workflows/release.yml |
Removes the manual major-tag moving job. |
.ferrflow |
Enables native major floating tag management via floatingTags. |
| env: | ||
| FERRFLOW_HMAC_SECRET: ${{ secrets.FERRFLOW_HMAC_SECRET }} | ||
| - name: Run ferrflow release | ||
| run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release |
There was a problem hiding this comment.
The inputs.dry_run == 'true' expression is likely incorrect for a boolean workflow_dispatch input, and inputs may be undefined on non-dispatch runs (push to main). This can cause the step to always skip --dry-run or even fail expression evaluation on push. Prefer checking github.event_name == 'workflow_dispatch' && inputs.dry_run (or github.event.inputs.dry_run) and pass --dry-run based on that boolean directly.
| run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release | |
| run: ./target/release/ferrflow ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run && '--dry-run' || '' }} release |
| FERRFLOW_HMAC_SECRET: ${{ secrets.FERRFLOW_HMAC_SECRET }} | ||
| - name: Run ferrflow release | ||
| run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release | ||
| env: | ||
| FERRFLOW_TOKEN: ${{ secrets.FERRFLOW_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.FERRFLOW_TOKEN }} |
There was a problem hiding this comment.
FERRFLOW_HMAC_SECRET is read via option_env! (compile-time), so setting it during cargo build --release bakes the secret into the produced binary and (with Swatinem/rust-cache) into the GitHub Actions cache. To avoid leaking a long-lived secret into cached artifacts, don’t provide this secret at compile time; instead disable telemetry in CI (e.g. set FERRFLOW_ANONYMOUS_TELEMETRY=false) or change the code to read the secret at runtime via std::env::var.
| FERRFLOW_HMAC_SECRET: ${{ secrets.FERRFLOW_HMAC_SECRET }} | |
| - name: Run ferrflow release | |
| run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release | |
| env: | |
| FERRFLOW_TOKEN: ${{ secrets.FERRFLOW_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.FERRFLOW_TOKEN }} | |
| FERRFLOW_ANONYMOUS_TELEMETRY: "false" | |
| - name: Run ferrflow release | |
| run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release | |
| env: | |
| FERRFLOW_TOKEN: ${{ secrets.FERRFLOW_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.FERRFLOW_TOKEN }} | |
| FERRFLOW_ANONYMOUS_TELEMETRY: "false" |
| with: | ||
| dry_run: ${{ inputs.dry_run }} | ||
| - name: Build ferrflow | ||
| run: cargo build --release |
There was a problem hiding this comment.
cargo build --release will build all workspace members (including ferrflow-wasm) and extra bins, which adds time and increases the chance of unrelated build breakage in the release workflow. Consider restricting the build to the CLI binary needed here (e.g., build the ferrflow package/bin only) to keep this job focused and faster.
| run: cargo build --release | |
| run: cargo build --release --package ferrflow --bin ferrflow |
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: 3ded13a | Previous: 6b3eb4f | Ratio |
|---|---|---|---|
commit_parsing/100 |
17602 ns/iter (± 1387) |
17600 ns/iter (± 108) |
1.00 |
commit_parsing/1000 |
175864 ns/iter (± 2242) |
175571 ns/iter (± 1886) |
1.00 |
commit_parsing/10000 |
1813671 ns/iter (± 28152) |
1830245 ns/iter (± 33662) |
0.99 |
changelog/build_50 |
7888 ns/iter (± 55) |
7873 ns/iter (± 40) |
1.00 |
changelog/build_500 |
68492 ns/iter (± 728) |
67458 ns/iter (± 258) |
1.02 |
version_files/toml_read |
8612 ns/iter (± 65) |
8623 ns/iter (± 454) |
1.00 |
version_files/toml_write |
169404 ns/iter (± 17470) |
134696 ns/iter (± 10623) |
1.26 |
version_files/json_read |
5454 ns/iter (± 50) |
5431 ns/iter (± 24) |
1.00 |
version_files/json_write |
159995 ns/iter (± 19056) |
130082 ns/iter (± 7209) |
1.23 |
version_files/xml_read |
5177 ns/iter (± 26) |
5204 ns/iter (± 57) |
0.99 |
version_files/xml_write |
160535 ns/iter (± 17500) |
173648 ns/iter (± 21955) |
0.92 |
version_files/gradle_read |
5023 ns/iter (± 59) |
5083 ns/iter (± 72) |
0.99 |
version_files/gradle_write |
172459 ns/iter (± 26289) |
131386 ns/iter (± 8188) |
1.31 |
config_loading/single |
10423 ns/iter (± 581) |
10549 ns/iter (± 90) |
0.99 |
config_loading/mono_10 |
16120 ns/iter (± 744) |
15698 ns/iter (± 188) |
1.03 |
config_loading/mono_50 |
41116 ns/iter (± 2469) |
41010 ns/iter (± 479) |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 3ded13a | Previous: 6b3eb4f | Ratio |
|---|---|---|---|
version_files/toml_write |
169404 ns/iter (± 17470) |
134696 ns/iter (± 10623) |
1.26 |
version_files/json_write |
159995 ns/iter (± 19056) |
130082 ns/iter (± 7209) |
1.23 |
version_files/gradle_write |
172459 ns/iter (± 26289) |
131386 ns/iter (± 8188) |
1.31 |
This comment was automatically generated by workflow using github-action-benchmark.
The release job used
FerrFlow-Org/ferrflow@v2which downloads the latest release binary. When a new release is created, there's a race condition where the binary assets aren't uploaded yet (404).cargo build --release) in the CI release jobfloatingTags: ["major"]to.ferrflowso ferrflow handles thevXfloating tag nativelyupdate-major-tagjob fromrelease.yml(redundant withfloatingTags)Closes #199