Skip to content

Commit

Permalink
version/0.3.0 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
georglauterbach authored Dec 17, 2021
1 parent 186963e commit 817d53d
Show file tree
Hide file tree
Showing 85 changed files with 2,162 additions and 1,571 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: development
rebase-strategy: auto
schedule:
interval: weekly
reviewers:
- georglauterbach
assignees:
- georglauterbach
labels:
- area/ci
- kind/update
- priority/low
- meta/needs-triage
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches:
- master
- master,
- development
paths:
- .github/workflows/documentation.yml
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0

- name: Check if deploy is for a `v<major>.<minor>` tag version instead of `edge`
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -73,10 +73,10 @@ jobs:
needs: deployment
steps:
- name: Checkout the tagged commit (shallow clone)
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0

- name: Checkout the documentation deployment branch to a subdirectory
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.4.0
with:
ref: gh-pages
path: gh-pages
Expand Down
106 changes: 43 additions & 63 deletions .github/workflows/kernel-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,102 +4,82 @@ name: Kernel Code Tests
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
paths: [modules/**]
paths:
- .github/workflows/kernel-tests.yml
- kernel/**
branches: ['*']
push:
paths: [kernel/**]
branches: [master]

defaults:
run:
shell: bash
working-directory: modules
working-directory: kernel

env:
BUILD_FLAGS: >
-Z build-std=core,compiler_builtins,alloc
-Z build-std-features=compiler-builtins-mem
BUILD_TARGET_PATH: --target targets/x86_64-unknown-none.json

jobs:
linting:
name: Lint the kernel code
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1.0.6
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: nightly-2021-12-02
toolchain: nightly-2021-12-10
override: true
components: rustfmt, clippy

- name: Run `cargo clippy`
run: cargo fmt --all --message-format human -- --check
continue-on-error: true
- name: Install Rustup Components
run: rustup component add rust-src llvm-tools-preview

- name: Run `cargo check`
run: cargo check ${{ env.BUILD_TARGET_PATH }} ${{ env.BUILD_FLAGS }}

- name: Run `cargo fmt`
run: cargo clippy --all-targets --all-features -- -D warnings
continue-on-error: true
run: cargo fmt --all --message-format human -- --check

- name: Run `cargo clippy` for `boot` module
run: cargo clippy --package boot --all-features -- -D warnings

- name: Run `cargo clippy` for kernel
run: cargo clippy --lib --all-features -- -D warnings

unit-and-integration-tests:
name: Run all unit- and integration-tests
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1.0.6
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: nightly-2021-12-02
toolchain: nightly-2021-12-10
override: true

- name: List changed files
uses: jitterbit/get-changed-files@v1
id: changed-files
with:
format: space-delimited

# yamllint enable rule:line-length
- name: Work with the changed files
continue-on-error: true
run: |
declare -a MODULES CHANGED_MODULES
echo 'Enumerating all changed files in the kernel.'
while read -r FILE
do
MODULE="${FILE#./}"
[[ -n ${MODULE} ]] && MODULES+=("${MODULE}")
done < <(find ./ -maxdepth 1 -type d)
echo "All found kernel modules: ${MODULES[*]}"
# shellcheck disable=SC2043
for FILE in ${{ steps.changed-files.outputs.all }}
do
grep -qv 'modules' <<< "${FILE}" && continue
echo "Changed: ${FILE}"
for MODULE in "${MODULES[@]}"
do
if grep -q "${MODULE}" <<< "${FILE}"
then
if [[ ! " ${CHANGED_MODULES[*]} " =~ ${MODULE} ]]
then
CHANGED_MODULES+=("${MODULE}")
fi
fi
done
done
echo "Modules changed by this PR: ${CHANGED_MODULES[*]}"
for MODULE in "${CHANGED_MODULES[@]}"
do
# cargo check --package "${MODULE}"
# cargo test --package "${MODULE}"
:
done
# cargo test --package kernel --test '*'
- name: Install Rustup Components
run: rustup component add rust-src llvm-tools-preview

- name: Install QEMU
run: sudo apt update && sudo apt install qemu-system-x86

- name: Print QEMU version
run: qemu-system-x86_64 --version

- name: Run `cargo test`
run: cargo test --tests ${{ env.BUILD_TARGET_PATH }} ${{ env.BUILD_FLAGS }}
9 changes: 6 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: Linting
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
branches: ['*']
push:
branches: ['*']

defaults:
run:
Expand All @@ -15,7 +18,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
Expand All @@ -30,7 +33,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
- name: Run YAMLLint
uses: ibiqlik/action-yamllint@v3.1.0
with:
Expand All @@ -44,7 +47,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
paths:
- modules/**/Cargo.toml
- modules/**/Cargo.lock
- kernel/**/Cargo.toml
- kernel/**/Cargo.lock
- .github/workflows/security.yml
schedule:
- cron: 0 0 * * 6

defaults:
run:
shell: bash
working-directory: modules
working-directory: kernel

jobs:
cargo-audit:
name: Audit Cargo.lock
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1.0.6
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: nightly-2021-12-02
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ documentation/site
# ---- Rust -----------------------------------
# -----------------------------------------------

modules/**/target/
kernel/target/

modules/**/Cargo.lock
modules/**/*.rs.bk
kernel/**/Cargo.lock
kernel/**/*.rs.bk
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

## Major Version 0

### v0.3

#### v0.3.0

- major refactoring of kernel source code
- revised kernel code structure
- no individual kernel modules anymore
- sorted our compiler errors
- removed all compiler warnings
- `cargo clippy` now works without errors
- completed code documentation
- adjusted GitHub workflows accordingly
- unit-tests tests are now working
- improved GitHub workflows
- heavily extended and refactored documentation
- adjusted to new kernel structure
- added major sections

### v0.2

#### v0.2.0

- added GitHub workflows to enable a powerful CI
- added Dependabot for a better CI experience
- added individual actions for linting and U/I testing
- added stale action
- added (preliminary) documentation deployment action
- heavily revised the documentation
- corrected minor mistakes in miscellaneous files
- added a security policy
- adjusted formatting with `rustfmt`
- heavily adjusted linting

### v0.1

#### v0.1.0

- initial commit
Loading

0 comments on commit 817d53d

Please sign in to comment.