Skip to content

Commit

Permalink
Meta: Update Documentation and CI for repo move
Browse files Browse the repository at this point in the history
  • Loading branch information
ADKaster authored and awesomekling committed Jun 3, 2024
1 parent dd1fbd3 commit 6d3a54e
Show file tree
Hide file tree
Showing 48 changed files with 125 additions and 1,277 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:1": {},
"./features/serenity": {
"./features/ladybird": {
"llvm_version": 18,
"enable_ladybird": true,
"enable_serenity": true
},
"ghcr.io/devcontainers/features/desktop-lite": {
"password": "vscode",
Expand Down
18 changes: 18 additions & 0 deletions .devcontainer/features/ladybird/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Ladybird Development",
"id": "ladybird",
"version": "2.0.0",
"description": "Enable development of Ladybird libraries and applications",
"options": {
"llvm_version": {
"type": "string",
"proposals": [
17,
18,
"trunk"
],
"default": 18,
"description": "Select LLVM compiler version to use"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ set -e
# Feature options

LLVM_VERSION=${LLVM_VERSION:-18}
ENABLE_LADYBIRD=${ENABLE_LADYBIRD:-true}
ENABLE_SERENITY=${ENABLE_SERENITY:-true}

### Check distro

if [ ! -f /etc/lsb-release ]; then
Expand All @@ -31,13 +28,7 @@ install_llvm_key() {
### Install packages

apt update -y
apt install -y build-essential cmake ninja-build ccache shellcheck
if [ "${ENABLE_LADYBIRD}" = "true" ]; then
apt install -y libgl1-mesa-dev qt6-base-dev qt6-tools-dev-tools qt6-wayland qt6-multimedia-dev
fi
if [ "${ENABLE_SERENITY}" = "true" ]; then
apt install -y curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs genext2fs qemu-system-gui qemu-system-x86 qemu-utils rsync unzip texinfo libssl-dev
fi
apt install -y build-essential cmake ninja-build ccache shellcheck libgl1-mesa-dev qt6-base-dev qt6-tools-dev-tools qt6-wayland qt6-multimedia-dev

### Ensure new enough host compiler is available

Expand Down
30 changes: 0 additions & 30 deletions .devcontainer/features/serenity/devcontainer-feature.json

This file was deleted.

4 changes: 2 additions & 2 deletions .devcontainer/optimized/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
// do not need to install all the prerequsite dependencies from scratch,
// getting you into your development environment faster!
{
"name": "SerenityOS (Pre-Built Image)",
"image": "ghcr.io/serenityos/serenity-devcontainer:base"
"name": "Ladybird (Pre-Built Image)",
"image": "ghcr.io/ladybirdwebbrowser/ladybird-devcontainer:base"
}
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
*.pgm binary
*.png binary
*.ppm binary

# Prevent port patches from being normalized
/Ports/**/patches/* -text
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/AK/CircularBuffer.* @timschumi
/AK/MaybeOwned.h @timschumi
/AK/*Stream.* @timschumi
/Kernel/Devices/Audio @GMTA
/Lagom/Tools/CodeGenerators/LibWeb @AtkinsSJ
/Ports @timschumi
/Tests/LibCompress @timschumi
/Toolchain @BertalanD
/Userland/Applications/Spreadsheet @alimpfard
Expand Down Expand Up @@ -34,10 +32,8 @@
/Userland/Services/RequestServer @alimpfard
/Userland/Services/SQLServer @trflynn89
/Userland/Services/WebDriver @trflynn89
/Userland/Shell @alimpfard
/Userland/Utilities/gzip.cpp @timschumi
/Userland/Utilities/lzcat.cpp @timschumi
/Userland/Utilities/readelf.cpp @BertalanD
/Userland/Utilities/sql.cpp @trflynn89
/Userland/Utilities/tar.cpp @timschumi
/Userland/Utilities/unzip.cpp @timschumi
Expand Down
80 changes: 0 additions & 80 deletions .github/actions/cache-restore/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,15 @@ inputs:
description: 'Path to the SerenityOS ccache directory'
required: false
default: ''
toolchain_ccache_path:
description: 'Path to the toolchain ccache directory'
required: false
default: ''
download_cache_path:
description: 'Path to the download cache directory'
required: false
default: 'caches'

outputs:
qemu_cache_primary_key:
description: 'Primary key for the AArch64 QEMU cache'
value: ${{ steps.qemu-cache.outputs.cache-primary-key }}
qemu_cache_hit:
description: 'Whether the AArch64 QEMU cache was hit'
value: ${{ steps.qemu-cache.outputs.cache-hit }}
serenity_ccache_primary_key:
description: 'Primary key for the Serenity ccache'
value: ${{ steps.serenity-ccache.outputs.cache-primary-key }}
toolchain_ccache_primary_key:
description: 'Primary key for the Toolchain ccache'
value: ${{ steps.toolchain-ccache.outputs.cache-primary-key }}
toolchain_prebuilt_primary_key:
description: 'Primary key for the toolchain cache'
value: ${{ steps.toolchain-prebuilt.outputs.cache-primary-key }}
toolchain_prebuilt_path:
description: 'Path to the prebuilt toolchain'
value: ${{ steps.toolchain-stamps.outputs.toolchain_path }}
toolchain_prebuilt_hit:
description: 'Whether the toolchain prebuilt cache was hit'
value: ${{ steps.toolchain-prebuilt.outputs.cache-hit }}

runs:
using: "composite"
Expand All @@ -68,64 +46,6 @@ runs:
run: |
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
- name: 'Toolchain Stamps'
shell: bash
id: 'toolchain-stamps'
if: ${{ inputs.arch != 'Lagom' }}
run: |
if ${{ inputs.toolchain == 'Clang' }} ; then
echo "toolchain_path=${{ github.workspace }}/Toolchain/Local/clang" >> "$GITHUB_OUTPUT"
hashed_files='${{ hashFiles('Toolchain/BuildClang.sh', 'Toolchain/Patches/llvm/*.patch', 'Toolchain/CMake/*.cmake', 'Userland/Libraries/LibC/**/*.h') }}'
echo "toolchain_stamp=${hashed_files}" >> "$GITHUB_OUTPUT"
source $GITHUB_WORKSPACE/Ports/llvm/package.sh
echo "toolchain_version=$(echo ${version} | cut -d'.' -f1)" >> "$GITHUB_OUTPUT"
elif ${{ inputs.toolchain == 'GNU' }} ; then
echo "toolchain_path=${{ github.workspace }}/Toolchain/Local/${{ inputs.arch }}" >> $GITHUB_OUTPUT
hashed_files='${{ hashFiles('Toolchain/BuildGNU.sh', 'Toolchain/Patches/binutils/*.patch', 'Toolchain/Patches/gcc/*.patch', 'Userland/Libraries/LibC/**/*.h') }}'
echo "toolchain_stamp=${hashed_files}" >> $GITHUB_OUTPUT
source $GITHUB_WORKSPACE/Ports/gcc/package.sh
echo "toolchain_version=$(echo ${version} | cut -d'.' -f1)" >> $GITHUB_OUTPUT
fi
- name: 'Toolchain Prebuilt Cache'
uses: actions/cache/restore@v4
id: 'toolchain-prebuilt'
if: ${{ inputs.arch != 'Lagom' }}
with:
path: ${{ steps.toolchain-stamps.outputs.toolchain_path }}
key: '"toolchain" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ steps.toolchain-stamps.outputs.toolchain_stamp }}"'

# FIXME: Remove manually built QEMU when we bump QEMU to >=8.1.x
- name: 'AArch64 QEMU Cache'
id: 'qemu-cache'
uses: actions/cache/restore@v4
if: ${{ inputs.arch == 'aarch64' }}
with:
path: ${{ github.workspace }}/Toolchain/Local/qemu
key: ${{ runner.os }}-qemu-${{ hashFiles('Ports/qemu/version.sh', 'Toolchain/BuildQemu.sh') }}

- name: 'Toolchain Compiler Cache'
uses: actions/cache/restore@v4
id: 'toolchain-ccache'
if: ${{ inputs.toolchain_ccache_path != '' }}
with:
path: ${{ inputs.toolchain_ccache_path }}
key: '"toolchain ccache" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ steps.toolchain-stamps.outputs.toolchain_version }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}'
restore-keys: |
"toolchain ccache" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ steps.toolchain-stamps.outputs.toolchain_version }}" | "${{ inputs.ccache_version }}"
- name: 'Configure Toolchain ccache'
if: ${{ inputs.toolchain_ccache_path != '' }}
shell: bash
run: |
CCACHE_DIR=${{ inputs.toolchain_ccache_path }} ccache -M 0
CCACHE_DIR=${{ inputs.toolchain_ccache_path }} ccache -s
CCACHE_DIR=${{ inputs.toolchain_ccache_path }} ccache -z
- name: 'Serenity Compiler Cache'
uses: actions/cache/restore@v4
id: 'serenity-ccache'
Expand Down
52 changes: 0 additions & 52 deletions .github/actions/cache-save/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ inputs:
description: 'Target Architecture to restore caches for'
required: false
default: 'x86_64'
qemu_cache_primary_key:
description: 'Primary key for the AArch64 QEMU cache'
required: false
default: ''
qemu_cache_hit:
description: 'Whether the AArch64 QEMU cache was hit'
required: false
default: false
serenity_ccache_path:
description: 'Path to the SerenityOS ccache directory'
required: false
Expand All @@ -23,54 +15,10 @@ inputs:
description: 'Primary key for the Serenity ccache'
required: false
default: ''
toolchain_ccache_path:
description: 'Path to the toolchain ccache directory'
required: false
default: ''
toolchain_ccache_primary_key:
description: 'Primary key for the Toolchain ccache'
required: false
default: ''
toolchain_prebuilt_path:
description: 'Path to the prebuilt toolchain'
required: false
default: ''
toolchain_prebuilt_primary_key:
description: 'Primary key for the toolchain cache'
required: false
default: ''
toolchain_prebuilt_hit:
description: 'Whether the toolchain prebuilt cache was hit'
required: false
default: false

runs:
using: "composite"
steps:
- name: 'Toolchain Prebuilt Cache'
uses: actions/cache/save@v4
# Do not waste time and storage space by updating the toolchain cache from a PR,
# as it would be discarded after being merged anyway.
if: ${{ github.event_name != 'pull_request' && !inputs.toolchain_prebuilt_hit && inputs.arch != 'Lagom' }}
with:
path: ${{ inputs.toolchain_prebuilt_path }}
key: ${{ inputs.toolchain_prebuilt_primary_key }}

# FIXME: Remove manually built QEMU when we bump QEMU to >=8.1.x
- name: 'AArch64 QEMU Cache'
uses: actions/cache/save@v4
if: ${{ github.event_name != 'pull_request' && !inputs.qemu_cache_hit && inputs.arch == 'aarch64' }}
with:
path: ${{ github.workspace }}/Toolchain/Local/qemu
key: ${{ inputs.qemu_cache_primary_key }}

- name: 'Toolchain Compiler Cache'
uses: actions/cache/save@v4
if: ${{ github.event_name != 'pull_request' && inputs.toolchain_ccache_path != '' }}
with:
path: ${{ inputs.toolchain_ccache_path }}
key: ${{ inputs.toolchain_ccache_primary_key }}

- name: 'Prune obsolete ccache files'
shell: bash
if: ${{ inputs.serenity_ccache_path != '' }}
Expand Down
21 changes: 4 additions & 17 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ runs:
echo "${{ github.workspace }}/wabt-1.0.23/bin" >> $GITHUB_PATH
- name: 'Install JS dependencies'
if: ${{ inputs.os == 'Linux' || inputs.os == 'Serenity' }}
if: ${{ inputs.os == 'Linux' }}
shell: bash
run: sudo npm install -g [email protected]

- name: 'Install Python dependencies'
if: ${{ inputs.os == 'Linux' || inputs.os == 'Serenity' }}
if: ${{ inputs.os == 'Linux' }}
shell: bash
run: |
python3 -m pip install --upgrade pip
pip3 install flake8 requests six
- name: 'Install Dependencies'
if: ${{ inputs.os == 'Serenity' }}
if: ${{ inputs.os }}
shell: bash
run: |
set -e
Expand All @@ -65,20 +65,7 @@ runs:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install clang-format-18 ccache e2fsprogs gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build optipng qemu-utils qemu-system-i386 unzip generate-ninja libegl1-mesa-dev
if ${{ inputs.arch == 'aarch64' }}; then
# FIXME: Remove this when we no longer build our own Qemu binary.
sudo apt-get install libgtk-3-dev libpixman-1-dev libsdl2-dev libslirp-dev
fi
- name: Enable KVM group perms
if: ${{ inputs.os == 'Serenity' }}
shell: bash
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
sudo apt-get install clang-format-18 ccache e2fsprogs gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build optipng unzip generate-ninja libegl1-mesa-dev
- name: 'Install Dependencies'
if: ${{ inputs.os == 'macOS' || inputs.os == 'Android' }}
Expand Down
Loading

0 comments on commit 6d3a54e

Please sign in to comment.