diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b49063a5..ce8c27de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,20 +116,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Determine build profile - id: profile - shell: bash - run: | - if [[ "${{ needs.validate.outputs.is_prerelease }}" == "true" ]]; then - echo "build_flags=" >> $GITHUB_OUTPUT - echo "profile_dir=debug" >> $GITHUB_OUTPUT - echo "Building DEBUG (RC pre-release: logging enabled)" - else - echo "build_flags=--release --no-default-features --features logging" >> $GITHUB_OUTPUT - echo "profile_dir=release" >> $GITHUB_OUTPUT - echo "Building RELEASE (logging enabled, other defaults stripped)" - fi - - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: @@ -143,19 +129,22 @@ jobs: if: matrix.cross run: cargo install cross --git https://github.com/cross-rs/cross + # Pre-releases are built exactly like the release they are a candidate for. + # Logging is in the default feature set, so `--release` carries it; there is + # no reason for an RC to differ from the artifact that ships. - name: Build (cross) if: matrix.cross - run: cross build ${{ steps.profile.outputs.build_flags }} --target ${{ matrix.target }} + run: cross build --release --target ${{ matrix.target }} - name: Build (native) if: ${{ !matrix.cross }} - run: cargo build ${{ steps.profile.outputs.build_flags }} --target ${{ matrix.target }} + run: cargo build --release --target ${{ matrix.target }} - name: Create archive (Unix) if: matrix.archive == 'tar.gz' run: | - cp config/bootstrap_peers.toml target/${{ matrix.target }}/${{ steps.profile.outputs.profile_dir }}/ - cd target/${{ matrix.target }}/${{ steps.profile.outputs.profile_dir }} + cp config/bootstrap_peers.toml target/${{ matrix.target }}/release/ + cd target/${{ matrix.target }}/release tar -czvf ../../../ant-node-cli-${{ matrix.friendly_name }}.tar.gz ${{ matrix.binary }} bootstrap_peers.toml cd ../../.. @@ -163,8 +152,8 @@ jobs: if: matrix.archive == 'zip' shell: pwsh run: | - Copy-Item "config/bootstrap_peers.toml" "target/${{ matrix.target }}/${{ steps.profile.outputs.profile_dir }}/bootstrap_peers.toml" - Push-Location "target/${{ matrix.target }}/${{ steps.profile.outputs.profile_dir }}" + Copy-Item "config/bootstrap_peers.toml" "target/${{ matrix.target }}/release/bootstrap_peers.toml" + Push-Location "target/${{ matrix.target }}/release" Compress-Archive -Path "${{ matrix.binary }}", "bootstrap_peers.toml" -DestinationPath "../../../ant-node-cli-${{ matrix.friendly_name }}.zip" Pop-Location diff --git a/Cargo.toml b/Cargo.toml index 5c98105f..7cc75571 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -177,9 +177,9 @@ required-features = ["test-utils"] [features] default = ["logging"] # Enable tracing/logging infrastructure. -# Included in `default` so dev builds (`cargo build`, `cargo test`) get logging -# automatically. Release builds strip it: -# cargo build --release --no-default-features +# Included in `default`, so every build we ship — dev, release candidate and +# release alike — has logging. Opt out only for a bespoke build that needs it +# gone: `cargo build --release --no-default-features`. logging = ["tracing", "tracing-subscriber", "tracing-appender"] # Expose test helpers (cache_insert, payment_verifier accessor) for # integration tests and downstream test harnesses.