-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
119 additions
and
180 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,23 @@ | ||
name: Format check | ||
name: Format | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
- trying | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
name: Format check | ||
clippy: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust: [nightly] | ||
include: | ||
- os: ubuntu-latest | ||
rust: 'nightly' | ||
components: 'rustfmt' | ||
targets: 'x86_64-unknown-linux-gnu' | ||
|
||
|
||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
components: ${{ matrix.components || '' }} | ||
targets: ${{ matrix.targets || '' }} | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Check Formatting | ||
- uses: actions/checkout@v2 | ||
- name: Rustup (apply rust-toolchain.toml) | ||
run: rustup show | ||
- name: Format | ||
run: cargo fmt -- --check |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
name: Build docs | ||
name: Publish Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
- name: Install nightly toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: nightly | ||
components: rust-src | ||
override: true | ||
uses: actions/checkout@v2 | ||
- name: Rustup (apply rust-toolchain.toml) | ||
run: rustup show | ||
- name: Generate documentation | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: doc | ||
args: -Z build-std=core,alloc,panic_abort -Z build-std-features=compiler-builtins-mem --target x86_64-unknown-hermit-kernel.json | ||
run: cargo doc | ||
- name: Generate index.html | ||
run: | | ||
cat > target/x86_64-unknown-hermit-kernel/doc/index.html <<EOL | ||
|
@@ -42,7 +34,7 @@ jobs: | |
EOL | ||
- name: Deploy documentation | ||
if: success() | ||
uses: crazy-max/ghaction-github-pages@v2.5.0 | ||
uses: crazy-max/ghaction-github-pages@v2 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: target/x86_64-unknown-hermit-kernel/doc | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
- trying | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- name: Checkout rusty-hermit | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: hermitcore/rusty-hermit | ||
submodules: true | ||
- name: Remove libhermit-rs submodule | ||
run: git rm -r libhermit-rs | ||
- name: Checkout libhermit-rs | ||
uses: actions/checkout@v2 | ||
with: | ||
path: libhermit-rs | ||
- name: Rustup (apply rust-toolchain.toml) | ||
working-directory: libhermit-rs | ||
run: rustup show | ||
- name: Build minimal kernel | ||
working-directory: libhermit-rs | ||
run: cargo build --no-default-features | ||
- name: Build dev profile | ||
run: cargo build | ||
- name: Unittests on host (ubuntu) | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
working-directory: libhermit-rs | ||
run: cargo test --lib --target x86_64-unknown-linux-gnu | ||
- name: Install QEMU, NASM (ubuntu) | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install qemu-system-x86 nasm | ||
- name: Install QEMU, NASM (macos) | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
brew update | ||
brew install qemu nasm | ||
- name: Install QEMU, NASM, GNU make (windows) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
choco install qemu nasm make | ||
echo "C:\Program Files\qemu" >> $GITHUB_PATH | ||
echo "C:\Program Files\NASM" >> $GITHUB_PATH | ||
- name: Build loader | ||
run: | | ||
sed -i.old 's/OBJCOPY := $(shell find $(SYSROOT) -name llvm-objcopy)/OBJCOPY := $(shell find $(SYSROOT) -name llvm-objcopy -o -name llvm-objcopy.exe)/g' loader/Makefile | ||
make -C loader release=1 | ||
- name: Test dev profile | ||
run: | | ||
qemu-system-x86_64 -display none -smp 1 -m 128M -serial stdio \ | ||
-cpu qemu64,apic,fsgsbase,rdtscp,xsave,fxsr \ | ||
-kernel loader/target/x86_64-unknown-hermit-loader/release/rusty-loader \ | ||
-initrd target/x86_64-unknown-hermit/debug/rusty_demo | ||
- name: Integration tests (ubuntu) | ||
working-directory: libhermit-rs | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: cargo test --tests --no-fail-fast -- --bootloader_path=../loader/target/x86_64-unknown-hermit-loader/release/rusty-loader | ||
continue-on-error: true | ||
- name: Build release profile | ||
run: cargo build --release | ||
- name: Test release profile | ||
run: | | ||
qemu-system-x86_64 -display none -smp 1 -m 128M -serial stdio \ | ||
-cpu qemu64,apic,fsgsbase,rdtscp,xsave,fxsr \ | ||
-kernel loader/target/x86_64-unknown-hermit-loader/release/rusty-loader \ | ||
-initrd target/x86_64-unknown-hermit/release/rusty_demo |
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