Install clang-format in the Docker container

This commit is contained in:
Ruihan Li 2024-03-16 00:46:36 +08:00 committed by Tate, Hongliang Tian
parent b49e11a25e
commit 60cd65d837
8 changed files with 22 additions and 16 deletions

View File

@ -10,9 +10,9 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
container: asterinas/asterinas:0.4.0 container: asterinas/asterinas:0.4.1
steps: steps:
- run: echo "Running in asterinas/asterinas:0.4.0" - run: echo "Running in asterinas/asterinas:0.4.1"
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -23,9 +23,9 @@ jobs:
unit-test: unit-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
container: asterinas/asterinas:0.4.0 container: asterinas/asterinas:0.4.1
steps: steps:
- run: echo "Running in asterinas/asterinas:0.4.0" - run: echo "Running in asterinas/asterinas:0.4.1"
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -42,9 +42,9 @@ jobs:
integration-test: integration-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
container: asterinas/asterinas:0.4.0 container: asterinas/asterinas:0.4.1
steps: steps:
- run: echo "Running in asterinas/asterinas:0.4.0" - run: echo "Running in asterinas/asterinas:0.4.1"
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -12,7 +12,7 @@ jobs:
osdk-publish: osdk-publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
container: asterinas/asterinas:0.4.0 container: asterinas/asterinas:0.4.1
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: katyo/publish-crates@v2 - uses: katyo/publish-crates@v2

View File

@ -15,9 +15,9 @@ jobs:
osdk-test: osdk-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
container: asterinas/asterinas:0.4.0 container: asterinas/asterinas:0.4.1
steps: steps:
- run: echo "Running in asterinas/asterinas:0.4.0" - run: echo "Running in asterinas/asterinas:0.4.1"
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -51,7 +51,7 @@ git clone https://github.com/asterinas/asterinas
2. Run a Docker container as the development environment. 2. Run a Docker container as the development environment.
```bash ```bash
docker run -it --privileged --network=host --device=/dev/kvm -v ./asterinas:/root/asterinas asterinas/asterinas:0.4.0 docker run -it --privileged --network=host --device=/dev/kvm -v ./asterinas:/root/asterinas asterinas/asterinas:0.4.1
``` ```
3. Inside the container, go to the project folder to build and run Asterinas. 3. Inside the container, go to the project folder to build and run Asterinas.

View File

@ -48,7 +48,7 @@ git clone https://github.com/asterinas/asterinas
2. 运行一个作为开发环境的Docker容器。 2. 运行一个作为开发环境的Docker容器。
```bash ```bash
docker run -it --privileged --network=host --device=/dev/kvm -v ./asterinas:/root/asterinas asterinas/asterinas:0.4.0 docker run -it --privileged --network=host --device=/dev/kvm -v ./asterinas:/root/asterinas asterinas/asterinas:0.4.1
``` ```
3. 在容器内,进入项目文件夹构建并运行星绽。 3. 在容器内,进入项目文件夹构建并运行星绽。

View File

@ -1 +1 @@
0.4.0 0.4.1

View File

@ -1,6 +1,6 @@
[package] [package]
name = "cargo-osdk" name = "cargo-osdk"
version = "0.4.0" version = "0.4.1"
edition = "2021" edition = "2021"
description = "Accelerate OS development with Asterinas OSDK" description = "Accelerate OS development with Asterinas OSDK"
license = "MPL-2.0" license = "MPL-2.0"

View File

@ -1,22 +1,27 @@
# SPDX-License-Identifier: MPL-2.0 # SPDX-License-Identifier: MPL-2.0
#= Install packages for Docker building ====================================
FROM ubuntu:22.04 as build-base FROM ubuntu:22.04 as build-base
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
# Please keep the list sorted by name
RUN apt update && apt-get install -y --no-install-recommends \ RUN apt update && apt-get install -y --no-install-recommends \
build-essential \ build-essential \
ca-certificates \ ca-certificates \
curl \ curl \
git-core \ git-core \
gnupg \
libssl-dev \ libssl-dev \
python-is-python3 \
python3-pip \ python3-pip \
wget \ python-is-python3 \
gnupg wget
#= Build benchmark ========================================================= #= Build benchmark =========================================================
FROM build-base as build-benchmarks FROM build-base as build-benchmarks
# Download the source files of benchmarks # Download the source files of benchmarks
@ -219,6 +224,7 @@ FROM rust
# Install all Asterinas dependent packages # Install all Asterinas dependent packages
RUN apt update && apt-get install -y --no-install-recommends \ RUN apt update && apt-get install -y --no-install-recommends \
clang-format `# formatting regression tests` \
cpio \ cpio \
cpuid \ cpuid \
exfatprogs \ exfatprogs \