kernel/vmm: implement vmm page fault handling #99
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
name: Test Build | |
on: | |
push: | |
paths-ignore: [ 'docs/**' ] | |
pull_request: | |
paths-ignore: [ 'docs/**' ] | |
jobs: | |
cache-gcc-binaries: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check cache | |
id: check-cache | |
uses: actions/cache@v4 | |
with: | |
key: gcc-bins-2024-07-06 | |
path: | | |
toolchains/gcc-x86_64-cross | |
toolchains/gcc-riscv64-cross | |
toolchains/gcc-m68k-cross | |
- name: Download GCC | |
if: steps.check-cache.outputs.cache-hit != 'true' | |
run: > | |
mkdir toolchains; | |
cd toolchains; | |
wget https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64/tarballs/x86-64--glibc--stable-2024.02-1.tar.bz2 -O gcc-x86_64; | |
tar -vxf gcc-x86_64; mv x86-64--glibc--stable-2024.02-1 gcc-x86_64-cross; | |
wget https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64-lp64d/tarballs/riscv64-lp64d--glibc--stable-2024.02-1.tar.bz2 -O gcc-riscv64; | |
tar -vxf gcc-riscv64; mv riscv64-lp64d--glibc--stable-2024.02-1 gcc-riscv64-cross; | |
wget https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-68xxx/tarballs/m68k-68xxx--glibc--stable-2024.02-1.tar.bz2 -O gcc-m68k; | |
tar -vxf gcc-m68k; mv m68k-* gcc-m68k-cross | |
build-clang: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check cache | |
id: check-cache | |
uses: actions/cache@v4 | |
with: | |
key: clang-latest | |
path: | | |
toolchains/llvm-build | |
- name: Build Clang | |
if: steps.check-cache.outputs.cache-hit != 'true' | |
run: > | |
mkdir -p toolchains; | |
cd toolchains; | |
git clone --depth 1 https://github.com/llvm/llvm-project.git; | |
mkdir llvm-build; | |
cd llvm-build; | |
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_TARGETS="X86;RISCV" -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="M68k" ../llvm-project/llvm; | |
cmake --build . | |
run-build-tests: | |
runs-on: ubuntu-latest | |
needs: [ cache-gcc-binaries, build-clang ] | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ x86_64, riscv64, m68k ] | |
compiler: [ gcc, clang ] | |
steps: | |
- name: Download gcc | |
if: ${{ matrix.compiler == 'gcc' }} | |
uses: actions/cache@v4 | |
with: | |
fail-on-cache-miss: true | |
key: gcc-bins-2024-07-06 | |
path: | | |
toolchains/gcc-x86_64-cross | |
toolchains/gcc-riscv64-cross | |
toolchains/gcc-m68k-cross | |
- name: Download clang | |
if: ${{ matrix.compiler == 'clang' }} | |
uses: actions/cache@v4 | |
with: | |
fail-on-cache-miss: true | |
key: clang-latest | |
path: | | |
toolchains/llvm-build | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
path: 'repo' | |
- name: Compile (gcc) | |
if: ${{ matrix.compiler == 'gcc' }} | |
run: > | |
cd repo; | |
make clean binaries | |
CPU_ARCH=${{ matrix.arch }} | |
TOOLCHAIN=${{ matrix.compiler }} | |
X_CXX_BIN=$GITHUB_WORKSPACE/toolchains/gcc-${{ matrix.arch }}-cross/bin/${{ matrix.arch }}-buildroot-linux-gnu-g++ | |
X_AS_BIN=$GITHUB_WORKSPACE/toolchains/gcc-${{ matrix.arch }}-cross/bin/${{ matrix.arch }}-buildroot-linux-gnu-as | |
X_LD_BIN=$GITHUB_WORKSPACE/toolchains/gcc-${{ matrix.arch }}-cross/bin/${{ matrix.arch }}-buildroot-linux-gnu-ld | |
X_AR_BIN=$GITHUB_WORKSPACE/toolchains/gcc-${{ matrix.arch }}-cross/bin/${{ matrix.arch }}-buildroot-linux-gnu-ar | |
- name: Compile (clang) | |
if: ${{ matrix.compiler == 'clang' }} | |
run: > | |
cd repo; | |
make clean binaries | |
CPU_ARCH=${{ matrix.arch }} | |
TOOLCHAIN=${{ matrix.compiler }} | |
X_CXX_BIN="$GITHUB_WORKSPACE/toolchains/llvm-build/bin/clang++ --target=${{ matrix.arch }}-elf" | |
X_AS_BIN="$GITHUB_WORKSPACE/toolchains/llvm-build/bin/clang --target=${{ matrix.arch }}-elf -c" | |
X_LD_BIN="$GITHUB_WORKSPACE/toolchains/llvm-build/bin/ld.lld" | |
X_AR_BIN=$GITHUB_WORKSPACE/toolchains/llvm-build/bin/llvm-ar |