From fe00ae76fb4d0d14903308f6278f0a838f5208de Mon Sep 17 00:00:00 2001 From: pedro-bento Date: Wed, 21 Oct 2026 20:22:01 +0100 Subject: [PATCH 1/4] Updated README.md --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0a70535..5f5bfd9 100644 --- a/README.md +++ b/README.md @@ -4,27 +4,31 @@ A [Love2D](https://www.love2d.org/) antagonist. ## Quick Start +### On Linux, macOS, BSD or POSIX + ```sh echo -e 'print("Hey! I am hate-no-d!")' > quick-start.lua ./hate-no-d quick-start.lua ``` +### On Windows + +```bat +echo print("Hey! I am hate-no-d!") > quick-start.lua +hate-no-d.exe quick-start.lua +``` + ## Build +### On Linux, macOS, BSD or POSIX + ```sh git clone --recurse-submodules https://git.pbento.pt/pedro-bento/hate-no-d.git cd hate-no-d make ``` -## Quick Start (Windows) - -```bat -echo print("Hey! I am hate-no-d!") > quick-start.lua -hate-no-d.exe quick-start.lua -``` - -## Build (Windows) +### On Windows ```bat git clone --recurse-submodules https://git.pbento.pt/pedro-bento/hate-no-d.git -- 2.45.2 From bcfc125419a8b17f1248b9372ee591086c4bed7c Mon Sep 17 00:00:00 2001 From: pedro-bento Date: Wed, 21 Oct 2026 20:50:17 +0100 Subject: [PATCH 2/4] Add release pipeline --- .forgejo/scripts/freebsd-build.sh | 143 +++++++++++++ .forgejo/scripts/release-asset.sh | 72 +++++++ .forgejo/workflows/release.yml | 332 ++++++++++++++++++++++++++++++ .gitignore | 1 + Makefile | 33 +++ 5 files changed, 581 insertions(+) create mode 100644 .forgejo/scripts/freebsd-build.sh create mode 100644 .forgejo/scripts/release-asset.sh create mode 100644 .forgejo/workflows/release.yml diff --git a/.forgejo/scripts/freebsd-build.sh b/.forgejo/scripts/freebsd-build.sh new file mode 100644 index 0000000..c05f788 --- /dev/null +++ b/.forgejo/scripts/freebsd-build.sh @@ -0,0 +1,143 @@ +#!/bin/sh +# Build hate-no-d inside a FreeBSD VM and copy the binary back. +# +# freebsd-build.sh [source-dir] +# +# Runs on Linux (CI job container or a workstation) and needs: +# qemu-system-x86, cloud-image-utils (cloud-localds), openssh-client, xz, curl +# +# The FreeBSD guest is booted with -snapshot, so every run starts from the +# pristine image: nothing is installed in it and nothing persists. +# +# Requires /dev/kvm. Under the Forgejo docker runner that means the runner +# config must pass it through, e.g. +# container: +# options: "--device /dev/kvm" +# Without KVM, QEMU falls back to TCG and a FreeBSD boot takes many minutes. +set -eu + +VERSION="${FREEBSD_VERSION:-15.1}" +ARCH=amd64 +BASE="https://download.freebsd.org/releases/VM-IMAGES/${VERSION}-RELEASE/${ARCH}/Latest" +IMAGE="FreeBSD-${VERSION}-RELEASE-${ARCH}-BASIC-CLOUDINIT-ufs.qcow2.xz" +SSH_PORT="${FREEBSD_SSH_PORT:-2222}" + +if [ $# -lt 1 ]; then + echo "usage: $0 [source-dir]" >&2 + exit 2 +fi +OUT_DIR=$(dirname "$1") +mkdir -p "$OUT_DIR" +OUT=$(cd "$OUT_DIR" && pwd)/$(basename "$1") +SRC=$(cd "${2:-.}" && pwd) + +WORK="${FBSD_WORK:-${TMPDIR:-/tmp}/fbsd-ci}" + +log() { echo "freebsd-build: $*"; } +die() { echo "freebsd-build: $*" >&2; exit 1; } + +[ -r /dev/kvm ] && [ -w /dev/kvm ] || die "/dev/kvm is not usable; the runner must expose it (container options: --device /dev/kvm)" + +mkdir -p "$WORK" +cd "$WORK" + +# --- guest credentials ------------------------------------------------------- +[ -f id_ci ] || ssh-keygen -t ed25519 -N '' -f id_ci -q +chmod 600 id_ci +PUB=$(cat id_ci.pub) + +cat > user-data < meta-data <<'EOF' +instance-id: fbsd-ci-1 +local-hostname: fbsd-ci +EOF + +# --- disk image -------------------------------------------------------------- +if [ ! -f disk.qcow2 ]; then + [ -f "$IMAGE" ] || { log "downloading $IMAGE"; curl -fsSL -o "$IMAGE" "$BASE/$IMAGE"; } + log "decompressing" + xz -dc -T0 "$IMAGE" > disk.qcow2 +fi + +log "building cloud-init seed" +cloud-localds seed.iso user-data meta-data + +# --- boot -------------------------------------------------------------------- +SSH_OPTS="-i $WORK/id_ci -p $SSH_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -o BatchMode=yes -o ConnectTimeout=3" +SCP_OPTS="-i $WORK/id_ci -P $SSH_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -o BatchMode=yes" + +rm -f console.log qemu.pid +qemu_pid="" + +cleanup() { + if [ -n "$qemu_pid" ] && kill -0 "$qemu_pid" 2>/dev/null; then + kill "$qemu_pid" 2>/dev/null || true + wait "$qemu_pid" 2>/dev/null || true + fi +} +trap cleanup EXIT INT TERM + +log "booting FreeBSD $VERSION" +qemu-system-x86_64 \ + -M q35 -cpu host -smp 2 -m 2048 \ + -enable-kvm \ + -drive file=disk.qcow2,if=virtio,format=qcow2,snapshot=on \ + -drive file=seed.iso,if=virtio,media=cdrom,readonly=on \ + -netdev "user,id=n0,hostfwd=tcp:127.0.0.1:${SSH_PORT}-:22" \ + -device virtio-net-pci,netdev=n0 \ + -display none -serial file:console.log \ + -daemonize -pidfile qemu.pid +qemu_pid=$(cat qemu.pid) + +ssh_vm() { ssh $SSH_OPTS "root@127.0.0.1" "$@"; } + +i=0 +until ssh_vm true 2>/dev/null; do + i=$((i + 1)) + if [ "$i" -gt 90 ]; then + tail -40 console.log >&2 || true + die "guest did not become reachable over SSH" + fi + sleep 2 +done +log "guest up after ~$((i * 2))s: $(ssh_vm 'uname -sr')" + +# --- build ------------------------------------------------------------------- +log "installing gmake in guest" +ssh_vm 'set -e; env ASSUME_ALWAYS_YES=yes pkg install -y gmake >/dev/null 2>&1; gmake --version | head -1' + +log "transferring source" +tar czf "$WORK/src.tar.gz" -C "$SRC" \ + --exclude=.git --exclude=.build --exclude=hate-no-d \ + --exclude='*.o' --exclude='*.a' --exclude='*.so' . +scp $SCP_OPTS "$WORK/src.tar.gz" "root@127.0.0.1:/root/src.tar.gz" + +# FreeBSD has no gcc; LuaJIT's Makefile defaults to it, so CC must be forced on +# the command line for it to reach the sub-make. +log "building" +ssh_vm 'set -e + rm -rf /root/src && mkdir -p /root/src + tar xzf /root/src.tar.gz -C /root/src + cd /root/src + gmake CC=cc clean >/dev/null 2>&1 || true + gmake CC=cc all' + +log "fetching binary" +mkdir -p "$(dirname "$OUT")" +scp $SCP_OPTS "root@127.0.0.1:/root/src/hate-no-d" "$OUT" + +log "built $OUT ($(wc -c < "$OUT") bytes)" diff --git a/.forgejo/scripts/release-asset.sh b/.forgejo/scripts/release-asset.sh new file mode 100644 index 0000000..e7999d5 --- /dev/null +++ b/.forgejo/scripts/release-asset.sh @@ -0,0 +1,72 @@ +#!/bin/sh +# Attach one file to the release for $TAG, creating the release if needed. +# +# release-asset.sh [asset-name] +# +# Idempotent: re-running a tagged pipeline replaces the existing asset instead +# of failing, and concurrent jobs racing to create the same release converge on +# whichever POST wins. +# +# Environment: FORGEJO_API_URL, FORGEJO_TOKEN, REPO (owner/name), TAG +set -eu + +api="${FORGEJO_API_URL:?FORGEJO_API_URL is not set}" +repo="${REPO:?REPO is not set}" +tag="${TAG:?TAG is not set}" +token="${FORGEJO_TOKEN:?FORGEJO_TOKEN is not set}" + +case "$api" in + http*) ;; + *) + # An unexpanded ${{ github.server_url }} leaves this as a bare "/api/v1"; + # fail loudly instead of letting curl emit a cryptic URL error. + echo "release-asset: FORGEJO_API_URL is not a URL: '$api'" >&2 + echo " set github.server_url support or override the env var" >&2 + exit 1 + ;; +esac + +file="$1" +name="${2:-$(basename "$file")}" + +[ -f "$file" ] || { echo "release-asset: no such file: $file" >&2; exit 1; } + +auth="Authorization: token $token" +get_rid() { + curl -fsS -H "$auth" "$api/repos/$repo/releases/tags/$tag" | jq -r '.id // empty' +} + +rid="$(get_rid || true)" + +if [ -z "$rid" ]; then + echo "release-asset: creating release $tag" + curl -sS -o /dev/null -H "$auth" -H 'Content-Type: application/json' \ + -X POST "$api/repos/$repo/releases" \ + --data "$(jq -nc --arg t "$tag" '{tag_name: $t, name: $t}')" || true + + # A parallel job may have created it between our GET and POST. + i=0 + while [ -z "$rid" ] && [ "$i" -lt 5 ]; do + sleep 1 + rid="$(get_rid || true)" + i=$((i + 1)) + done +fi + +[ -n "$rid" ] || { echo "release-asset: cannot resolve release for $tag" >&2; exit 1; } + +# Replace a same-named asset so a re-run does not accumulate duplicates. +old="$(curl -fsS -H "$auth" "$api/repos/$repo/releases/$rid/assets" \ + | jq -r --arg n "$name" '.[] | select(.name == $n) | .id' | head -1)" + +if [ -n "$old" ]; then + echo "release-asset: replacing existing asset $name" + curl -fsS -o /dev/null -H "$auth" \ + -X DELETE "$api/repos/$repo/releases/$rid/assets/$old" +fi + +curl -fsS -H "$auth" -X POST \ + "$api/repos/$repo/releases/$rid/assets?name=$name" \ + -F "attachment=@$file" >/dev/null + +echo "release-asset: uploaded $name to $tag" diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..5b5c678 --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -0,0 +1,332 @@ +# Build hate-no-d for every supported target and attach the binaries to a Forgejo release. +# +# push to master / pull request -> build only +# push a tag matching 'v*' -> build + release assets +# workflow_dispatch -> same as a branch push +# +# Release assets are uploaded straight to the REST API, one file per platform: +# hate-no-d-linux-{x86_64,i686,aarch64,armv7} +# hate-no-d-macos-{arm64,x86_64} +# hate-no-d-android-{arm64-v8a,armeabi-v7a,x86_64} +# hate-no-d-windows_mingw_w64-{x64,x86}.exe +# hate-no-d-ios-arm64-luajit.a +# hate-no-d-freebsd-x86_64 +# +# Only Apple's targets need more than the Linux runner, and they are gated +# behind a repository variable set to "true" (needs a matching runner): +# ENABLE_MACOS (macOS runner, label: macos) -> macos + ios jobs +name: release + +on: + push: + branches: [master] + tags: ['v*'] + pull_request: + workflow_dispatch: + +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: true + +# Note: Forgejo ignores `permissions:` entirely. The automatic workflow token +# already has write access to its own repository, which is what the release +# steps rely on. Forked pull requests get a read-only token, but they never +# reach the upload steps (those are tag-gated). + +env: + FORGEJO_API_URL: ${{ github.server_url }}/api/v1 + FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + TAG: ${{ github.ref_name }} + +jobs: + # --------------------------------------------------------------------------- + # Linux. Built on Debian bullseye so the binaries carry a glibc 2.31 floor + # (Debian 11, Ubuntu 20.04+, RHEL 9). Bumping the image silently raises that + # floor, so do not move it without meaning to. + # --------------------------------------------------------------------------- + linux: + name: linux/${{ matrix.arch }} + runs-on: docker + container: + image: node:20-bullseye # node + git: actions/checkout is a JS action + strategy: + fail-fast: false + matrix: + include: + - arch: x86_64 + machine: X86-64 + make_args: '' + packages: '' + # 32-bit target: HOST_CC defaults to $(CC), so leaving HOST_CC + # unset builds minilua/buildvm 32-bit too. LuaJIT requires host and + # target pointer sizes to match -- do not "optimise" this to + # HOST_CC=gcc. + - arch: i686 + machine: 'Intel 80386' + make_args: 'CC="gcc -m32"' + packages: 'gcc-multilib libc6-dev-i386' + # 64-bit host -> 64-bit target, so host tools stay native. + - arch: aarch64 + machine: AArch64 + make_args: 'CC=aarch64-linux-gnu-gcc HOST_CC=gcc' + packages: 'gcc-aarch64-linux-gnu qemu-user-static' + # 32-bit target: the 32-bit host tools are mandatory here. + - arch: armv7 + machine: ARM + make_args: 'CC=arm-linux-gnueabihf-gcc HOST_CC="gcc -m32"' + packages: 'gcc-arm-linux-gnueabihf qemu-user-static gcc-multilib libc6-dev-i386' + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: recursive + + - name: Install toolchain + run: | + set -eu + apt-get update -qq + apt-get install -y --no-install-recommends \ + make gcc libc6-dev binutils jq curl ca-certificates ${{ matrix.packages }} + + - name: Build + run: make ${{ matrix.make_args }} all + + # Guards the cross builds: a mis-set CROSS/CC silently yields a host + # binary, which is otherwise indistinguishable until it is run. + - name: Verify architecture + run: | + set -eu + readelf -h ./hate-no-d | grep -F 'Machine:' | grep -F '${{ matrix.machine }}' + echo "architecture ok: ${{ matrix.machine }}" + + - name: Attach to release + if: startsWith(github.ref, 'refs/tags/') + run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-linux-${{ matrix.arch }}" + + # --------------------------------------------------------------------------- + # Android. One job for all three ABIs: the NDK is a ~630 MB download and + # sharing it beats three parallel copies. The resulting binaries are Bionic + # ELF, so they cannot be executed here -- only the ELF header is checked. + # --------------------------------------------------------------------------- + android: + name: android + runs-on: docker + container: + image: node:20-bookworm + env: + ANDROID_NDK_VERSION: r27c + ANDROID_NDK: /opt/android-ndk-r27c + ANDROID_API: '21' + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: recursive + + - name: Install toolchain + # gcc-multilib is needed for the 32-bit host tools LuaJIT requires when + # the target is 32-bit (armeabi-v7a). + run: | + set -eu + apt-get update -qq + apt-get install -y --no-install-recommends \ + make gcc libc6-dev binutils jq curl ca-certificates unzip \ + gcc-multilib libc6-dev-i386 + + - name: Install NDK r27c + run: | + set -eu + url="https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux.zip" + curl -fsSL -o /tmp/ndk.zip "$url" + mkdir -p /opt + unzip -q /tmp/ndk.zip -d /opt + rm -f /tmp/ndk.zip + test -d "$ANDROID_NDK" + + - name: Build all ABIs + run: | + set -eu + mkdir -p dist + for abi in arm64-v8a armeabi-v7a x86_64; do + make clean >/dev/null 2>&1 || true + if [ "$abi" = armeabi-v7a ]; then + make PLATFORM=Android ANDROID_NDK="$ANDROID_NDK" ANDROID_API="$ANDROID_API" \ + ANDROID_ABI="$abi" HOST_CC="gcc -m32" all + else + make PLATFORM=Android ANDROID_NDK="$ANDROID_NDK" ANDROID_API="$ANDROID_API" \ + ANDROID_ABI="$abi" HOST_CC=gcc all + fi + readelf -h ./hate-no-d | grep -F 'Machine:' | grep -E 'AArch64|ARM|X86-64' + cp ./hate-no-d "dist/hate-no-d-android-$abi" + done + + - name: Attach to release + if: startsWith(github.ref, 'refs/tags/') + run: | + set -eu + for abi in arm64-v8a armeabi-v7a x86_64; do + sh .forgejo/scripts/release-asset.sh "dist/hate-no-d-android-$abi" "hate-no-d-android-$abi" + done + + # --------------------------------------------------------------------------- + # macOS. Apple SDKs are universal, so either runner arch can cross-build the + # other; only the target objects get -arch, the build tools stay native. + # --------------------------------------------------------------------------- + macos: + name: macos/${{ matrix.arch }} + if: vars.ENABLE_MACOS == 'true' + runs-on: macos + strategy: + fail-fast: false + matrix: + arch: [arm64, x86_64] + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: recursive + + - name: Build + run: | + make \ + CFLAGS="-O2 -Wall -arch ${{ matrix.arch }}" \ + LUAJIT_EXTRA="TARGET_FLAGS=-arch ${{ matrix.arch }}" \ + all + + - name: Verify architecture + run: | + set -eu + file ./hate-no-d + file ./hate-no-d | grep -q '${{ matrix.arch }}' + + - name: Attach to release + if: startsWith(github.ref, 'refs/tags/') + run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-macos-${{ matrix.arch }}" + + # --------------------------------------------------------------------------- + # iOS. Deliberately produces no executable: the JIT is compiled out and the + # archive is linked into an Xcode app target. Requires jq for the upload. + # --------------------------------------------------------------------------- + ios: + name: ios/arm64 + if: vars.ENABLE_MACOS == 'true' + runs-on: macos + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: recursive + + - name: Build libluajit.a + run: make PLATFORM=iOS IOS_ARCH=arm64 all + + - name: Verify archive + run: | + set -eu + lipo -info submodules/luajit/src/libluajit.a + lipo -info submodules/luajit/src/libluajit.a | grep -q arm64 + + - name: Attach to release + if: startsWith(github.ref, 'refs/tags/') + run: sh .forgejo/scripts/release-asset.sh submodules/luajit/src/libluajit.a hate-no-d-ios-arm64-luajit.a + + # --------------------------------------------------------------------------- + # FreeBSD. Built inside a FreeBSD VM booted with QEMU/KVM on the Linux runner, + # so no FreeBSD runner is needed: the tooling lives on the Linux side and only + # the compilation happens in the guest. + # + # The job container needs /dev/kvm, e.g. in the act_runner config: + # container: + # options: "--device /dev/kvm" + # Without it the script fails immediately rather than crawling along on TCG. + # + # Measured ~1m40s end to end: 70s boot, ~15s pkg install, ~14s build. + # --------------------------------------------------------------------------- + bsd: + name: freebsd/x86_64 + runs-on: docker + container: + image: node:20-bookworm + timeout-minutes: 20 + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: recursive + + - name: Install QEMU + run: | + set -eu + apt-get update -qq + apt-get install -y --no-install-recommends \ + qemu-system-x86 cloud-image-utils openssh-client xz-utils jq + + - name: Build in FreeBSD VM + run: | + set -eu + mkdir -p dist + sh .forgejo/scripts/freebsd-build.sh dist/hate-no-d-freebsd-x86_64 . + + - name: Attach to release + if: startsWith(github.ref, 'refs/tags/') + run: sh .forgejo/scripts/release-asset.sh dist/hate-no-d-freebsd-x86_64 hate-no-d-freebsd-x86_64 + + # --------------------------------------------------------------------------- + # Windows. Cross-compiled with mingw-w64 on the Linux runner, so no Windows + # machine and no MSVC are involved: the result is a self-contained PE that + # imports only KERNEL32/msvcrt. build.bat remains for native MSVC builds. + # + # i686 needs a 32-bit host compiler: LuaJIT's buildvm runs natively and must + # have the target's pointer size. + # + # Releases are named hate-no-d-windows_mingw_w64-x64.exe and + # hate-no-d-windows_mingw_w64-x86.exe. The build itself stays hate-no-d.exe + # (same as build.bat); the toolchain-qualified name is only the asset name. + # --------------------------------------------------------------------------- + windows: + name: windows/${{ matrix.arch }} + runs-on: docker + container: + image: node:20-bookworm + strategy: + fail-fast: false + matrix: + include: + - arch: x86_64 + tag: windows_mingw_w64-x64 + host_cc: gcc + - arch: i686 + tag: windows_mingw_w64-x86 + host_cc: gcc -m32 + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: recursive + + # libc6-dev is not pulled in by gcc under --no-install-recommends, and + # without it the host build of minilua cannot find limits.h. + - name: Install toolchain + run: | + set -eu + apt-get update -qq + apt-get install -y --no-install-recommends \ + make gcc libc6-dev gcc-multilib mingw-w64 jq + + - name: Build + run: make PLATFORM=Windows WIN_ARCH=${{ matrix.arch }} HOST_CC="${{ matrix.host_cc }}" all + + - name: Verify executable + run: | + set -eu + bin=hate-no-d.exe + file "./$bin" | grep -q 'for MS Windows' + deps=$(${{ matrix.arch }}-w64-mingw32-objdump -p "./$bin" | awk '/DLL Name/{print $3}') + echo "$deps" + bad=$(printf '%s\n' "$deps" | grep -v -E '^(KERNEL32|msvcrt)\.dll$' || true) + [ -z "$bad" ] || { echo "unexpected runtime DLL dependency: $bad" >&2; exit 1; } + + - name: Attach to release + if: startsWith(github.ref, 'refs/tags/') + run: sh .forgejo/scripts/release-asset.sh ./hate-no-d.exe hate-no-d-${{ matrix.tag }}.exe diff --git a/.gitignore b/.gitignore index ccaa541..5510824 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ hate-no-d +hate-no-d.exe quick-start.lua diff --git a/Makefile b/Makefile index a4ffe4b..0dc7399 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ # make PLATFORM=Android ANDROID_NDK=/opt/android-ndk # make PLATFORM=Android ANDROID_NDK=... ANDROID_ABI=armeabi-v7a ANDROID_API=21 # make PLATFORM=iOS IOS_ARCH=arm64 IOS_MIN=12.0 +# make PLATFORM=Windows WIN_ARCH=x86_64 (cross build with mingw-w64) # luajit requires GNU Make (use `gmake` on FreeBSD/OpenBSD/NetBSD). ifndef .FEATURES @@ -32,6 +33,8 @@ else ifeq ($(PLATFORM),Darwin) OS_KIND := macos else ifeq ($(PLATFORM),iOS) OS_KIND := ios +else ifeq ($(PLATFORM),Windows) + OS_KIND := windows else ifneq (,$(filter $(PLATFORM),FreeBSD OpenBSD NetBSD DragonFly GNU/kFreeBSD)) OS_KIND := bsd else @@ -60,6 +63,35 @@ ifeq ($(OS_KIND),posix) LINK_TARGET := $(BIN) endif +# Windows (PE, cross-compiled from a POSIX host with mingw-w64) +# +# Native builds use build.bat. +# +# 64-bit targets build on any 64-bit host. i686 also needs a 32-bit host +# compiler, because LuaJIT's buildvm runs natively and its pointer size must +# match the target: +# make PLATFORM=Windows WIN_ARCH=i686 HOST_CC="gcc -m32" +# +# No export table: ffi.C resolves through msvcrt/kernel32 handles on Windows, +# unlike ELF where the Lua API has to be exported with -Wl,-E. +ifeq ($(OS_KIND),windows) + WIN_ARCH ?= x86_64 + + ifeq ($(filter $(WIN_ARCH),x86_64 i686),) + $(error WIN_ARCH must be x86_64 or i686) + endif + + CC := $(WIN_ARCH)-w64-mingw32-gcc + HOST_CC ?= gcc + PLAT_LIBS := -lm + BIN := $(BIN).exe + LINK_TARGET := $(BIN) + + # LuaJIT derives HOST_CC from CC, so label both to the sub-make: otherwise + # the host tools (minilua, buildvm) are compiled with the cross compiler. + LUAJIT_EXTRA := "CC=$(CC)" "HOST_CC=$(HOST_CC)" TARGET_SYS=Windows +endif + # macOS (Mach-O) # # ld64 exports main-executable globals by default; -export_dynamic only stops @@ -192,6 +224,7 @@ print-config: @echo "MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET) (HRT=$(MACOSX_HRT))" @echo "ANDROID_ABI / API = $(ANDROID_ABI) / $(ANDROID_API)" @echo "IOS_ARCH / MIN = $(IOS_ARCH) / $(IOS_MIN)" + @echo "WIN_ARCH = $(WIN_ARCH) (HOST_CC=$(HOST_CC))" clean: $(MAKE) -C $(LUAJIT_DIR) clean -- 2.45.2 From 0954f5cbfcb4d5c9c893064e3b118c0f15e5b92d Mon Sep 17 00:00:00 2001 From: pedro-bento Date: Wed, 21 Oct 2026 21:14:05 +0100 Subject: [PATCH 3/4] Fix pipeline --- .forgejo/workflows/apple.yml | 96 ++++++++++++++++++++++++++++++++++ .forgejo/workflows/release.yml | 92 ++++++++------------------------ README.md | 8 +-- 3 files changed, 121 insertions(+), 75 deletions(-) create mode 100644 .forgejo/workflows/apple.yml diff --git a/.forgejo/workflows/apple.yml b/.forgejo/workflows/apple.yml new file mode 100644 index 0000000..7a2d7d8 --- /dev/null +++ b/.forgejo/workflows/apple.yml @@ -0,0 +1,96 @@ +# Apple targets (macOS + iOS), kept out of the main release pipeline. +# +# Why a separate file: Forgejo Runner is Linux-only, so these jobs need a +# self-hosted runner carrying the `macos` label. Gating them inside +# release.yml with `if: vars.ENABLE_MACOS == 'true'` did not work -- Forgejo +# does not evaluate the `vars` context there, so the jobs were queued forever +# on a label that does not exist and the whole run never finished. +# +# This workflow only exists when dispatched by hand, so it costs nothing until +# a Mac runner is registered. +name: apple + +on: + workflow_dispatch: + inputs: + tag: + description: 'Release tag to attach artifacts to (empty = build only)' + required: false + default: '' + +env: + FORGEJO_API_URL: ${{ github.server_url }}/api/v1 + FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + TAG: ${{ github.event.inputs.tag }} + +jobs: + # --------------------------------------------------------------------------- + # macOS. Apple SDKs are universal, so either runner arch can cross-build the + # other; only the target objects get -arch, the build tools stay native. + # --------------------------------------------------------------------------- + macos: + name: macos/${{ matrix.arch }} + runs-on: macos + strategy: + fail-fast: false + matrix: + arch: [arm64, x86_64] + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: false + + # luajit.org serves git over dumb HTTP, which rejects shallow clones. + # checkout's submodule support always passes --depth, which fails with + # "dumb http transport does not support shallow capabilities", so the + # submodule is cloned in full here instead. + - name: Fetch submodules + run: git submodule update --init --recursive + + - name: Build + run: | + make \ + CFLAGS="-O2 -Wall -arch ${{ matrix.arch }}" \ + LUAJIT_EXTRA="TARGET_FLAGS=-arch ${{ matrix.arch }}" \ + all + + - name: Verify architecture + run: | + set -eu + file ./hate-no-d + file ./hate-no-d | grep -q '${{ matrix.arch }}' + + - name: Attach to release + if: github.event.inputs.tag != '' + run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-macos-${{ matrix.arch }}" + + # --------------------------------------------------------------------------- + # iOS. Deliberately produces no executable: the JIT is compiled out and the + # archive is linked into an Xcode app target. Requires jq for the upload. + # --------------------------------------------------------------------------- + ios: + name: ios/arm64 + runs-on: macos + steps: + - name: Checkout + uses: https://data.forgejo.org/actions/checkout@v4 + with: + submodules: false + + - name: Fetch submodules + run: git submodule update --init --recursive + + - name: Build libluajit.a + run: make PLATFORM=iOS IOS_ARCH=arm64 all + + - name: Verify archive + run: | + set -eu + lipo -info submodules/luajit/src/libluajit.a + lipo -info submodules/luajit/src/libluajit.a | grep -q arm64 + + - name: Attach to release + if: github.event.inputs.tag != '' + run: sh .forgejo/scripts/release-asset.sh submodules/luajit/src/libluajit.a hate-no-d-ios-arm64-luajit.a diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 5b5c678..f0ffd1d 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -6,15 +6,15 @@ # # Release assets are uploaded straight to the REST API, one file per platform: # hate-no-d-linux-{x86_64,i686,aarch64,armv7} -# hate-no-d-macos-{arm64,x86_64} # hate-no-d-android-{arm64-v8a,armeabi-v7a,x86_64} # hate-no-d-windows_mingw_w64-{x64,x86}.exe -# hate-no-d-ios-arm64-luajit.a # hate-no-d-freebsd-x86_64 # -# Only Apple's targets need more than the Linux runner, and they are gated -# behind a repository variable set to "true" (needs a matching runner): -# ENABLE_MACOS (macOS runner, label: macos) -> macos + ios jobs +# apple.yml adds hate-no-d-macos-{arm64,x86_64} and hate-no-d-ios-arm64-luajit.a +# when it is dispatched against a Mac runner. +# +# Everything in this file builds on a Linux runner: FreeBSD inside a QEMU guest, +# Windows cross-compiled with mingw-w64. name: release on: @@ -80,7 +80,10 @@ jobs: - name: Checkout uses: https://data.forgejo.org/actions/checkout@v4 with: - submodules: recursive + submodules: false + + - name: Fetch submodules + run: git submodule update --init --recursive - name: Install toolchain run: | @@ -122,7 +125,10 @@ jobs: - name: Checkout uses: https://data.forgejo.org/actions/checkout@v4 with: - submodules: recursive + submodules: false + + - name: Fetch submodules + run: git submodule update --init --recursive - name: Install toolchain # gcc-multilib is needed for the 32-bit host tools LuaJIT requires when @@ -169,68 +175,6 @@ jobs: sh .forgejo/scripts/release-asset.sh "dist/hate-no-d-android-$abi" "hate-no-d-android-$abi" done - # --------------------------------------------------------------------------- - # macOS. Apple SDKs are universal, so either runner arch can cross-build the - # other; only the target objects get -arch, the build tools stay native. - # --------------------------------------------------------------------------- - macos: - name: macos/${{ matrix.arch }} - if: vars.ENABLE_MACOS == 'true' - runs-on: macos - strategy: - fail-fast: false - matrix: - arch: [arm64, x86_64] - steps: - - name: Checkout - uses: https://data.forgejo.org/actions/checkout@v4 - with: - submodules: recursive - - - name: Build - run: | - make \ - CFLAGS="-O2 -Wall -arch ${{ matrix.arch }}" \ - LUAJIT_EXTRA="TARGET_FLAGS=-arch ${{ matrix.arch }}" \ - all - - - name: Verify architecture - run: | - set -eu - file ./hate-no-d - file ./hate-no-d | grep -q '${{ matrix.arch }}' - - - name: Attach to release - if: startsWith(github.ref, 'refs/tags/') - run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-macos-${{ matrix.arch }}" - - # --------------------------------------------------------------------------- - # iOS. Deliberately produces no executable: the JIT is compiled out and the - # archive is linked into an Xcode app target. Requires jq for the upload. - # --------------------------------------------------------------------------- - ios: - name: ios/arm64 - if: vars.ENABLE_MACOS == 'true' - runs-on: macos - steps: - - name: Checkout - uses: https://data.forgejo.org/actions/checkout@v4 - with: - submodules: recursive - - - name: Build libluajit.a - run: make PLATFORM=iOS IOS_ARCH=arm64 all - - - name: Verify archive - run: | - set -eu - lipo -info submodules/luajit/src/libluajit.a - lipo -info submodules/luajit/src/libluajit.a | grep -q arm64 - - - name: Attach to release - if: startsWith(github.ref, 'refs/tags/') - run: sh .forgejo/scripts/release-asset.sh submodules/luajit/src/libluajit.a hate-no-d-ios-arm64-luajit.a - # --------------------------------------------------------------------------- # FreeBSD. Built inside a FreeBSD VM booted with QEMU/KVM on the Linux runner, # so no FreeBSD runner is needed: the tooling lives on the Linux side and only @@ -253,7 +197,10 @@ jobs: - name: Checkout uses: https://data.forgejo.org/actions/checkout@v4 with: - submodules: recursive + submodules: false + + - name: Fetch submodules + run: git submodule update --init --recursive - name: Install QEMU run: | @@ -303,7 +250,10 @@ jobs: - name: Checkout uses: https://data.forgejo.org/actions/checkout@v4 with: - submodules: recursive + submodules: false + + - name: Fetch submodules + run: git submodule update --init --recursive # libc6-dev is not pulled in by gcc under --no-install-recommends, and # without it the host build of minilua cannot find limits.h. diff --git a/README.md b/README.md index 5f5bfd9..85e4b7a 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ A [Love2D](https://www.love2d.org/) antagonist. ## Quick Start -### On Linux, macOS, BSD or POSIX +### On Linux, macOS, BSD, POSIX or Windows-MinGW ```sh echo -e 'print("Hey! I am hate-no-d!")' > quick-start.lua ./hate-no-d quick-start.lua ``` -### On Windows +### On Windows MSVC ```bat echo print("Hey! I am hate-no-d!") > quick-start.lua @@ -20,7 +20,7 @@ hate-no-d.exe quick-start.lua ## Build -### On Linux, macOS, BSD or POSIX +### On Linux, macOS, BSD, POSIX or Windows-MinGW ```sh git clone --recurse-submodules https://git.pbento.pt/pedro-bento/hate-no-d.git @@ -28,7 +28,7 @@ cd hate-no-d make ``` -### On Windows +### On Windows MSVC ```bat git clone --recurse-submodules https://git.pbento.pt/pedro-bento/hate-no-d.git -- 2.45.2 From db48c2be51b770b6dc8e93cadbefe3e2c7334f04 Mon Sep 17 00:00:00 2001 From: pedro-bento Date: Wed, 21 Oct 2026 21:41:18 +0100 Subject: [PATCH 4/4] Fix pipeline --- .forgejo/scripts/freebsd-build.sh | 17 ++---- .forgejo/scripts/release-asset.sh | 10 +--- .forgejo/workflows/apple.yml | 26 +++------ .forgejo/workflows/release.yml | 94 ++++++++++++------------------- 4 files changed, 50 insertions(+), 97 deletions(-) diff --git a/.forgejo/scripts/freebsd-build.sh b/.forgejo/scripts/freebsd-build.sh index c05f788..63731ef 100644 --- a/.forgejo/scripts/freebsd-build.sh +++ b/.forgejo/scripts/freebsd-build.sh @@ -3,17 +3,9 @@ # # freebsd-build.sh [source-dir] # -# Runs on Linux (CI job container or a workstation) and needs: -# qemu-system-x86, cloud-image-utils (cloud-localds), openssh-client, xz, curl -# -# The FreeBSD guest is booted with -snapshot, so every run starts from the -# pristine image: nothing is installed in it and nothing persists. -# -# Requires /dev/kvm. Under the Forgejo docker runner that means the runner -# config must pass it through, e.g. -# container: -# options: "--device /dev/kvm" -# Without KVM, QEMU falls back to TCG and a FreeBSD boot takes many minutes. +# Needs qemu-system-x86, cloud-image-utils, openssh-client, xz and curl, plus +# /dev/kvm (act_runner: options: "--device /dev/kvm"); under TCG the boot takes +# many minutes. The guest runs with -snapshot, so nothing persists. set -eu VERSION="${FREEBSD_VERSION:-15.1}" @@ -126,8 +118,7 @@ tar czf "$WORK/src.tar.gz" -C "$SRC" \ --exclude='*.o' --exclude='*.a' --exclude='*.so' . scp $SCP_OPTS "$WORK/src.tar.gz" "root@127.0.0.1:/root/src.tar.gz" -# FreeBSD has no gcc; LuaJIT's Makefile defaults to it, so CC must be forced on -# the command line for it to reach the sub-make. +# FreeBSD has no gcc: CC must be on the command line to reach the sub-make. log "building" ssh_vm 'set -e rm -rf /root/src && mkdir -p /root/src diff --git a/.forgejo/scripts/release-asset.sh b/.forgejo/scripts/release-asset.sh index e7999d5..0921bf2 100644 --- a/.forgejo/scripts/release-asset.sh +++ b/.forgejo/scripts/release-asset.sh @@ -3,11 +3,8 @@ # # release-asset.sh [asset-name] # -# Idempotent: re-running a tagged pipeline replaces the existing asset instead -# of failing, and concurrent jobs racing to create the same release converge on -# whichever POST wins. -# -# Environment: FORGEJO_API_URL, FORGEJO_TOKEN, REPO (owner/name), TAG +# Idempotent: a re-run replaces the asset, and jobs racing to create the same +# release converge. Env: FORGEJO_API_URL, FORGEJO_TOKEN, REPO, TAG. set -eu api="${FORGEJO_API_URL:?FORGEJO_API_URL is not set}" @@ -18,8 +15,7 @@ token="${FORGEJO_TOKEN:?FORGEJO_TOKEN is not set}" case "$api" in http*) ;; *) - # An unexpanded ${{ github.server_url }} leaves this as a bare "/api/v1"; - # fail loudly instead of letting curl emit a cryptic URL error. + # An unexpanded github.server_url leaves a bare "/api/v1"; fail loudly. echo "release-asset: FORGEJO_API_URL is not a URL: '$api'" >&2 echo " set github.server_url support or override the env var" >&2 exit 1 diff --git a/.forgejo/workflows/apple.yml b/.forgejo/workflows/apple.yml index 7a2d7d8..57a38eb 100644 --- a/.forgejo/workflows/apple.yml +++ b/.forgejo/workflows/apple.yml @@ -1,13 +1,7 @@ -# Apple targets (macOS + iOS), kept out of the main release pipeline. -# -# Why a separate file: Forgejo Runner is Linux-only, so these jobs need a -# self-hosted runner carrying the `macos` label. Gating them inside -# release.yml with `if: vars.ENABLE_MACOS == 'true'` did not work -- Forgejo -# does not evaluate the `vars` context there, so the jobs were queued forever -# on a label that does not exist and the whole run never finished. -# -# This workflow only exists when dispatched by hand, so it costs nothing until -# a Mac runner is registered. +# Apple targets (macOS + iOS), kept out of release.yml: they need a `macos` +# runner. Gating them there with `if: vars.*` does not work -- Forgejo does not +# evaluate `vars` in `if:`, so the jobs queued forever and the run never +# finished. Manual dispatch only, until a Mac runner exists. name: apple on: @@ -26,8 +20,7 @@ env: jobs: # --------------------------------------------------------------------------- - # macOS. Apple SDKs are universal, so either runner arch can cross-build the - # other; only the target objects get -arch, the build tools stay native. + # macOS. The SDKs are universal: only target objects get -arch. # --------------------------------------------------------------------------- macos: name: macos/${{ matrix.arch }} @@ -42,10 +35,8 @@ jobs: with: submodules: false - # luajit.org serves git over dumb HTTP, which rejects shallow clones. - # checkout's submodule support always passes --depth, which fails with - # "dumb http transport does not support shallow capabilities", so the - # submodule is cloned in full here instead. + # luajit.org is dumb HTTP and rejects the --depth that checkout's + # submodule support always passes, so clone it here in full. - name: Fetch submodules run: git submodule update --init --recursive @@ -67,8 +58,7 @@ jobs: run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-macos-${{ matrix.arch }}" # --------------------------------------------------------------------------- - # iOS. Deliberately produces no executable: the JIT is compiled out and the - # archive is linked into an Xcode app target. Requires jq for the upload. + # iOS. Builds only the archive (JIT compiled out) for an Xcode app target. # --------------------------------------------------------------------------- ios: name: ios/arm64 diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index f0ffd1d..51718ca 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -1,20 +1,10 @@ -# Build hate-no-d for every supported target and attach the binaries to a Forgejo release. +# Build every supported target and attach the binaries to a Forgejo release. # -# push to master / pull request -> build only -# push a tag matching 'v*' -> build + release assets -# workflow_dispatch -> same as a branch push +# push / pull_request -> build only +# tag 'v*' -> build + release assets # -# Release assets are uploaded straight to the REST API, one file per platform: -# hate-no-d-linux-{x86_64,i686,aarch64,armv7} -# hate-no-d-android-{arm64-v8a,armeabi-v7a,x86_64} -# hate-no-d-windows_mingw_w64-{x64,x86}.exe -# hate-no-d-freebsd-x86_64 -# -# apple.yml adds hate-no-d-macos-{arm64,x86_64} and hate-no-d-ios-arm64-luajit.a -# when it is dispatched against a Mac runner. -# -# Everything in this file builds on a Linux runner: FreeBSD inside a QEMU guest, -# Windows cross-compiled with mingw-w64. +# Assets: hate-no-d-linux-*, -android-*, -windows_mingw_w64-*.exe, -freebsd-x86_64. +# macOS/iOS live in apple.yml; everything here builds on the Linux runner. name: release on: @@ -28,10 +18,8 @@ concurrency: group: release-${{ github.ref }} cancel-in-progress: true -# Note: Forgejo ignores `permissions:` entirely. The automatic workflow token -# already has write access to its own repository, which is what the release -# steps rely on. Forked pull requests get a read-only token, but they never -# reach the upload steps (those are tag-gated). +# Forgejo ignores `permissions:`; the workflow token already has write access +# to its own repo, and fork PRs never reach the tag-gated upload steps. env: FORGEJO_API_URL: ${{ github.server_url }}/api/v1 @@ -41,15 +29,15 @@ env: jobs: # --------------------------------------------------------------------------- - # Linux. Built on Debian bullseye so the binaries carry a glibc 2.31 floor - # (Debian 11, Ubuntu 20.04+, RHEL 9). Bumping the image silently raises that - # floor, so do not move it without meaning to. + # Linux. bookworm sets the glibc 2.36 floor (Debian 12, Ubuntu 24.04+) and is + # shared with the android/windows jobs. Do not fall back to bullseye: its LTS + # ended 2026-08 and deb.debian.org no longer serves bullseye-security. # --------------------------------------------------------------------------- linux: name: linux/${{ matrix.arch }} runs-on: docker container: - image: node:20-bullseye # node + git: actions/checkout is a JS action + image: node:20-bookworm # node + git: actions/checkout is a JS action strategy: fail-fast: false matrix: @@ -58,10 +46,8 @@ jobs: machine: X86-64 make_args: '' packages: '' - # 32-bit target: HOST_CC defaults to $(CC), so leaving HOST_CC - # unset builds minilua/buildvm 32-bit too. LuaJIT requires host and - # target pointer sizes to match -- do not "optimise" this to - # HOST_CC=gcc. + # 32-bit target: leaving HOST_CC unset keeps minilua/buildvm 32-bit + # too. Host and target pointer sizes must match -- do not use HOST_CC=gcc. - arch: i686 machine: 'Intel 80386' make_args: 'CC="gcc -m32"' @@ -70,12 +56,16 @@ jobs: - arch: aarch64 machine: AArch64 make_args: 'CC=aarch64-linux-gnu-gcc HOST_CC=gcc' - packages: 'gcc-aarch64-linux-gnu qemu-user-static' - # 32-bit target: the 32-bit host tools are mandatory here. + packages: 'gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user-static' + # 32-bit target, so the host tools must be 32-bit too. gcc-multilib + # cannot be installed (gcc-12-arm-linux-gnueabihf conflicts with it); + # lib32gcc-12-dev + libc6-dev-i386 replace it, and linux-libc-dev:i386 + # adds the 32-bit asm/ headers. - arch: armv7 machine: ARM make_args: 'CC=arm-linux-gnueabihf-gcc HOST_CC="gcc -m32"' - packages: 'gcc-arm-linux-gnueabihf qemu-user-static gcc-multilib libc6-dev-i386' + packages: 'gcc-arm-linux-gnueabihf libc6-dev-armhf-cross lib32gcc-12-dev libc6-dev-i386 linux-libc-dev:i386 qemu-user-static' + multiarch_i386: true steps: - name: Checkout uses: https://data.forgejo.org/actions/checkout@v4 @@ -88,6 +78,10 @@ jobs: - name: Install toolchain run: | set -eu + # Only armv7: linux-libc-dev:i386 provides its 32-bit asm/ headers. + if [ '${{ matrix.multiarch_i386 }}' = 'true' ]; then + dpkg --add-architecture i386 + fi apt-get update -qq apt-get install -y --no-install-recommends \ make gcc libc6-dev binutils jq curl ca-certificates ${{ matrix.packages }} @@ -95,8 +89,7 @@ jobs: - name: Build run: make ${{ matrix.make_args }} all - # Guards the cross builds: a mis-set CROSS/CC silently yields a host - # binary, which is otherwise indistinguishable until it is run. + # A mis-set CC silently yields a host binary, so check the ELF machine. - name: Verify architecture run: | set -eu @@ -108,9 +101,8 @@ jobs: run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-linux-${{ matrix.arch }}" # --------------------------------------------------------------------------- - # Android. One job for all three ABIs: the NDK is a ~630 MB download and - # sharing it beats three parallel copies. The resulting binaries are Bionic - # ELF, so they cannot be executed here -- only the ELF header is checked. + # Android. One job for all ABIs so the ~630 MB NDK is downloaded once. The + # binaries are Bionic ELF, so only the ELF header can be checked here. # --------------------------------------------------------------------------- android: name: android @@ -131,8 +123,7 @@ jobs: run: git submodule update --init --recursive - name: Install toolchain - # gcc-multilib is needed for the 32-bit host tools LuaJIT requires when - # the target is 32-bit (armeabi-v7a). + # gcc-multilib: armeabi-v7a needs 32-bit host tools. run: | set -eu apt-get update -qq @@ -176,16 +167,9 @@ jobs: done # --------------------------------------------------------------------------- - # FreeBSD. Built inside a FreeBSD VM booted with QEMU/KVM on the Linux runner, - # so no FreeBSD runner is needed: the tooling lives on the Linux side and only - # the compilation happens in the guest. - # - # The job container needs /dev/kvm, e.g. in the act_runner config: - # container: - # options: "--device /dev/kvm" - # Without it the script fails immediately rather than crawling along on TCG. - # - # Measured ~1m40s end to end: 70s boot, ~15s pkg install, ~14s build. + # FreeBSD. Compiled inside a QEMU/KVM guest, so no FreeBSD runner is needed. + # The container must expose /dev/kvm (act_runner: options: "--device /dev/kvm"), + # otherwise QEMU falls back to TCG and the boot crawls. ~1m40s end to end. # --------------------------------------------------------------------------- bsd: name: freebsd/x86_64 @@ -220,16 +204,9 @@ jobs: run: sh .forgejo/scripts/release-asset.sh dist/hate-no-d-freebsd-x86_64 hate-no-d-freebsd-x86_64 # --------------------------------------------------------------------------- - # Windows. Cross-compiled with mingw-w64 on the Linux runner, so no Windows - # machine and no MSVC are involved: the result is a self-contained PE that - # imports only KERNEL32/msvcrt. build.bat remains for native MSVC builds. - # - # i686 needs a 32-bit host compiler: LuaJIT's buildvm runs natively and must - # have the target's pointer size. - # - # Releases are named hate-no-d-windows_mingw_w64-x64.exe and - # hate-no-d-windows_mingw_w64-x86.exe. The build itself stays hate-no-d.exe - # (same as build.bat); the toolchain-qualified name is only the asset name. + # Windows. Cross-compiled with mingw-w64; no Windows machine or MSVC involved. + # i686 needs a 32-bit host compiler for the native buildvm. The build stays + # hate-no-d.exe -- only the release asset name carries the toolchain. # --------------------------------------------------------------------------- windows: name: windows/${{ matrix.arch }} @@ -255,8 +232,7 @@ jobs: - name: Fetch submodules run: git submodule update --init --recursive - # libc6-dev is not pulled in by gcc under --no-install-recommends, and - # without it the host build of minilua cannot find limits.h. + # --no-install-recommends omits libc6-dev, and minilua needs limits.h. - name: Install toolchain run: | set -eu -- 2.45.2