diff --git a/.gitattributes b/.gitattributes index d760580b..805521b1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -173,3 +173,8 @@ js/developer/vendor/package-lock.json text eol=lf js/developer/tools/starters/pi/* text eol=lf examples/life/ui/* text eol=lf js/developer/tools/* text eol=lf + +# The wf project of the repository: its scripts, manifest and lock are hashed inputs of the self-build. +js/developer/scripts/* text eol=lf +webfront.project.json text eol=lf +webfront-packages.lock.json text eol=lf diff --git a/.github/actions/remove-node/action.yml b/.github/actions/remove-node/action.yml new file mode 100644 index 00000000..eae461e7 --- /dev/null +++ b/.github/actions/remove-node/action.yml @@ -0,0 +1,22 @@ +name: Remove Node.js +description: >- + Deletes node, nodejs, npm, npx and corepack from the runner (an ephemeral machine), then checks that none is reachable: + the steps that follow are the proof that a path needs no Node.js. +runs: + using: composite + steps: + - name: Remove Node.js, npm and npx + shell: bash + run: | + for tool in node nodejs npm npx corepack; do + while path=$(command -v "$tool"); do + sudo rm -f "$path" || exit 1 + hash -r + done + done + for tool in node nodejs npm npx; do + if command -v "$tool"; then + echo "::error::$tool is still reachable" + exit 1 + fi + done diff --git a/.github/actions/wf-driver/action.yml b/.github/actions/wf-driver/action.yml new file mode 100644 index 00000000..c3a26d06 --- /dev/null +++ b/.github/actions/wf-driver/action.yml @@ -0,0 +1,42 @@ +name: Build the wf driver +description: >- + Builds webfront-wf (WebKitGTK frontend), the non-interactive driver of the WebFront developer environment, from the + bootstrap environment pinned by cmake/WebFrontBootstrap.cmake, and installs a `wf` command that runs a wf command on the + project at the root of the workspace. Node.js is neither used nor required (WEBFRONT_REQUIRE_NODE=OFF). +runs: + using: composite + steps: + - uses: ./.github/actions/setup-cmake + with: + version: '4.4.4' + # Ubuntu 26.04 ships GCC 16 in its main archive. The image already provides Ninja, pkg-config and Xvfb. + - name: Install GCC 16 and WebKitGTK + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends -o Acquire::Retries=3 gcc-16 g++-16 libwebkitgtk-6.0-dev + echo "CC=gcc-16" >> "$GITHUB_ENV" + echo "CXX=g++-16" >> "$GITHUB_ENV" + - name: Build webfront-wf + shell: bash + run: | + cmake -S . -B build-driver -G Ninja -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON \ + -DWEBFRONT_REQUIRE_NODE=OFF -DWEBFRONT_EMBED_WEBKITGTK=ON -DWEBFRONT_WEBTEST_FRONTEND=WebKitGTK \ + -DCMAKE_CXX_SCAN_FOR_MODULES=OFF + cmake --build build-driver --target webfront-wf --parallel 2 + - name: Install the wf command + shell: bash + run: | + bin="$RUNNER_TEMP/wf-bin" + mkdir -p "$bin" + # The sandbox opt-out is confined to this driver, which runs trusted sources and a verified environment. + cat > "$bin/wf" <