From 954f8ee343eaa8c033b6a056e8f4e410740937d5 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 3 Aug 2026 10:07:51 +0300
Subject: [PATCH 43/43] CI: Update emsdk job runner to ubuntu-26.04

See RM #2086

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 .github/workflows/ci.yml |  4 ++--
 scripts/ci-build.sh      | 12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d289d4bb98..0a3ea3eaaf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -233,7 +233,7 @@ jobs:
         run: ./scripts/ci-build.sh tcc
 
   emsdk:
-    runs-on: ubuntu-24.04
+    runs-on: ubuntu-26.04
     steps:
       - name: check out Freeciv
         uses: actions/checkout@v7.0.0
@@ -242,7 +242,7 @@ jobs:
           sudo apt-get update
           sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \
             meson \
-            libtolua-dev
+            libcurl4-openssl-dev
       - name: build
         shell: bash
         run: ./scripts/ci-build.sh emsdk
diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh
index 58fb40dc01..68506713fb 100755
--- a/scripts/ci-build.sh
+++ b/scripts/ci-build.sh
@@ -195,11 +195,23 @@ emsdk)
   # Outside source tree
   cd ..
 
+  if ! mkdir bin || ! mkdir tolua ; then
+    echo "Failed to create tolua creation dirs!" >&2
+    exit 1
+  fi
+
+  ( cd tolua
+    if ! ${SRCROOT}/scripts/build_tolua.sh ../bin ; then
+      exit 1
+    fi
+  )
+
   if ! ${SRCROOT}/platforms/emscripten/emssetup.sh emsdk ; then
     exit 1
   fi
 )
 
+export PATH="${PATH}:$(cd ../bin; pwd)"
 mkdir build
 cd build
 ../platforms/emscripten/emsbuild.sh "../../emsdk"
-- 
2.53.0

