add top level LICENSE file so github/gitlab can detect license #66
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
# SPDX-FileCopyrightText: 2023 Rivos Inc. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install riscv64 target | |
run: rustup target add riscv64gc-unknown-none-elf | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Install rustfmt | |
run: rustup component add rustfmt | |
- name: Build | |
run: cargo build --release | |
- name: Lint | |
run: cargo clippy -- -D warnings -Wmissing-docs | |
- name: Format | |
run: cargo fmt -- --check --config format_code_in_doc_comments=true | |
- name: Run tests | |
run: cargo test | |
- name: Generate Docs | |
run: cargo doc |