From 5e099ecb5bd0de5448b3d567e1f8fbc2b5b98c62 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:43:48 +0800 Subject: [PATCH] ci: Build the remote development server for release and check its Linux build --- .github/workflows/ci.yml | 15 ++++++++++++++ .github/workflows/release.yml | 37 ++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4135e1b3..e7d766fe8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,21 @@ jobs: if: runner.os == 'Linux' run: pnpm gen:bindings && git diff --exit-code src/bindings.ts + # The remote development server ships as a static Linux binary (release.yml): + # keep that build working. + server: + name: Remote server (linux musl) + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: { targets: x86_64-unknown-linux-musl } + - uses: Swatinem/rust-cache@v2 + with: { key: server-musl } + - run: sudo apt-get update && sudo apt-get install -y musl-tools + - run: cargo build --locked -p ide-host --bin openidea-server --target x86_64-unknown-linux-musl + - run: target/x86_64-unknown-linux-musl/debug/openidea-server --version + frontend: name: Frontend runs-on: ubuntu-22.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e2a1765b..035395773 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -131,8 +131,43 @@ jobs: gh release upload "$TAG" "$dmg" --clobber done + # The remote development server, per host platform it can run on. The desktop + # app downloads the one for the host (ide-tools `server`) and installs it over SSH. + # Linux builds are static (musl), so they run whatever the host's glibc. + server: + needs: create-release + name: Server (${{ matrix.os }}-${{ matrix.arch }}) + strategy: + fail-fast: false + matrix: + include: + - { runner: ubuntu-22.04, target: x86_64-unknown-linux-musl, os: linux, arch: x86_64 } + - { runner: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl, os: linux, arch: aarch64 } + - { runner: macos-latest, target: aarch64-apple-darwin, os: macos, arch: aarch64 } + - { runner: macos-latest, target: x86_64-apple-darwin, os: macos, arch: x86_64 } + runs-on: ${{ matrix.runner }} + steps: + - uses: actions/checkout@v4 + with: { ref: "${{ env.TAG }}" } + - uses: dtolnay/rust-toolchain@stable + with: { targets: "${{ matrix.target }}" } + - uses: Swatinem/rust-cache@v2 + with: { key: "server-${{ matrix.target }}" } + - name: musl toolchain + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y musl-tools + - run: cargo build --release --locked -p ide-host --bin openidea-server --target ${{ matrix.target }} + - name: Upload + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ASSET: openidea-server-${{ matrix.os }}-${{ matrix.arch }}.gz + run: | + gzip -9 -c target/${{ matrix.target }}/release/openidea-server > "$ASSET" + if command -v sha256sum >/dev/null; then sha256sum "$ASSET"; else shasum -a 256 "$ASSET"; fi > "$ASSET.sha256" + gh release upload "$TAG" "$ASSET" "$ASSET.sha256" --clobber + publish: - needs: [create-release, build] + needs: [create-release, build, server] runs-on: ubuntu-latest steps: - uses: actions/github-script@v7