Skip to content

cima/server: support the environment without ima enabled #27

cima/server: support the environment without ima enabled

cima/server: support the environment without ima enabled #27

name: Rust Code Scan
on:
push:
branches:
- main
paths:
- 'service/cima-server/**.rs'
- '.github/workflows/pr-check-rust.yaml'
pull_request:
paths:
- 'service/cima-server/**.rs'
- '.github/workflows/pr-check-rust.yaml'
workflow_dispatch:
jobs:
codescan:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v3
- name: Set up Rust action
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
- name: Install dependencies
run: |
sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y libcryptsetup-dev clang protobuf-compiler protobuf-c-compiler libprotobuf-c-dev libprotobuf-c1 build-essential pkg-config libssl-dev
wget https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip && unzip protoc-26.1-linux-x86_64.zip
sudo mv bin/protoc /usr/bin/protoc && sudo mv include/google/protobuf/* /usr/include/google/protobuf/
- name: Run cargo check
run: |
cd service/cima-server
cargo check
cargo fmt -- --check
cargo clippy
cargo install --locked cargo-deny
cargo deny check