Repository navigation
Update release.yml for jetson-agx-orin #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Builds Linux and Windows binaries when a version tag (v1.2.0, ...) is pushed and attaches them to a draft release, | ||
| # which is published by hand. CUDA kernels compile at run time through NVRTC and the Vulkan shaders are committed, | ||
| # so the build needs neither the CUDA toolkit nor a Vulkan SDK. | ||
| # Builds Linux (x86_64 & aarch64) and Windows binaries when a version tag (v1.2.0, ...) is pushed and attaches them | ||
| # to a draft release, which is published by hand. CUDA kernels compile at run time through NVRTC and the Vulkan shaders | ||
| # are committed, so the build needs neither the CUDA toolkit nor a Vulkan SDK. | ||
| name: release | ||
| on: | ||
| push: | ||
|
|
@@ -21,29 +21,50 @@ jobs: | |
| matrix: | ||
| include: | ||
| - os: ubuntu-22.04 # the oldest glibc the binary will need | ||
| target: x86_64-unknown-linux-gnu | ||
| rustflags: -C target-cpu=x86-64-v3 | ||
| bin: rustingstrata | ||
| asset: rustingstrata-linux-x86_64 | ||
| cross: false | ||
| - os: ubuntu-22.04 # matches JetPack 6 glibc (2.35) on NVIDIA Jetson AGX Orin | ||
| target: aarch64-unknown-linux-gnu | ||
| rustflags: -C target-cpu=cortex-a78ae | ||
| bin: rustingstrata | ||
| asset: rustingstrata-linux-aarch64 | ||
| cross: true | ||
| - os: windows-latest | ||
| target: x86_64-pc-windows-msvc | ||
| rustflags: -C target-cpu=x86-64-v3 | ||
| bin: rustingstrata.exe | ||
| asset: rustingstrata-windows-x86_64.exe | ||
| cross: false | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| contents: write | ||
| env: | ||
| # .cargo/config.toml builds for the local CPU; release binaries target x86-64-v3 (AVX2 and FMA: Intel Haswell, | ||
| # AMD Zen and later) instead, without debug info. | ||
| RUSTFLAGS: -C target-cpu=x86-64-v3 | ||
| CARGO_PROFILE_RELEASE_DEBUG: '0' | ||
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: -C target-cpu=x86-64-v3 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low · Maintainability · 2 of 3 Per-target rustflags and the Prompt for your AI agentReply |
||
| CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS: -C target-cpu=x86-64-v3 | ||
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: -C target-cpu=cortex-a78ae | ||
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low · Maintainability · 3 of 3 Cross-compiler env vars (CC/CXX/LINKER for aarch64) are set job-wide, including for the x86_64 and Windows entries that never use them. On the native x86_64 and Windows jobs the aarch64-linux-gnu-gcc variables are set but the compiler is absent. Any build script that checks CC_<target> for a different target can pick up a wrong compiler, and a future change that adds a native target inherits cross settings it does not need. Prompt for your AI agentReply |
||
| CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc | ||
| CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++ | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - run: rustup update stable | ||
| - run: cargo build --release --locked | ||
| - if: matrix.cross | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | ||
| - run: | | ||
| rustup update stable | ||
| rustup target add ${{ matrix.target }} | ||
| - run: cargo build --release --locked --target ${{ matrix.target }} | ||
| # Only the upload step gets the token, so build scripts of dependencies cannot read it. | ||
| - env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| cp target/release/${{ matrix.bin }} ${{ matrix.asset }} | ||
| cp target/${{ matrix.target }}/release/${{ matrix.bin }} ${{ matrix.asset }} | ||
| gh release upload "$GITHUB_REF_NAME" ${{ matrix.asset }} --repo "$GITHUB_REPOSITORY" | ||
| shell: bash | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Low · Maintainability · 1 of 3
Matrix
rustflagsvalues are never read; the same flags are hardcoded again in the job env. Someone editsrustflagsin a matrix entry, expecting the Jetson or x86 build to change, but the build still uses the hardcoded CARGO_TARGET_*_RUSTFLAGS env values. The two copies drift and the release binary silently keeps the old target-cpu.Prompt for your AI agent
Reply
/dismiss(optionally with a reason) if this isn't helpful - Aletheore won't raise it again on this repo.