Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
charset = utf-8
end_of_line = lf
max_line_length = 80
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab

[*.{json,md,nix,toml,yml}]
indent_size = 2
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: phip1611
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
73 changes: 0 additions & 73 deletions .github/workflows/build.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# We auto-merge all dependabot updates as soon as the CI are met.
#
# More info: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions

name: Dependabot PR auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'rust-osdev/uart_16550'
steps:
- name: Approve
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
16 changes: 16 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: QA

on: [ pull_request, merge_group ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Executes "typos ."
- uses: crate-ci/typos@v1.41.0
115 changes: 115 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Build

on: [ pull_request, merge_group ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: "${{ matrix.runs-on }}"
strategy:
fail-fast: false
matrix:
runs-on:
- macos-latest
- ubuntu-latest
- windows-latest
rust:
- stable
- nightly
- 1.85.1 # MSVR
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "${{ matrix.rust }}"
targets: x86_64-unknown-linux-gnu,x86_64-unknown-uefi,i686-unknown-uefi,thumbv7em-none-eabihf,aarch64-unknown-uefi,riscv64gc-unknown-none-elf
- uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.runs-on }}-${{ matrix.rust }}"
- name: Build
run: cargo build --all-targets --verbose
- name: Build (no_std, x86, aarch64, riscv)
run: |
cargo build --verbose --target aarch64-unknown-uefi
cargo build --verbose --target i686-unknown-uefi
cargo build --verbose --target riscv64gc-unknown-none-elf
cargo build --verbose --target x86_64-unknown-uefi
- name: Build (no_std, aarch64)
run: cargo build --verbose --target thumbv7em-none-eabihf
- name: Run tests
run: cargo test --verbose

integration_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
key: "integration-test"
cache-directories:
./test/target
- name: Install QEMU
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-i386

- name: Verify QEMU installation
run: qemu-system-i386 --version
- name: Build
run: cd test && make
- name: Run
run: cd test && make run

miri:
runs-on: ubuntu-latest
needs:
# Logical dependency and wait for cache to be present
- build
strategy:
matrix:
rust:
- nightly
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "${{ matrix.rust }}"
- uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.rust }}"
- run: rustup component add miri
- run: cargo miri test --tests

style_checks:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "${{ matrix.rust }}"
- uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.rust }}"
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets
- name: Rustdoc
run: cargo doc --no-deps --document-private-items
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
/Cargo.lock
17 changes: 17 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configuration for the typos spell checker utility (<https://github.com/crate-ci/typos>).

[files]
extend-exclude = [
"test/link.ld"
]

[default]
extend-ignore-identifiers-re = [

]

[default.extend-words]
THR = "THR"

[default.extend-identifiers]

Loading