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
68 changes: 60 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: macOS CI
name: CI

on:
push:
Expand All @@ -10,13 +10,15 @@ on:
permissions:
contents: read

env:
RUSTC_WRAPPER: ""
CARGO_TERM_COLOR: always

jobs:
macos:
name: macOS 14
lint-test:
name: Format, Clippy, Tests
runs-on: macos-14
timeout-minutes: 30
env:
RUSTC_WRAPPER: ""

steps:
- name: Checkout
Expand All @@ -36,10 +38,60 @@ jobs:
run: cargo fmt --all --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::all -D clippy::pedantic -D clippy::nursery -D clippy::cargo

- name: Test
run: cargo test --all-targets --all-features
run: cargo test --workspace --all-features

build:
name: Build ${{ matrix.label }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- label: macOS Apple Silicon
runner: macos-14
target: aarch64-apple-darwin
binary: target/aarch64-apple-darwin/release/bitengine
deps: none
- label: Linux x86_64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: target/x86_64-unknown-linux-gnu/release/bitengine
deps: linux
- label: Linux ARM64
runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
binary: target/aarch64-unknown-linux-gnu/release/bitengine
deps: linux

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Linux GUI dependencies
if: matrix.deps == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libx11-dev libxkbcommon-dev libwayland-dev libegl1-mesa-dev \
libgtk-3-dev

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Release build
run: cargo build --release
run: cargo build --release --target ${{ matrix.target }}

- name: Verify binary exists
shell: bash
run: test -f "${{ matrix.binary }}"
186 changes: 121 additions & 65 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,47 @@ on:
permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
target: aarch64-apple-darwin
arch: arm64
- os: macos-13
target: x86_64-apple-darwin
arch: x86_64
env:
RUSTC_WRAPPER: ""
CARGO_TERM_COLOR: always

runs-on: ${{ matrix.os }}
env:
RUSTC_WRAPPER: ""
jobs:
macos-arm64:
name: macOS Apple Silicon
runs-on: macos-14
timeout-minutes: 45

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

- name: Upload compiled binary
uses: actions/upload-artifact@v4
with:
name: bitengine-${{ matrix.arch }}
path: target/${{ matrix.target }}/release/bitcoin_node_manager
if-no-files-found: error

package:
name: Package universal app
runs-on: macos-14
needs: build
env:
RUSTC_WRAPPER: ""

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download arm64 binary
uses: actions/download-artifact@v4
with:
name: bitengine-arm64
path: /tmp/bitengine-release/arm64

- name: Download x86_64 binary
uses: actions/download-artifact@v4
with:
name: bitengine-x86_64
path: /tmp/bitengine-release/x86_64
run: cargo build --release --target aarch64-apple-darwin

- name: Assemble app bundle
shell: bash
run: |
set -euo pipefail

APP_ROOT="/tmp/bitengine-release/dist/BitEngine.app"
APP_NAME="BitEngine"
APP_EXECUTABLE="BitEngine"
APP_ROOT="dist/${APP_NAME}.app"
MACOS_DIR="$APP_ROOT/Contents/MacOS"
RESOURCES_DIR="$APP_ROOT/Contents/Resources"
SHORT_VERSION="${GITHUB_REF_NAME#v}"
BUILD_VERSION="${GITHUB_RUN_NUMBER}"

mkdir -p "$MACOS_DIR" "$RESOURCES_DIR"
mkdir -p "$MACOS_DIR" "$RESOURCES_DIR" out

cat > "$APP_ROOT/Contents/Info.plist" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -95,7 +61,7 @@ jobs:
<key>CFBundleDisplayName</key>
<string>BitEngine</string>
<key>CFBundleExecutable</key>
<string>BitEngine</string>
<string>${APP_EXECUTABLE}</string>
<key>CFBundleIdentifier</key>
<string>com.csd113.BitEngine</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -104,6 +70,8 @@ jobs:
<string>BitEngine</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleIconFile</key>
<string>app-icon</string>
<key>CFBundleShortVersionString</key>
<string>${SHORT_VERSION}</string>
<key>CFBundleVersion</key>
Expand All @@ -116,29 +84,117 @@ jobs:
</plist>
EOF

lipo -create \
/tmp/bitengine-release/arm64/bitcoin_node_manager \
/tmp/bitengine-release/x86_64/bitcoin_node_manager \
-output "$MACOS_DIR/BitEngine"
cp target/aarch64-apple-darwin/release/bitengine "$MACOS_DIR/$APP_EXECUTABLE"
chmod 755 "$MACOS_DIR/$APP_EXECUTABLE"
cp app-icon.icns "$RESOURCES_DIR/app-icon.icns"
codesign --deep --force --verify --sign - "$APP_ROOT"

file "$MACOS_DIR/$APP_EXECUTABLE" | tee out/macos-arm64-file.txt
file "$MACOS_DIR/$APP_EXECUTABLE" | grep -E "arm64|aarch64"
plutil -lint "$APP_ROOT/Contents/Info.plist"
ditto -c -k --keepParent "$APP_ROOT" out/BitEngine-macos-arm64.zip

- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: BitEngine-macos-arm64.zip
path: out/BitEngine-macos-arm64.zip
if-no-files-found: error

linux:
name: Linux ${{ matrix.label }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- label: x64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: BitEngine-linux-x64.tar.gz
- label: arm64
runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
artifact: BitEngine-linux-arm64.tar.gz

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Linux GUI dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libx11-dev libxkbcommon-dev libwayland-dev libegl1-mesa-dev \
libgtk-3-dev

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

chmod +x "$MACOS_DIR/BitEngine"
codesign --force --deep --sign "-" "$APP_ROOT"
- name: Package executable
shell: bash
run: |
set -euo pipefail

mkdir -p "dist/BitEngine-${{ matrix.label }}" out
cp "target/${{ matrix.target }}/release/bitengine" "dist/BitEngine-${{ matrix.label }}/bitengine"
chmod 755 "dist/BitEngine-${{ matrix.label }}/bitengine"
cp README.md "dist/BitEngine-${{ matrix.label }}/README.md"

mkdir -p /tmp/bitengine-release/out
ditto -c -k --sequesterRsrc --keepParent \
"$APP_ROOT" \
"/tmp/bitengine-release/out/BitEngine-${SHORT_VERSION}.zip"
file "dist/BitEngine-${{ matrix.label }}/bitengine" | tee "out/${{ matrix.label }}-file.txt"
if [ "${{ matrix.label }}" = "arm64" ]; then
file "dist/BitEngine-${{ matrix.label }}/bitengine" | grep -E "aarch64|ARM aarch64"
else
file "dist/BitEngine-${{ matrix.label }}/bitengine" | grep -E "x86-64|x86_64"
fi

- name: Upload app artifact
tar -czf "out/${{ matrix.artifact }}" -C dist "BitEngine-${{ matrix.label }}"

- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: BitEngine-app
path: /tmp/bitengine-release/out/BitEngine-*.zip
name: ${{ matrix.artifact }}
path: out/${{ matrix.artifact }}
if-no-files-found: error

publish:
name: Publish GitHub release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs:
- macos-arm64
- linux

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
merge-multiple: true

- name: Verify artifact names
shell: bash
run: |
set -euo pipefail
test -f release-artifacts/BitEngine-macos-arm64.zip
test -f release-artifacts/BitEngine-linux-x64.tar.gz
test -f release-artifacts/BitEngine-linux-arm64.tar.gz
! compgen -G "release-artifacts/*macos*x64*" >/dev/null
! compgen -G "release-artifacts/*universal*" >/dev/null

- name: Publish GitHub release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: /tmp/bitengine-release/out/BitEngine-*.zip
files: release-artifacts/*
generate_release_notes: true
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.2 - 2026-05-15

- Renamed the app, config namespace, and packaged binary to `BitEngine`
- Bumped the crate and release version to `0.1.2`
- Added cross-platform support boundaries for macOS Apple Silicon, Linux x86_64, and Linux ARM64
- Replaced universal/macOS Intel release packaging with supported-platform artifacts only
- Updated documentation for platform config paths, binary names, and release artifacts

## 0.1.1 - 2026-04-11

- Split the UI into smaller rendering and update modules to reduce the size of `src/ui.rs`
Expand Down
Loading
Loading