-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
142: Rework CI r=stlankes a=mkroening I reworked this CI in similar to hermit-os/kernel#230. Co-authored-by: Martin Kröning <[email protected]>
- Loading branch information
Showing
7 changed files
with
159 additions
and
223 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
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 | ||
format: | ||
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/checkout@v2 | ||
- 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: KVM Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
- trying | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
kvm_test: | ||
name: KVM Test | ||
runs-on: [self-hosted] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Rustup (apply rust-toolchain.toml) | ||
run: rustup show | ||
- name: Build dev profile | ||
run: cargo build --package rusty_demo | ||
- name: Install uhyve | ||
run: cargo install uhyve --locked | ||
- name: Check KVM availability | ||
shell: bash | ||
run: | | ||
lscpu | ||
kvm-ok | ||
- name: Test debug version | ||
run: uhyve --verbose --cpus 1 target/x86_64-unknown-hermit/debug/rusty_demo | ||
env: | ||
RUST_LOG: debug | ||
- name: Build release profile | ||
run: cargo build --package rusty_demo --release | ||
- name: Test release version | ||
run: uhyve --verbose --cpus 1 target/x86_64-unknown-hermit/release/rusty_demo | ||
env: | ||
RUST_LOG: debug |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Publish Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
publish_docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Rustup (apply rust-toolchain.toml) | ||
run: rustup show | ||
- name: Generate documentation | ||
run: cargo doc | ||
- name: Generate index.html | ||
run: | | ||
cat > target/x86_64-unknown-hermit/doc/index.html <<EOL | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Redirect!</title> | ||
<meta http-equiv="refresh" content="0; url=https://hermitcore.github.io/rusty-hermit/hermit_abi/" /> | ||
</head> | ||
<body> | ||
<p><a href="https://hermitcore.github.io/rusty-hermit/hermit_abi/">Redirect</a></p> | ||
</body> | ||
</html> | ||
EOL | ||
- name: Deploy documentation | ||
if: success() | ||
uses: crazy-max/ghaction-github-pages@v1 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: target/x86_64-unknown-hermit/doc | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.