Merge branch 'post-10' into post-11

This commit is contained in:
Philipp Oppermann
2020-07-17 11:30:14 +02:00
5 changed files with 113 additions and 66 deletions

View File

@@ -1,3 +1,6 @@
[unstable]
build-std = ["core", "compiler_builtins", "alloc"]
[build]
target = "x86_64-blog_os.json"

View File

@@ -12,9 +12,8 @@ on:
pull_request:
jobs:
test:
name: "Test"
check:
name: Check
strategy:
matrix:
platform: [
@@ -22,36 +21,48 @@ jobs:
macos-latest,
windows-latest
]
runs-on: ${{ matrix.platform }}
timeout-minutes: 15
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Install `rust-src` Rustup Component
run: rustup component add rust-src
- name: Run `cargo check`
uses: actions-rs/cargo@v1
with:
command: check
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
echo ::add-path::$HOME/.cargo/bin
if: runner.os == 'macOS'
- name: "Print Rust Version"
run: |
rustc -Vv
cargo -Vv
- name: "Install Rustup Components"
run: rustup component add rust-src llvm-tools-preview
- name: "Install cargo-xbuild"
run: cargo install cargo-xbuild --debug
- name: "Install bootimage"
test:
name: Test
strategy:
matrix:
platform: [
ubuntu-latest,
macos-latest,
windows-latest
]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Install bootimage
run: cargo install bootimage --debug
- name: "Run cargo xbuild"
run: cargo xbuild
- name: "Create Bootimage"
run: cargo bootimage
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Rustup Components
run: rustup component add rust-src llvm-tools-preview
- name: Run `cargo bootimage`
uses: actions-rs/cargo@v1
with:
command: bootimage
# install QEMU
- name: Install QEMU (Linux)
@@ -77,20 +88,44 @@ jobs:
- name: "Print QEMU Version"
run: qemu-system-x86_64 --version
- name: "Run cargo xtest"
run: cargo xtest
- name: Run `cargo test`
uses: actions-rs/cargo@v1
with:
command: test
check_formatting:
name: "Check Formatting"
name: Check Formatting
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v1
- name: "Use the latest Rust nightly with rustfmt"
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
toolchain: nightly
components: rustfmt
override: true
- run: cargo fmt -- --check
- name: Run `cargo fmt`
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: clippy, rust-src
override: true
- name: Run `cargo clippy`
uses: actions-rs/cargo@v1
with:
command: clippy

11
Cargo.lock generated
View File

@@ -21,6 +21,7 @@ dependencies = [
"linked_list_allocator",
"pc-keyboard",
"pic8259_simple",
"rlibc",
"spin",
"uart_16550",
"volatile",
@@ -29,9 +30,9 @@ dependencies = [
[[package]]
name = "bootloader"
version = "0.9.3"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44ac0bdf4930c3c4d7f0d04eb6f15d7dcb9d5972b1ff9cd2bee0128112260fc7"
checksum = "0ad686b9b47363de7d36c05fb6885f17d08d0f2d15b1bc782a101fe3c94a2c7c"
[[package]]
name = "cpuio"
@@ -81,6 +82,12 @@ dependencies = [
"cpuio",
]
[[package]]
name = "rlibc"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe"
[[package]]
name = "scopeguard"
version = "1.1.0"

View File

@@ -13,7 +13,8 @@ name = "stack_overflow"
harness = false
[dependencies]
bootloader = { version = "0.9.3", features = ["map_physical_memory"]}
bootloader = { version = "0.9.8", features = ["map_physical_memory"]}
rlibc = "1.0.0"
volatile = "0.2.6"
spin = "0.5.2"
x86_64 = "0.11.0"

View File

@@ -9,6 +9,7 @@
#![reexport_test_harness_main = "test_main"]
extern crate alloc;
extern crate rlibc;
use core::panic::PanicInfo;