Skip to content

Commit

Permalink
Rework CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Jun 24, 2021
1 parent f096a48 commit 54b2020
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 223 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/format.yml
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
44 changes: 0 additions & 44 deletions .github/workflows/kvm.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/kvm_test.yml
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 --git https://github.com/hermitcore/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
61 changes: 0 additions & 61 deletions .github/workflows/publish.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
- 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 }}
Loading

0 comments on commit 54b2020

Please sign in to comment.