Skip to content
Merged
Show file tree
Hide file tree
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
29 changes: 9 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -143,28 +129,31 @@ 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 ../../..

- name: Create archive (Windows)
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

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading