Add protobuf compiler to CI and Docker build
This commit is contained in:
parent
75b3b92adc
commit
82f97deeb2
2 changed files with 5 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ test:
|
||||||
stage: test
|
stage: test
|
||||||
image: rust:1.83-alpine
|
image: rust:1.83-alpine
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache musl-dev
|
- apk add --no-cache musl-dev protobuf-dev
|
||||||
- rustup component add rustfmt clippy
|
- rustup component add rustfmt clippy
|
||||||
script:
|
script:
|
||||||
- cargo check --release
|
- cargo check --release
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,11 @@ FROM rust:1.83-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN apk add --no-cache musl-dev
|
RUN apk add --no-cache musl-dev protobuf-dev
|
||||||
|
|
||||||
# Copy manifests
|
# Copy manifests and build files
|
||||||
COPY Cargo.toml Cargo.lock ./
|
COPY Cargo.toml Cargo.lock build.rs ./
|
||||||
|
COPY proto ./proto
|
||||||
|
|
||||||
# Create a dummy main.rs to build dependencies
|
# Create a dummy main.rs to build dependencies
|
||||||
RUN mkdir src && echo "fn main() {}" > src/main.rs
|
RUN mkdir src && echo "fn main() {}" > src/main.rs
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue