Initialize IKT218 2026 OSDEV Base

This commit is contained in:
kmltrgyclk
2026-01-26 02:38:32 +01:00
commit 6646b57def
47 changed files with 2765 additions and 0 deletions

187
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,187 @@
name: Docker Image CI
on:
workflow_dispatch:
jobs:
build-bochs-builder:
runs-on: [ubuntu-latest]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: Get short SHA
id: short-sha
uses: benjlevesque/short-sha@v2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push - Bochs Builder
uses: docker/build-push-action@v5
with:
context: .devcontainer
platforms: linux/amd64,linux/arm64
file: .devcontainer/Dockerfile
target: bochs-builder
push: true
tags: ghcr.io/${{ github.repository }}/bochs-builder:${{ steps.short-sha.outputs.sha }}
build-gcc-builder:
runs-on: [ubuntu-latest]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: Get short SHA
id: short-sha
uses: benjlevesque/short-sha@v2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push - GCC Builder
uses: docker/build-push-action@v5
with:
context: .devcontainer
platforms: linux/amd64,linux/arm64
file: .devcontainer/Dockerfile
target: gcc-builder
push: true
tags: ghcr.io/${{ github.repository }}/gcc-builder:${{ steps.short-sha.outputs.sha }}
build-devcontainer:
runs-on: [ubuntu-latest]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: Get short SHA
id: short-sha
uses: benjlevesque/short-sha@v2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push - Devcontainer
uses: docker/build-push-action@v5
with:
context: .devcontainer
platforms: linux/amd64,linux/arm64
file: .devcontainer/Dockerfile
target: devcontainer
push: true
tags: ghcr.io/${{ github.repository }}/devcontainer:${{ steps.short-sha.outputs.sha }}
build-devcontainer-webgui:
runs-on: [ubuntu-latest]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: Get short SHA
id: short-sha
uses: benjlevesque/short-sha@v2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push - Devcontainer with WebGUI
uses: docker/build-push-action@v5
with:
context: .devcontainer
platforms: linux/amd64,linux/arm64
file: .devcontainer/Dockerfile
target: devcontainer-webgui
push: true
tags: ghcr.io/${{ github.repository }}/devcontainer-webgui:${{ steps.short-sha.outputs.sha }}

View File

@@ -0,0 +1,67 @@
name: Deploy operating systems
on:
# Runs on pushes targeting the default branch
workflow_run:
workflows: [ "Operating Systems Pipeline" ]
branches: [ "master" ]
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: python3 -m pip install .github/web
- name: Build with Python and Jinja2
run: mkdir -p ./_site && python3 .github/web/web/compile.py
- name: Copy static files to _site
run: cp -r .github/web/web/static/* ./_site
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

View File

@@ -0,0 +1,78 @@
name: Pull Request Check
on: [pull_request]
jobs:
check-modified-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check modified files
run: |
echo "Fetching origin/${{ github.base_ref }}"
git fetch origin ${{ github.base_ref }}
echo "Checking for changes outside 'build/' and 'src/' directories"
OUTSIDE_CHANGE=$(git diff --name-only origin/${{ github.base_ref }} | grep -vE '^(build/|src/)' | tr -d '[:space:]')
if [ ! -z "$OUTSIDE_CHANGE" ]; then
echo "Error: Pull Request contains changes outside 'build/' and 'src/' directories."
echo "The following files/directories are outside the allowed paths:"
echo "$OUTSIDE_CHANGE"
exit 1
else
echo "No changes outside 'build/' and 'src/' directories. Proceeding with the workflow."
exit 0
fi
- name: Check group_name folder modifications
run: |
echo "Fetching origin/${{ github.base_ref }}"
git fetch origin ${{ github.base_ref }}
echo "Listing changed files from origin/${{ github.base_ref }}"
CHANGED_FILES_LIST=$(git diff --name-only origin/${{ github.base_ref }})
echo "List of changed files:"
echo "$CHANGED_FILES_LIST"
echo "Filtering changed files for specific directories"
if echo "$CHANGED_FILES_LIST" | grep -E '^build/group_name|^src/group_name'; then
echo "Error: Changes detected in restricted directories ('build/group_name' or 'src/group_name')."
echo "Please ensure that your pull request does not modify files in these directories."
echo "The following files triggered this error:"
echo "$CHANGED_FILES_LIST" | grep -E '^build/group_name|^src/group_name'
exit 1
else
echo "No changes in restricted directories detected. Proceeding with the workflow."
exit 0
fi
- name: Check for newly created files in src/ and build/
run: |
echo "Checking for newly created files in 'src/' and 'build/' directories"
# Fetch the base branch
git fetch origin ${{ github.base_ref }}
# List only newly created files, excluding directories
NEW_FILES=$(git diff --name-only --diff-filter=A origin/${{ github.base_ref }} | grep -E '^(build/|src/)[^/]+$' | tr -d '[:space:]')
echo "List of new files:"
echo "$NEW_FILES"
if [ ! -z "$NEW_FILES" ]; then
echo "Error: New files have been created in 'src/' or 'build/' directories."
echo "Creating new files in these directories is not allowed in this workflow."
echo "The following files triggered this error:"
echo "$NEW_FILES"
exit 1
else
echo "No new files in 'src/' or 'build/' directories. Proceeding with the workflow."
exit 0
fi