This repository was archived by the owner on Jun 5, 2026. It is now read-only.
Repository navigation
Fix macOS CI packaging and update workflow Node version #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_VERSION: 26.1.0 | |
| jobs: | |
| macos-arm64: | |
| name: macOS Apple Silicon checks | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Verify Node | |
| run: node --version | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| targets: aarch64-apple-darwin | |
| - name: Format | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Build release binary | |
| run: cargo build --release --target aarch64-apple-darwin | |
| - name: Package macOS app bundle | |
| env: | |
| BINARY_PATH: ${{ github.workspace }}/target/aarch64-apple-darwin/release/bitforge | |
| OUTPUT_DIR: ${{ runner.temp }}/bitforge-ci | |
| run: ./scripts/package_macos_app.sh | |
| - name: Verify macOS app bundle | |
| run: | | |
| APP_DIR="${RUNNER_TEMP}/bitforge-ci/BitForge.app" | |
| test -f "$APP_DIR/Contents/Info.plist" | |
| test -x "$APP_DIR/Contents/MacOS/BitForge" | |
| test -f "$APP_DIR/Contents/Resources/app-icon.icns" | |
| plutil -lint "$APP_DIR/Contents/Info.plist" | |
| test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIconFile' "$APP_DIR/Contents/Info.plist")" = "app-icon" | |
| file "$APP_DIR/Contents/MacOS/BitForge" | grep -E "arm64|aarch64" | |
| linux: | |
| name: Linux ${{ matrix.arch }} checks | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| arch: x64 | |
| - runner: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| arch: arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Verify Node | |
| run: node --version | |
| - name: Install Linux build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| pkg-config \ | |
| cmake \ | |
| git \ | |
| clang \ | |
| libclang-dev \ | |
| libevent-dev \ | |
| libx11-dev \ | |
| libxcb1-dev \ | |
| libxcursor-dev \ | |
| libxrandr-dev \ | |
| libxi-dev \ | |
| libxkbcommon-dev \ | |
| libwayland-dev \ | |
| libudev-dev \ | |
| libdbus-1-dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| targets: ${{ matrix.target }} | |
| - name: Format | |
| if: matrix.arch == 'x64' | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets --all-features --target ${{ matrix.target }} -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace --all-features --target ${{ matrix.target }} | |
| - name: Build release binary | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Verify Linux binary architecture | |
| run: | | |
| file "target/${{ matrix.target }}/release/bitforge" | |
| if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then | |
| file "target/${{ matrix.target }}/release/bitforge" | grep -E "ARM aarch64|ARM64|aarch64" | |
| else | |
| file "target/${{ matrix.target }}/release/bitforge" | grep -E "x86-64|x86_64" | |
| fi |