<commit_before>---

name: CI
"on":
  push:
    paths-ignore:
      - 'docs/**'
      - 'dbgenv_config/**'
      - '**.md'
env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1
  KERNEL_FEATURES: self-test
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install APT packages
        run: |
          sudo apt-get update \
          && sudo apt-get install -y nasm binutils ninja-build

      - name: Install latest nightly
        uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          override: true
          components: rustfmt, clippy, rust-src

      - name: Install tooling
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --check

      - uses: actions/setup-python@v2
        with:
          python-version: '3.8'

      - name: "Install pip packages"
        run: python3 -m pip install toml types-toml natsort mypy

      - name: Clone constcodegen
        uses: actions/checkout@v2
        with:
          repository: Dentosal/constcodegen
          path: ./constcodegen

      - uses: actions/cache@v2
        id: cache-constcodegen
        with:
          path: ~/.cargo/bin/constcodegen
          key: ${{ hashFiles('./constcodegen/Cargo.toml') }}-${{ hashFiles('./constcodegen/src/**') }}

      - name: Build constcodegen
        if: steps.cache-constcodegen.outputs.cache-hit != 'true'
        working-directory: ./constcodegen
        run: cargo install --path . --force

      - run: python3 -m mypy build_config/configure.py

      - run: python3 build_config/configure.py && ninja

      - name: Run cargo fmt --check
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --check

      - name: Run cargo clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy

      - name: Run cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test<commit_msg>Rust kernel self-test in CI<commit_after>---

name: CI
"on":
  push:
    paths-ignore:
      - 'docs/**'
      - 'dbgenv_config/**'
      - '**.md'
env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1
  KERNEL_FEATURES: self-test
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install APT packages
        run: |
          sudo apt-get update \
          && sudo apt-get install -y nasm binutils ninja-build qemu-system

      - name: Install latest nightly
        uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          override: true
          components: rustfmt, clippy, rust-src

      - name: Install tooling
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --check

      - uses: actions/setup-python@v2
        with:
          python-version: '3.8'

      - name: "Install pip packages"
        run: python3 -m pip install toml types-toml natsort mypy

      - name: Clone constcodegen
        uses: actions/checkout@v2
        with:
          repository: Dentosal/constcodegen
          path: ./constcodegen

      - uses: actions/cache@v2
        id: cache-constcodegen
        with:
          path: ~/.cargo/bin/constcodegen
          key: ${{ hashFiles('./constcodegen/Cargo.toml') }}-${{ hashFiles('./constcodegen/src/**') }}

      - name: Build constcodegen
        if: steps.cache-constcodegen.outputs.cache-hit != 'true'
        working-directory: ./constcodegen
        run: cargo install --path . --force

      - run: python3 -m mypy build_config/configure.py

      - run: python3 build_config/configure.py && ninja

      - name: Run cargo fmt --check
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --check

      - name: Run cargo clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy

      - name: Run cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test

      - name: Run OS self-test
        run: |
          qemu-system-x86_64 -cpu max -smp 4 -m 4G -no-reboot -display none \
            -drive file=build/disk.img,format=raw,if=ide \
            -nic none \
            -serial file:qemu.log
          grep "Self-test successful" qemu.log || exit 1
        timeout-minutes: 5
{'fraction_non_alphanumeric': 0.10904007455731593, 'fraction_numerical': 0.008853681267474371, 'mean_word_length': 1.6797752808988764, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7186182', 'n_tokens_mistral': 1367, 'n_tokens_neox': 1327, 'n_words': 339}