Skip to content

Translate to English #735

Translate to English

Translate to English #735

Workflow file for this run

name: Build
on:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false # Don't cancel other builds if one fails
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-x86_64
extension: ""
- os: macos-latest
target: x86_64-apple-darwin
name: macos-x86_64
extension: ""
- os: macos-latest
target: aarch64-apple-darwin
name: macos-aarch64
extension: ""
- os: windows-latest
target: x86_64-pc-windows-msvc
name: windows-x86_64
extension: ".exe"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Rust
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
# Install X11 and XCB development libraries
sudo apt-get install -y \
build-essential \
pkg-config \
libx11-dev \
libx11-xcb-dev \
libxcb1-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libxcb-render0-dev \
libxcb-render-util0-dev \
libxcb-randr0-dev \
libxcb-image0-dev \
libxcb-util-dev \
libxcb-cursor-dev \
libxcb-keysyms1-dev \
libxcb-icccm4-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev
# Debug output
echo "=== Checking X11-xcb availability ==="
pkg-config --exists x11-xcb && echo "✓ x11-xcb pkg-config found" || echo "✗ x11-xcb pkg-config missing"
pkg-config --libs x11-xcb 2>/dev/null && echo "✓ x11-xcb libs available" || echo "✗ x11-xcb libs not found"
echo "=== Library search ==="
find /usr -name "*X11-xcb*" 2>/dev/null | head -5 || echo "No X11-xcb files found"
ldconfig -p | grep -i x11 | grep -i xcb || echo "X11-xcb not in ldconfig"
echo "=== Environment for build ==="
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
- name: Build
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
with:
command: build
args: --locked --release --target ${{ matrix.target }}
- name: Package Binary
shell: bash
run: |
mkdir -p release
cp "target/${{ matrix.target }}/release/code-assistant${{ matrix.extension }}" release/
cd release
# Windows runner has no 'zip' installed
if [ "${{ matrix.os }}" = "windows-latest" ]; then
# PowerShell Compress-Archive instead of zip
powershell -Command "Compress-Archive -Path ./code-assistant${{ matrix.extension }} -DestinationPath ./code-assistant-${{ matrix.name }}.zip"
else
# Linux/macOS: standard zip
zip code-assistant-${{ matrix.name }}.zip "code-assistant${{ matrix.extension }}"
fi
- name: Upload Nightly Artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: code-assistant-${{ matrix.name }}
path: release/code-assistant-${{ matrix.name }}.zip
retention-days: 30