fix final_doc #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build CI | |
on: [push, pull_request] | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rust-src, clippy, rustfmt | |
- name: Run cargo clippy for the default target | |
run: cargo clippy --all-features | |
- name: Check code format | |
run: cargo fmt --all -- --check | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
arch: [x86_64, riscv64, aarch64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rust-src, clippy, llvm-tools-preview | |
- uses: actions-rs/[email protected] | |
with: | |
crate: cargo-binutils | |
version: latest | |
use-tool-cache: true | |
- name: Download musl toolchain | |
run: | | |
if [ "${{ matrix.arch }}" = "x86_64" ]; then | |
export MUSL_PATH="x86_64-linux-musl-cross" | |
elif [ "${{ matrix.arch }}" = "aarch64" ]; then | |
export MUSL_PATH="aarch64-linux-musl-cross" | |
elif [ "${{ matrix.arch }}" = "riscv64" ]; then | |
export MUSL_PATH="riscv64-linux-musl-cross" | |
fi | |
wget https://musl.cc/$MUSL_PATH.tgz | |
tar -xf $MUSL_PATH.tgz | |
mv $MUSL_PATH musl | |
echo "$PWD/musl/bin" >> $GITHUB_PATH | |
- name: Run cargo clippy for ${{ matrix.arch }} | |
run: make ARCH=${{ matrix.arch }} clippy | |
- name: Build helloworld | |
run: make ARCH=${{ matrix.arch }} A=apps/helloworld | |
- name: Build memtest | |
run: make ARCH=${{ matrix.arch }} A=apps/memtest | |
- name: Build exception | |
run: make ARCH=${{ matrix.arch }} A=apps/exception | |
- name: Build display | |
run: make ARCH=${{ matrix.arch }} A=apps/display GRAPHIC=y | |
- name: Build task/yield | |
run: make ARCH=${{ matrix.arch }} A=apps/task/yield | |
- name: Build task/parallel | |
run: make ARCH=${{ matrix.arch }} A=apps/task/parallel | |
- name: Build task/sleep | |
run: make ARCH=${{ matrix.arch }} A=apps/task/sleep | |
- name: Build fs/shell | |
run: make ARCH=${{ matrix.arch }} A=apps/fs/shell FS=y | |
- name: Build net/echoserver | |
run: make ARCH=${{ matrix.arch }} A=apps/net/echoserver NET=y | |
- name: Build net/httpclient | |
run: make ARCH=${{ matrix.arch }} A=apps/net/httpclient NET=y | |
- name: Build net/httpserver | |
run: make ARCH=${{ matrix.arch }} A=apps/net/httpserver NET=y | |
- name: Build c/helloworld | |
run: make ARCH=${{ matrix.arch }} A=apps/c/helloworld | |
- name: Build c/memtest | |
run: make ARCH=${{ matrix.arch }} A=apps/c/memtest | |
- name: Build c/sqlite3 | |
run: make ARCH=${{ matrix.arch }} A=apps/c/sqlite3 | |
- name: Build c/httpclient | |
run: make ARCH=${{ matrix.arch }} A=apps/c/httpclient | |
- name: Build c/httpserver | |
run: make ARCH=${{ matrix.arch }} A=apps/c/httpserver | |
- name: Build c/udpserver | |
run: make ARCH=${{ matrix.arch }} A=apps/c/udpserver | |
- name: Build c/iperf | |
run: make ARCH=${{ matrix.arch }} A=apps/c/iperf |