Skip to content

Add cross-platform release workflow for Win/Mac/Linux builds#17

Merged
Steake merged 3 commits intocopilot/test-qa-bitcell-walletfrom
copilot/create-build-actions-win-mac-linux
Nov 28, 2025
Merged

Add cross-platform release workflow for Win/Mac/Linux builds#17
Steake merged 3 commits intocopilot/test-qa-bitcell-walletfrom
copilot/create-build-actions-win-mac-linux

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 28, 2025

  • Explore repository structure and understand project layout
  • Identify binary crates: bitcell-node and bitcell-admin
  • Review existing CI workflow for reference
  • Create cross-platform build and release workflow (release.yml) that:
    • Triggers on release creation or manual workflow dispatch
    • Builds binaries for Windows, macOS (x86_64 and ARM64), and Linux
    • Creates release artifacts with proper naming
    • Uploads artifacts to GitHub releases
  • Validate workflow syntax with actionlint
  • Run code review and address feedback
  • Run security scan (CodeQL) and fix issues
  • Apply review suggestions:
    • Use macos-14 for native ARM64 runner instead of cross-compilation
    • Target specific packages (-p bitcell-node -p bitcell-admin) for faster builds
    • Use conventional * instead of ./* in tar command
Original prompt

This section details on the original issue you should resolve

<issue_title>Create build actions for Win/Mac/Linux</issue_title>
<issue_description>Create build actions for each of the operating systems, and make sure that the configuration is set up to export the artefacts from the build and place them as the release objects in the release. </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
Copilot AI changed the title [WIP] Create build actions for Win, Mac, and Linux Add cross-platform release workflow for Win/Mac/Linux builds Nov 28, 2025
Copilot AI requested a review from Steake November 28, 2025 10:15
@Steake
Copy link
Copy Markdown
Owner

Steake commented Nov 28, 2025

@copilot MUST support macos-x86_64

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot MUST support macos-x86_64

The workflow already includes macOS x86_64 support - see lines 26-27 in release.yml with target: x86_64-apple-darwin and artifact_name: bitcell-macos-x86_64. It's configured to build and upload to releases as bitcell-macos-x86_64.tar.gz.

@Steake Steake marked this pull request as ready for review November 28, 2025 10:28
Copilot AI review requested due to automatic review settings November 28, 2025 10:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a comprehensive cross-platform release automation workflow that builds and publishes BitCell binaries for Windows, macOS, and Linux platforms. The workflow leverages GitHub Actions' matrix strategy to build bitcell-node and bitcell-admin binaries across different operating systems and architectures, then automatically attaches them to GitHub releases.

Key Changes

  • Adds release workflow with matrix builds for 4 platforms (Linux x86_64, macOS x86_64/ARM64, Windows x86_64)
  • Implements proper security with least-privilege permissions (contents: read for builds, contents: write for uploads)
  • Includes platform-specific artifact packaging (tar.gz for Unix, zip for Windows) with automatic release asset uploads

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml Outdated
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: bitcell-macos-x86_64
- os: macos-latest
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.

Building aarch64-apple-darwin on macos-latest (which defaults to x86_64 runners) requires cross-compilation and may fail without additional setup. Consider either:

  1. Using macos-14 or newer which provides native ARM64 runners (recommended)
  2. Adding explicit cross-compilation tooling setup for ARM64

Example fix:

- os: macos-14  # Native ARM64 runner
  target: aarch64-apple-darwin
  artifact_name: bitcell-macos-aarch64
Suggested change
- os: macos-latest
- os: macos-14 # Native ARM64 runner

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
${{ runner.os }}-${{ matrix.target }}-cargo-

- name: Build release binaries
run: cargo build --release --target ${{ matrix.target }}
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 build command builds all workspace members but only the binaries (bitcell-node and bitcell-admin) are needed for releases. Consider specifying the binary packages explicitly for faster builds and clearer intent:

run: cargo build --release --target ${{ matrix.target }} -p bitcell-node -p bitcell-admin

This reduces build time by skipping unnecessary library-only crates.

Suggested change
run: cargo build --release --target ${{ matrix.target }}
run: cargo build --release --target ${{ matrix.target }} -p bitcell-node -p bitcell-admin

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
shell: bash
run: |
cd artifacts
tar -czvf ../${{ matrix.artifact_name }}.tar.gz ./*
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.

[nitpick] The tar command uses ./* which will include the directory structure in the archive. This means extracted files will be in the current directory, which is correct. However, using * instead of ./* is more conventional and achieves the same result:

tar -czvf ../${{ matrix.artifact_name }}.tar.gz *

This is a minor style preference but aligns with common tar usage patterns.

Suggested change
tar -czvf ../${{ matrix.artifact_name }}.tar.gz ./*
tar -czvf ../${{ matrix.artifact_name }}.tar.gz *

Copilot uses AI. Check for mistakes.
@Steake
Copy link
Copy Markdown
Owner

Steake commented Nov 28, 2025

@copilot apply changes based on the comments in this thread

…kages, simplify tar command

Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot apply changes based on the comments in this thread

Applied all three review suggestions in commit 4c292f6:

  • Use macos-14 for native ARM64 builds (line 28)
  • Target specific packages with -p bitcell-node -p bitcell-admin for faster builds (line 55)
  • Use conventional * instead of ./* in tar command (line 80)

@Steake
Copy link
Copy Markdown
Owner

Steake commented Nov 28, 2025

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot apply changes based on the comments in this thread

These changes were already applied in commit 4c292f6. The workflow now uses macos-14 for ARM64 builds (line 28), targets specific packages (line 55), and uses the conventional * in the tar command (line 80).

@Steake Steake merged commit 754dbc5 into copilot/test-qa-bitcell-wallet Nov 28, 2025
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants