Delete .github/workflows directory

This commit is contained in:
Harshit Dagar 2025-03-22 14:48:50 +05:30 committed by GitHub
parent 4c5ce6f11b
commit 1125638333
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 0 additions and 1207 deletions

View file

@ -1,68 +0,0 @@
name: Build Ladybird (Software Rendering)
on:
workflow_dispatch: # Allows manual trigger from GitHub Actions UI
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Cache CMake and Ninja Builds
uses: actions/cache@v4
with:
path: Build/release
key: ${{ runner.os }}-ladybird-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-ladybird-
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y autoconf autoconf-archive automake build-essential ccache cmake curl \
fonts-liberation2 git libgl1-mesa-dev nasm ninja-build pkg-config qt6-base-dev \
qt6-tools-dev-tools qt6-wayland tar unzip zip libpulse-dev xvfb \
mesa-utils libegl1-mesa libglx-mesa0 libosmesa6
- name: Install CMake (from Kitware)
run: |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/kitware.list
sudo apt update -y && sudo apt install -y cmake
- name: Install GCC-13
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install -y g++-13 libstdc++-13-dev
- name: Setup Virtual Display (Xvfb)
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Enable Software Rendering
run: |
echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
echo "MESA_LOADER_DRIVER_OVERRIDE=llvmpipe" >> $GITHUB_ENV
echo "QT_QPA_PLATFORM=xcb" >> $GITHUB_ENV
- name: Build Ladybird
run: |
cmake -GNinja -B Build/release
ninja -C Build/release
- name: Run Ladybird in Software Rendering Mode
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" ./Build/release/bin/Ladybird --headless https://ladybird.dev || true
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Ladybird-Build
path: |
Build/release/bin/
Build/release/*.lo

View file

@ -1,53 +0,0 @@
name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
cancel-in-progress: true
jobs:
# CI matrix - runs the job in lagom-template.yml with different configurations.
Lagom:
if: github.repository == 'LadybirdBrowser/ladybird'
strategy:
fail-fast: false
matrix:
os_name: ['Linux']
os: [ubuntu-24.04]
arch: ['x86_64']
build_preset: ['Sanitizer_CI']
toolchain: ['GNU']
clang_plugins: [false]
include:
- os_name: 'Linux'
os: ubuntu-24.04
arch: 'x86_64'
build_preset: 'Sanitizer_CI'
toolchain: 'Clang'
clang_plugins: true
- os_name: 'macOS'
os: macos-15
arch: 'arm64'
build_preset: 'Sanitizer_CI'
toolchain: 'Clang'
clang_plugins: false
- os_name: 'Linux'
os: ubuntu-24.04
arch: 'x86_64'
build_preset: 'Fuzzers_CI'
toolchain: 'Clang'
clang_plugins: false
uses: ./.github/workflows/lagom-template.yml
with:
toolchain: ${{ matrix.toolchain }}
os_name: ${{ matrix.os_name }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
build_preset: ${{ matrix.build_preset }}
clang_plugins: ${{ matrix.clang_plugins }}

View file

@ -1,40 +0,0 @@
# This workflow builds a docker image with the Dev Container CLI (https://github.com/devcontainers/cli)
#
name: 'Build Dev Container Image'
on:
workflow_dispatch:
push:
paths:
- '.devcontainer/**'
- 'vcpkg.json'
schedule:
# https://crontab.guru/#0_0_*_*_1
- cron: '0 0 * * 1'
permissions:
contents: read
# Push images to GHCR.
packages: write
jobs:
build:
if: github.repository == 'LadybirdBrowser/ladybird'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Base Dev Container Image
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/ladybirdbrowser/ladybird-devcontainer
imageTag: base,latest
push: always

View file

@ -1,89 +0,0 @@
name: Package the js repl as a binary artifact
on:
push:
branches: [master]
env:
LADYBIRD_SOURCE_DIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
VCPKG_ROOT: ${{ github.workspace }}/Build/vcpkg
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
jobs:
build-and-package:
runs-on: ${{ matrix.os }}
if: github.repository == 'LadybirdBrowser/ladybird'
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
package_type: [Linux-x86_64]
os_name: [Linux]
include:
- os: macos-14
package_type: macOS-universal2
os_name: macOS
concurrency:
group: ${{ github.workflow }}-${{ matrix.os_name }}
cancel-in-progress: true
steps:
- name: Checkout LadybirdBrowser/ladybird
uses: actions/checkout@v4
- name: "Set up environment"
uses: ./.github/actions/setup
with:
os: ${{ matrix.os_name }}
arch: 'Lagom'
- name: Restore Caches
uses: ./.github/actions/cache-restore
id: 'cache-restore'
with:
os: ${{ matrix.os_name }}
arch: 'Lagom'
cache_key_extra: 'LibJS Artifacts'
ccache_path: ${{ env.CCACHE_DIR }}
download_cache_path: ${{ github.workspace }}/Build/caches
- name: Create build directory Ubuntu
run: |
cmake --preset Distribution_CI \
-DCMAKE_C_COMPILER=clang-19 \
-DCMAKE_CXX_COMPILER=clang++-19 \
-DENABLE_GUI_TARGETS=OFF
if: ${{ matrix.os_name == 'Linux' }}
# FIXME: Add the following flag back when vcpkg supports Universal binaries:
# -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
#
# See: https://github.com/microsoft/vcpkg/discussions/19454
- name: Create build directory macOS
run: |
cmake --preset Distribution_CI \
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \
-DENABLE_GUI_TARGETS=OFF
if: ${{ matrix.os_name == 'macOS' }}
- name: Build and package js
working-directory: Build/distribution
run: |
ninja js
cpack
- name: Save Caches
uses: ./.github/actions/cache-save
with:
arch: 'Lagom'
ccache_path: ${{ env.CCACHE_DIR }}
ccache_primary_key: ${{ steps.cache-restore.outputs.ccache_primary_key }}
- name: Upload js package
uses: actions/upload-artifact@v4
with:
name: ladybird-js-${{ matrix.package_type }}
path: Build/distribution/ladybird-js*.tar.gz
retention-days: 7

View file

@ -1,235 +0,0 @@
name: Lagom Template
on:
workflow_call:
inputs:
toolchain:
required: true
type: string
os_name:
required: true
type: string
os:
required: true
type: string
arch:
required: true
type: string
build_preset:
required: true
type: string
clang_plugins:
required: false
type: boolean
default: false
env:
# runner.workspace = /home/runner/work/ladybird
# github.workspace = /home/runner/work/ladybird/ladybird
LADYBIRD_SOURCE_DIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
VCPKG_ROOT: ${{ github.workspace }}/Build/vcpkg
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# Use the compiler version for the ccache compiler hash. Otherwise, if plugins are enabled, the plugin .so files
# are included in the hash. This results in clean builds on every run as the .so files are rebuilt.
#
# Note: This only works because our plugins do not transform any code. If that becomes untrue, we must revisit this.
CCACHE_COMPILERCHECK: "%compiler% -v"
jobs:
CI:
runs-on: ${{ inputs.os }}
steps:
# Pull requests can trail behind `master` and can cause breakage if merging before running the CI checks on an updated branch.
# Luckily, GitHub creates and maintains a merge branch that is updated whenever the target or source branch is modified. By
# checking this branch out, we gain a stabler `master` at the cost of reproducibility.
- uses: actions/checkout@v4
if: ${{ github.event_name != 'pull_request' }}
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Set Up Environment
uses: ./.github/actions/setup
with:
os: ${{ inputs.os_name }}
arch: ${{ inputs.arch }}
# === PREPARE FOR BUILDING ===
- name: Assign Build Parameters
id: 'build-parameters'
run: |
if ${{ inputs.os_name == 'Linux' }} ; then
if ${{ inputs.toolchain == 'Clang' }} ; then
echo "host_cc=clang-19" >> "$GITHUB_OUTPUT"
echo "host_cxx=clang++-19" >> "$GITHUB_OUTPUT"
elif ${{ inputs.toolchain == 'GNU' }} ; then
echo "host_cc=gcc-13" >> "$GITHUB_OUTPUT"
echo "host_cxx=g++-13" >> "$GITHUB_OUTPUT"
fi
elif ${{ inputs.os_name == 'macOS' }} ; then
echo "host_cc=$(xcrun --find clang)" >> "$GITHUB_OUTPUT"
echo "host_cxx=$(xcrun --find clang++)" >> "$GITHUB_OUTPUT"
fi
if ${{ inputs.clang_plugins }} ; then
echo "ccache_key=${{ inputs.build_preset }}-CLANG_PLUGINS" >> "$GITHUB_OUTPUT"
echo "cmake_options=-DENABLE_CLANG_PLUGINS=ON" >> "$GITHUB_OUTPUT"
else
echo "ccache_key=${{ inputs.build_preset }}" >> "$GITHUB_OUTPUT"
if ${{ inputs.os_name == 'Linux' && inputs.arch == 'arm64' }} ; then
# FIXME: https://github.com/WebAssembly/wabt/issues/2533
# wabt doesn't have binary releases for arm64 Linux
PKGCONFIG=$(which pkg-config)
echo "cmake_options=-DPKG_CONFIG_EXECUTABLE=$PKGCONFIG" >> "$GITHUB_OUTPUT"
else
echo "cmake_options=-DINCLUDE_WASM_SPEC_TESTS=ON -DWASM_SPEC_TEST_SKIP_FORMATTING=ON" >> "$GITHUB_OUTPUT"
fi
fi
- name: Restore Caches
uses: ./.github/actions/cache-restore
id: 'cache-restore'
with:
os: ${{ inputs.os_name }}
arch: ${{ inputs.arch }}
toolchain: ${{ inputs.toolchain }}
cache_key_extra: ${{ steps.build-parameters.outputs.ccache_key }}
ccache_path: ${{ env.CCACHE_DIR }}
download_cache_path: ${{ github.workspace }}/Build/caches
- name: Set dynamic environment variables
run: |
# Note: Required for vcpkg to use this compiler for its own builds.
echo "CC=${{ steps.build-parameters.outputs.host_cc }}" >> "$GITHUB_ENV"
echo "CXX=${{ steps.build-parameters.outputs.host_cxx }}" >> "$GITHUB_ENV"
# https://github.com/actions/runner-images/issues/9330
- name: Enable Microphone Access (macOS 14)
if: ${{ inputs.os_name == 'macOS' }}
run: sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
- name: Create Build Environment
if: ${{ inputs.build_preset != 'Fuzzers_CI' }}
working-directory: ${{ github.workspace }}
run: |
cmake --preset ${{ inputs.build_preset }} -B Build \
${{ steps.build-parameters.outputs.cmake_options }} \
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \
-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }}
- name: Create Build Environment
if: ${{ inputs.build_preset == 'Fuzzers_CI' }}
working-directory: ${{ github.workspace }}
run: |
set -e
cmake --preset=Distribution_CI -S Meta/Lagom -B ${{ github.workspace }}/Build/tools-build \
-DLAGOM_TOOLS_ONLY=ON \
-DINSTALL_LAGOM_TOOLS=ON \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Build/tools-install \
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-Dpackage=LagomTools
ninja -C ${{ github.workspace }}/Build/tools-build install
cmake --preset ${{ inputs.build_preset }} -B Build \
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \
-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }} \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Build/tools-install
# === BUILD ===
- name: Build
working-directory: ${{ github.workspace }}/Build
run: |
set -e
cmake --build .
cmake --install . --strip --prefix ${{ github.workspace }}/Install
- name: Enable the Ladybird Qt chrome
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}
run: cmake -B Build -DENABLE_QT=ON
- name: Build the Ladybird Qt chrome
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}/Build
run: cmake --build .
- name: Enable the AppKit chrome with Swift files
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}
# FIXME: Don't force release build after https://github.com/LadybirdBrowser/ladybird/issues/1101 is fixed
run: cmake -B Build -DENABLE_QT=OFF -DENABLE_SWIFT=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build the AppKit chrome with Swift files
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}/Build
run: cmake --build .
- name: Save Caches
uses: ./.github/actions/cache-save
with:
arch: ${{ inputs.arch }}
ccache_path: ${{ env.CCACHE_DIR }}
ccache_primary_key: ${{ steps.cache-restore.outputs.ccache_primary_key }}
# === TEST ===
- name: Test
if: ${{ inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}
run: ctest --preset Sanitizer --output-on-failure --test-dir Build --timeout 1800
env:
TESTS_ONLY: 1
# NOTE: These are appended to the preset's options.
ASAN_OPTIONS: 'log_path=${{ github.workspace }}/asan.log'
UBSAN_OPTIONS: 'log_path=${{ github.workspace }}/ubsan.log'
- name: Test
if: ${{ inputs.build_preset != 'Fuzzers_CI' && inputs.build_preset != 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}
run: ctest --output-on-failure --test-dir Build --timeout 1800
env:
TESTS_ONLY: 1
- name: Upload LibWeb Test Artifacts
if: ${{ always() && inputs.build_preset != 'Fuzzers_CI' }}
uses: actions/upload-artifact@v4
with:
name: libweb-test-artifacts-${{ inputs.os_name }}-${{inputs.build_preset}}-${{inputs.toolchain}}-${{inputs.clang-plugins}}
path: ${{ github.workspace }}/Build/UI/Headless/test-dumps
retention-days: 0
if-no-files-found: ignore
- name: Sanitizer Output
if: ${{ !cancelled() && inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}
run: |
log_output=$(find . -maxdepth 1 \( -name 'asan.log.*' -o -name 'ubsan.log.*' \) -exec cat {} \; )
if [ -z "$log_output" ]; then
echo "No sanitizer issues found."
else
echo "$log_output"
echo "Sanitizer errors happened while running tests; see the Test step above."
fi
- name: Lints
if: ${{ inputs.os_name == 'Linux' && inputs.build_preset == 'Sanitizer_CI' }}
working-directory: ${{ github.workspace }}
run: |
set -e
git ls-files '*.ipc' | xargs ./Build/bin/IPCMagicLinter
env:
ASAN_OPTIONS: 'strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:allocator_may_return_null=1'
UBSAN_OPTIONS: 'print_stacktrace=1:print_summary=1:halt_on_error=1'

View file

@ -1,158 +0,0 @@
name: Run test262 and test-wasm
on:
push:
branches: [master]
env:
LADYBIRD_SOURCE_DIR: ${{ github.workspace }}
VCPKG_ROOT: ${{ github.workspace }}/Build/vcpkg
jobs:
run_and_update_results:
runs-on: test262-runner
if: github.repository == 'LadybirdBrowser/ladybird'
concurrency: libjs-test262
steps:
- name: Cleanup
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}/*"
- name: Checkout LadybirdBrowser/ladybird
uses: actions/checkout@v4
- name: Checkout LadybirdBrowser/libjs-test262
uses: actions/checkout@v4
with:
repository: LadybirdBrowser/libjs-test262
path: libjs-test262
- name: Checkout LadybirdBrowser/libjs-data
uses: actions/checkout@v4
with:
repository: LadybirdBrowser/libjs-data
path: libjs-data
- name: Checkout tc39/test262
uses: actions/checkout@v4
with:
repository: tc39/test262
path: test262
- name: Checkout tc39/test262-parser-tests
uses: actions/checkout@v4
with:
repository: tc39/test262-parser-tests
path: test262-parser-tests
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build unzip gcc-13 g++-13 jq wget curl zip tar autoconf autoconf-archive automake nasm pkg-config libgl1-mesa-dev rsync
test -e /opt/wabt-1.0.35 || (
cd /tmp
wget https://github.com/WebAssembly/wabt/releases/download/1.0.35/wabt-1.0.35-ubuntu-20.04.tar.gz
sudo tar xf wabt-1.0.35-ubuntu-20.04.tar.gz -C /opt
rm wabt-1.0.35-ubuntu-20.04.tar.gz
)
# FIXME: Just use the setup action
./Toolchain/BuildVcpkg.sh --ci
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
# The setup-python action set default python to python3.x. Note that we are not using system python here.
run: |
python -m pip install --upgrade pip
pip install -r libjs-test262/requirements.txt
- name: Check versions
run: set +e; g++ --version; g++-13 --version; python --version; python3 --version; ninja --version
- name: Restore Caches
uses: ./.github/actions/cache-restore
with:
os: 'Linux'
arch: 'Lagom'
download_cache_path: ${{ github.workspace }}/libjs-test262/Build/caches
- name: Get previous results
run: |
mkdir -p old-libjs-data
cp -R libjs-data/test262 libjs-data/wasm old-libjs-data
- name: Build test262-runner, test-js and test-wasm
run: |
# FIXME: Why does vcpkg need this?
# Running as a normal user would make this a non-issue though
export HOME=${{ github.workspace }}/home
mkdir -p $HOME
env PATH="/opt/wabt-1.0.35/bin:$PATH" \
CC=gcc-13 \
CXX=g++-13 \
cmake --preset CI -B libjs-test262/Build \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
-DWASM_SPEC_TEST_SKIP_FORMATTING=ON \
-DINCLUDE_WASM_SPEC_TESTS=ON \
-DENABLE_GUI_TARGETS=OFF
ninja -C libjs-test262/Build test262-runner test-js test-wasm
- name: Run test262 and test262-parser-tests
working-directory: libjs-test262
run: |
python3 run_all_and_update_results.py \
--serenity .. \
--test262 ../test262 \
--test262-parser-tests ../test262-parser-tests \
--results-json ../libjs-data/test262/results.json \
--per-file-output ../libjs-data/test262/per-file-master.json
- name: Run test-wasm
working-directory: libjs-test262
run: |
Build/bin/test-wasm --per-file Build/Lagom/Libraries/LibWasm/Tests > ../libjs-data/wasm/per-file-master.json || true
jq -nc -f /dev/stdin <<-EOF --slurpfile previous ../libjs-data/wasm/results.json --slurpfile details ../libjs-data/wasm/per-file-master.json > wasm-new-results.json
\$details[0] as \$details | \$previous[0] + [{
"commit_timestamp": $(git -C .. log -1 --format=%ct),
"run_timestamp": $(date +%s),
"versions": {
"serenity": "$(git -C .. rev-parse HEAD)"
},
"tests": {
"spectest": {
"duration": (\$details.duration),
"results": {
"total": (\$details.results | keys | length),
"passed": ([\$details.results | values[] | select(. == "PASSED")] | length),
"failed": ([\$details.results | values[] | select(. == "FAILED")] | length),
"skipped": ([\$details.results | values[] | select(. == "SKIPPED")] | length),
"process_error": ([\$details.results | values[] | select(. == "PROCESS_ERROR")] | length)
}
}
}
}]
EOF
mv wasm-new-results.json ../libjs-data/wasm/results.json
- name: Compare test262 results
run: ./libjs-test262/per_file_result_diff.py -o old-libjs-data/test262/per-file-master.json -n libjs-data/test262/per-file-master.json
- name: Compare Wasm results
run: ./libjs-test262/per_file_result_diff.py -o old-libjs-data/wasm/per-file-master.json -n libjs-data/wasm/per-file-master.json
- name: Deploy to GitHub
uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
git-config-name: LadybirdBot
git-config-email: ladybirdbot@ladybird.org
branch: master
repository-name: LadybirdBrowser/libjs-data
token: ${{ secrets.LADYBIRD_BOT_TOKEN }}
folder: libjs-data

View file

@ -1,34 +0,0 @@
name: Lint Code
on: [ push, pull_request ]
jobs:
lint:
runs-on: macos-14
if: github.repository == 'LadybirdBrowser/ladybird'
steps:
- uses: actions/checkout@v4
- name: Set Up Environment
shell: bash
run: |
set -e
brew install curl flake8 llvm@19 ninja optipng shellcheck swift-format unzip
# Note: gn isn't available in homebrew :(
# Corresponds to https://gn.googlesource.com/gn/+/225e90c5025bf74f41dbee60d9cde4512c846fe7
curl -L -o gn-mac-arm64.zip "https://chrome-infra-packages.appspot.com/dl/gn/gn/mac-arm64/+/786UV5-XW0Bz6QnRFxKtnzTSVq0ta5AU1KXRJs-ZNwcC"
unzip gn-mac-arm64.zip -d ${{ github.workspace }}/bin
chmod +x ${{ github.workspace }}/bin/gn
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
echo -n "gn version: "
${{ github.workspace}}/bin/gn --version
- name: Install JS Dependencies
shell: bash
run: npm install -g prettier@3.3.3
- name: Lint
run: ${{ github.workspace }}/Meta/lint-ci.sh

View file

@ -1,94 +0,0 @@
name: Lint Commit Messages
on: [pull_request_target]
# Make sure to update Meta/lint-commit.sh to match this script when adding new checks!
# (… but don't accept overlong 'fixup!' commit descriptions.)
jobs:
lint:
runs-on: ubuntu-24.04
if: github.repository == 'LadybirdBrowser/ladybird'
steps:
- name: Lint PR commits
uses: actions/github-script@v7
with:
script: |
const excludedBotIds = [
49699333, // dependabot[bot]
];
const rules = [
{
pattern: /^[^\r]*$/,
error: "Commit message contains CRLF line breaks (only unix-style LF linebreaks are allowed)",
},
{
pattern: /^.+(\r?\n(\r?\n.*)*)?$/,
error: "Empty line between commit title and body is missing",
},
{
pattern: /^.{0,72}(?:\r?\n(?:(.{0,72})|(.*?([a-z]+:\/\/)?(([a-zA-Z0-9_]|-)+\.)+[a-z]{2,}(:\d+)?([a-zA-Z_0-9@:%\+.~\?&/=]|-)+).*?))*$/,
error: "Commit message lines are too long (maximum allowed is 72 characters, except for URLs)",
},
{
pattern: /^((?!^Merge branch )[\s\S])*$/,
error: "Commit is a git merge commit, use the rebase command instead",
},
{
pattern: /^\S.*?\S: .+/,
error: "Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)",
},
{
pattern: /^\S.*?: [A-Z0-9]/,
error: "First word of commit after the subsystem is not capitalized",
},
{
pattern: /^.+[^.\n](\r?\n.*)*$/,
error: "Commit title ends in a period",
},
{
pattern: /^((?!Signed-off-by: )[\s\S])*$/,
error: "Commit body contains a Signed-off-by tag",
},
];
const { repository, pull_request } = context.payload;
// NOTE: This maxes out at 250 commits. If this becomes a problem, see:
// https://octokit.github.io/rest.js/v18#pulls-list-commits
const opts = github.rest.pulls.listCommits.endpoint.merge({
owner: repository.owner.login,
repo: repository.name,
pull_number: pull_request.number,
});
const commits = await github.paginate(opts);
const errors = [];
for (const { sha, commit: { message }, author } of commits) {
if (author !== null && excludedBotIds.includes(author.id)) {
continue;
}
const commitErrors = [];
for (const { pattern, error } of rules) {
if (!pattern.test(message)) {
commitErrors.push(error);
}
}
if (commitErrors.length > 0) {
const title = message.split("\n")[0];
errors.push([`${title} (${sha}):`, ...commitErrors].join("\n "));
}
}
if (errors.length > 0) {
core.setFailed(`One or more of the commits in this PR do not match the code submission policy:\n\n${errors.join("\n")}`);
}
- name: Comment on PR
if: ${{ failure() && !github.event.pull_request.draft }}
uses: IdanHo/comment-on-pr@63ea2bf352997c66e524b8b5be7a79163fb3a88a
env:
GITHUB_TOKEN: ${{ secrets.LADYBIRD_BOT_TOKEN }}
with:
msg: "Hello!\n\nOne or more of the commit messages in this PR do not match the Ladybird [code submission policy](https://github.com/LadybirdBrowser/ladybird/blob/master/CONTRIBUTING.md#code-submission-policy), please check the `lint_commits` CI job for more details on which commits were flagged and why.\nPlease do not close this PR and open another, instead modify your commit message(s) with [git commit --amend](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message) and force push those changes to update this PR."

View file

@ -1,55 +0,0 @@
name: Build Ladybird EXE
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: windows-latest # Or a specific Windows version if needed
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive # Important for Ladybird's dependencies
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1 # Sets up the Visual Studio build environment
with:
arch: amd64 # or x86, arm64 as needed.
- name: Install dependencies (if any)
# Ladybird usually requires Qt and some other dependencies.
# This step might need to be customized based on your specific setup.
# Example using vcpkg (if you use it):
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
.\vcpkg install qt5-base:x64-windows # or qt6
# Add any other required dependencies using vcpkg install
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64 # Adjust generator and architecture as needed.
# If you used vcpkg, use this instead:
# cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: |
cd build
cmake --build . --config Release # Or Debug if needed.
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ladybird-exe
path: build/Release/ladybird.exe # Adjust path based on your build output

View file

@ -1,68 +0,0 @@
name: Build Ladybird Browser
on:
workflow_dispatch: # Manual trigger
jobs:
build:
runs-on: ubuntu-latest
env:
CCACHE_DIR: /home/runner/.ccache
CCACHE_MAXSIZE: 2G
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Configure CCache
run: |
sudo apt install -y ccache
echo "MAXSIZE=2.0G" | sudo tee /etc/ccache.conf
- name: Cache build artifacts
uses: actions/cache@v3
with:
path: |
Build/
/home/runner/.ccache
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.json') }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
autoconf autoconf-archive automake build-essential ccache cmake curl \
fonts-liberation2 git libgl1-mesa-dev nasm ninja-build pkg-config \
qt6-base-dev qt6-tools-dev-tools qt6-wayland tar unzip zip \
libpulse-dev qt6-multimedia-dev xvfb
- name: Install CMake 3.25+ from Kitware
run: |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/kitware.list
sudo apt update -y && sudo apt install cmake -y
- name: Install Clang 19 (C++23-capable compiler)
run: |
sudo wget -O /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-19 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
sudo apt update -y && sudo apt install clang-19 clangd-19 clang-format-19 clang-tidy-19 lld-19 -y
- name: Build Ladybird Using `ladybird.sh` with Virtual Display
run: |
chmod +x Meta/ladybird.sh
export CC="clang-19"
export CXX="clang++-19"
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" ./Meta/ladybird.sh run ladybird
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Ladybird-Browser
path: |
Build/Ladybird/Ladybird*
Build/Ladybird/*.so
Build/Ladybird/*.dll
Build/Ladybird/*.dylib
Build/Ladybird/*.exe
retention-days: 7

View file

@ -1,63 +0,0 @@
name: Build Ladybird Browser.
on:
workflow_dispatch: # Allows manual trigger from GitHub Actions UI
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y \
autoconf autoconf-archive automake build-essential ccache cmake curl \
fonts-liberation2 git libgl1-mesa-dev nasm ninja-build pkg-config \
qt6-base-dev qt6-tools-dev-tools qt6-wayland tar unzip zip \
libpulse-dev qt6-multimedia-dev xvfb mesa-utils libegl-dev libglx-dev libosmesa6
- name: Install CMake 3.25+ from Kitware
run: |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/kitware.list
sudo apt update -y && sudo apt install cmake -y
- name: Install Clang 19 (C++23-capable compiler)
run: |
sudo wget -O /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-19 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
sudo apt update -y && sudo apt install clang-19 clangd-19 clang-format-19 clang-tidy-19 lld-19 -y
- name: Setup Virtual Display (Xvfb)
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Enable Software Rendering & Disable Vulkan
run: |
echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
echo "MESA_LOADER_DRIVER_OVERRIDE=llvmpipe" >> $GITHUB_ENV
echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
echo "QT_QPA_PLATFORMTHEME=qt5ct" >> $GITHUB_ENV
- name: Build Ladybird Using `ladybird.sh`
run: |
chmod +x Meta/ladybird.sh
./Meta/ladybird.sh build
- name: Find & List Produced Files (Debugging)
run: find . -type f -printf "%P\n" | tee build-file-list.txt
- name: Upload All Produced Files
uses: actions/upload-artifact@v4
with:
name: Ladybird-All-Files
path: |
Build/release/**
Build/**
build-file-list.txt
retention-days: 14

View file

@ -1,28 +0,0 @@
name: 'Label PRs with merge conflicts'
on:
# PRs typically get conflicted after a push to master.
push:
branches: [master]
# If a PR targeting master is (re)opened or updated, recheck for conflicts and update the label.
# NOTE: This runs against the target branch, not the PR branch.
pull_request_target:
types: [opened, synchronize, reopened]
branches: [master]
jobs:
auto-labeler:
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: write
steps:
- uses: eps1lon/actions-label-merge-conflict@v3
with:
commentOnDirty: >
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to
[rebase](https://www.youtube.com/watch?v=ElRzTuYln0M) your branch on top of the latest `master`.
dirtyLabel: 'conflicts'
repoToken: ${{ secrets.GITHUB_TOKEN }}
retryAfter: 15
retryMax: 3

View file

@ -1,107 +0,0 @@
name: Nightly Android
on:
# Automatically run at the end of every day.
schedule:
- cron: '0 0 * * *'
# Allow manual triggering from the GitHub Actions UI
workflow_dispatch:
env:
# runner.workspace = /home/runner/work/ladybird
# github.workspace = /home/runner/work/ladybird/ladybird
LADYBIRD_SOURCE_DIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
VCPKG_ROOT: ${{ github.workspace }}/Build/vcpkg
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
cancel-in-progress: true
jobs:
CI:
runs-on: ${{ matrix.os }}
if: github.repository != 'LadybirdBrowser/ladybird'
strategy:
fail-fast: false
matrix:
os_name: ['Android']
os: [macos-14]
steps:
- uses: actions/checkout@v4
- name: Set Up Environment
uses: ./.github/actions/setup
with:
os: ${{ matrix.os_name }}
arch: 'Lagom'
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@v4
# === PREPARE FOR BUILDING ===
- name: Restore Caches
uses: ./.github/actions/cache-restore
id: 'cache-restore'
with:
os: ${{ matrix.os_name }}
arch: 'Lagom'
cache_key_extra: 'Nightly Android'
ccache_path: ${{ env.CCACHE_DIR }}
download_cache_path: ${{ github.workspace }}/Build/caches
- name: Assign Build Parameters
id: 'build-parameters'
run: |
echo "host_cc=$(xcrun --find clang)" >> "$GITHUB_OUTPUT"
echo "host_cxx=$(xcrun --find clang++)" >> "$GITHUB_OUTPUT"
- name: Install NDK
run: |
yes | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --licenses
yes | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "platform-tools" "build-tools;32.0.0" "platforms;android-34"
yes | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "ndk;26.1.10909125"
- name: Start Android Emulator
run: |
# Install AVD files
echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'system-images;android-30;google_apis;x86_64'
# Create emulator
echo "no" | ${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager create avd -n xamarin_android_emulator -k 'system-images;android-30;google_apis;x86_64' --force
${ANDROID_HOME}/emulator/emulator -list-avds
echo "Starting emulator"
# Start emulator in background
nohup ${ANDROID_HOME}/emulator/emulator -avd xamarin_android_emulator -no-snapshot > /dev/null 2>&1 &
${ANDROID_HOME}/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
${ANDROID_HOME}/platform-tools/adb devices
echo "Emulator started"
# === BUILD ===
- name: Build and Test
working-directory: ${{ github.workspace }}/UI/Android
run: ./gradlew connectedAndroidTest
env:
GRADLE_OPTS: '-Xmx3072m'
SERENITY_CACHE_DIR: ${{ github.workspace }}/Build/caches
- name: Save Caches
uses: ./.github/actions/cache-save
with:
arch: 'Lagom'
ccache_path: ${{ env.CCACHE_DIR }}
ccache_primary_key: ${{ steps.cache-restore.outputs.ccache_primary_key }}

View file

@ -1,56 +0,0 @@
name: Nightly Lagom
on:
# Automatically run at the end of every day.
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# CI matrix - runs the job in lagom-template.yml with different configurations.
Lagom:
if: github.repository == 'LadybirdBrowser/ladybird'
strategy:
fail-fast: false
matrix:
os_name: ['Linux']
os: [ubuntu-24.04-arm]
arch: ['arm64']
build_preset: ['Sanitizer_CI']
toolchain: ['Clang']
clang_plugins: [false]
include:
- os_name: 'Linux'
os: ubuntu-24.04
arch: 'x86_64'
build_preset: 'Distribution_CI'
toolchain: 'GNU'
clang_plugins: false
- os_name: 'macOS'
os: macos-15
arch: 'arm64'
build_preset: 'Distribution_CI'
toolchain: 'Clang'
clang_plugins: false
- os_name: 'Linux'
os: ubuntu-24.04-arm
arch: 'arm64'
build_preset: 'Distribution_CI'
toolchain: 'Clang'
clang_plugins: false
uses: ./.github/workflows/lagom-template.yml
with:
toolchain: ${{ matrix.toolchain }}
os_name: ${{ matrix.os_name }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
build_preset: ${{ matrix.build_preset }}
clang_plugins: ${{ matrix.clang_plugins }}

View file

@ -1,22 +0,0 @@
name: Push notes
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build:
if: github.repository == 'LadybirdBrowser/ladybird'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- run: |
git fetch origin "refs/notes/*:refs/notes/*"
curl -fsSLO https://sideshowbarker.github.io/git-gloss/git-gloss && bash ./git-gloss
git push origin "refs/notes/*" || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,37 +0,0 @@
name: 'Close stale PRs'
on:
# Run daily at 01:30.
schedule:
- cron: '30 1 * * *'
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-24.04
permissions:
actions: write # required for cache management (see https://github.com/actions/stale/issues/1133)
pull-requests: write
steps:
# replace `uses:` below with upstream actions/stale when https://github.com/actions/stale/issues/1136 is fixed
- uses: itchyny/actions-stale@0980a21d84c23bd4d8c62b0958f47f25822286f2
with:
operations-per-run: 500
# Leave issues alone.
days-before-issue-stale: -1
days-before-issue-close: -1
# PRs become stale after 21 days of inactivity.
days-before-pr-stale: 21
stale-pr-label: stale
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had recent activity. It will be
closed in 7 days if no further activity occurs. Thank you for your contributions!
# PRs get closed after 30 days (21 + 7) of inactivity
days-before-pr-close: 7
close-pr-message: >
This pull request has been closed because it has not had recent activity. Feel free to open a new pull
request if you wish to still contribute these changes. Thank you for your contributions!