ci: add Linux Docker build environment
- Ubuntu 22.04 + webkit2gtk-4.1 + librsvg2 + nodejs + rustup + tauri-cli - docker-compose: 绑定源码到 /workspace, 持久化 cargo/target 缓存 - 与 GH Actions ubuntu-latest job 依赖保持一致
This commit is contained in:
1 parent
6a8b09ef35
commit
0dbe2ba88c
2 files changed
+51
No files matched your search
+38
@@ -0,0 +1,38 @@
|
|||||||
|
# Build Kimi Switch Linux packages (deb / AppImage / rpm) inside a clean
|
||||||
|
# Ubuntu 22.04 container. Used both locally (`docker compose run`) and as a
|
||||||
|
# reference for GH Actions' ubuntu-latest job.
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV CARGO_TERM_COLOR=always
|
||||||
|
ENV RUSTUP_HOME=/usr/local/rustup
|
||||||
|
ENV CARGO_HOME=/usr/local/cargo
|
||||||
|
ENV PATH=/usr/local/cargo/bin:$PATH
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
git \
|
||||||
|
build-essential \
|
||||||
|
pkg-config \
|
||||||
|
libssl-dev \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libayatana-appindicator3-dev \
|
||||||
|
librsvg2-dev \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
libsoup-3.0-dev \
|
||||||
|
libjavascriptcoregtk-4.1-dev \
|
||||||
|
patchelf \
|
||||||
|
file \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
python3 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
|
|
||||||
|
RUN cargo install tauri-cli --version "^2.0" --locked
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
CMD ["/bin/bash"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
build-linux:
|
||||||
|
build: .
|
||||||
|
container_name: kimiswitch-build-linux
|
||||||
|
volumes:
|
||||||
|
- .:/workspace
|
||||||
|
- cargo-cache:/usr/local/cargo/registry
|
||||||
|
- target-cache:/workspace/src-tauri/target
|
||||||
|
working_dir: /workspace
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
cargo-cache:
|
||||||
|
target-cache:
|
||||||
Reference in new issue
Block a user