Skip to content
Merged
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
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ jobs:
profile: minimal
target: ${{ matrix.target }}

- name: Build release binary
- name: Build release binary (ARM Linux native)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
cargo install cross --git https://github.com/cross-rs/cross
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

Installing cross from git on every build will be slow and inefficient. Consider caching the installation or using a pre-built release version with cargo install cross (without --git flag) for faster builds.

Suggested change
cargo install cross --git https://github.com/cross-rs/cross
cargo install cross

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

Installing cross from git source on every workflow run is inefficient and slow. Consider either: (1) installing from crates.io with cargo install cross for faster installation, (2) using cargo binstall cross for binary installation, or (3) caching the installation between runs to improve build performance.

Suggested change
cargo install cross --git https://github.com/cross-rs/cross
cargo install cross

Copilot uses AI. Check for mistakes.
cross build --release --target ${{ matrix.target }}

- name: Build release binary (cross-compile)
Comment on lines +47 to +53
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The step names are misleading. Step '(ARM Linux native)' uses cross-compilation via the cross tool, while '(cross-compile)' uses native cargo. Consider renaming to '(ARM Linux with cross)' and '(native cargo)' respectively to accurately reflect their functionality.

Suggested change
- name: Build release binary (ARM Linux native)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
cargo install cross --git https://github.com/cross-rs/cross
cross build --release --target ${{ matrix.target }}
- name: Build release binary (cross-compile)
- name: Build release binary (ARM Linux with cross)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
cargo install cross --git https://github.com/cross-rs/cross
cross build --release --target ${{ matrix.target }}
- name: Build release binary (native cargo)

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The step name 'cross-compile' is confusing because this step uses native cargo build, not cross-compilation. The aarch64 target is actually the one being cross-compiled. Consider renaming to 'Build release binary (native)' for clarity.

Suggested change
- name: Build release binary (cross-compile)
- name: Build release binary (native)

Copilot uses AI. Check for mistakes.
if: matrix.target != 'aarch64-unknown-linux-gnu'
run: cargo build --release --target ${{ matrix.target }}

- name: Rename binary
Expand All @@ -65,7 +72,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Package source code
run: tar czvf vipyrdocs-source.tar.gz .
uses: a7ul/tar-action@v1.2.0
with:
command: c
cwd: ./
files: |
src/
Cargo.toml
Cargo.lock
README.md
outPath: vipyrdocs-source.tar.gz

- name: Upload source tarball
uses: actions/upload-artifact@v4
with:
Expand Down
Loading