Skip to content

Commit 92c1570

Browse files
author
git
committed
fix linux github action
1 parent 1c493bb commit 92c1570

5 files changed

Lines changed: 40 additions & 26 deletions

File tree

.github/workflows/Dockerfile.linux

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,43 @@
11
FROM ubuntu:22.04
22

3-
ARG DEBIAN_FRONTEND=noninteractive
3+
ENV DEBIAN_FRONTEND=noninteractive
44
ENV TZ=Asia/Singapore
55

66
# Core build tools
77
RUN apt-get update && apt-get install -y --no-install-recommends \
88
build-essential clang gcc g++ make git cmake pkg-config \
99
curl wget ca-certificates gnupg sudo unzip jq \
10-
python3 python3-pip \
11-
&& rm -rf /var/lib/apt/lists/*
12-
13-
# xxd (separate package in Ubuntu 22.04+)
14-
RUN apt-get update && apt-get install -y --no-install-recommends xxd \
10+
python3 python3-pip xxd \
1511
&& rm -rf /var/lib/apt/lists/*
1612

1713
# Node.js 18.x (for tree-sitter CLI via npx)
1814
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
1915
&& apt-get install -y --no-install-recommends nodejs \
2016
&& rm -rf /var/lib/apt/lists/*
2117

22-
# Lambda core libraries
18+
# Lambda core libraries + Radiant engine dependencies
2319
RUN apt-get update && apt-get install -y --no-install-recommends \
2420
libcurl4-openssl-dev libmpdec-dev libutf8proc-dev libssl-dev \
2521
zlib1g-dev libnghttp2-dev libncurses5-dev libevent-dev \
2622
libbrotli-dev \
27-
&& rm -rf /var/lib/apt/lists/*
28-
29-
# Radiant engine dependencies
30-
RUN apt-get update && apt-get install -y --no-install-recommends \
3123
libglfw3-dev libfreetype6-dev libpng-dev libbz2-dev \
3224
libturbojpeg0-dev libgif-dev gettext \
3325
libgl1-mesa-dev libglu1-mesa-dev libegl1-mesa-dev \
26+
ninja-build \
3427
&& rm -rf /var/lib/apt/lists/*
3528

36-
# Meson + ninja (for ThorVG)
37-
RUN pip3 install meson \
38-
&& apt-get update && apt-get install -y --no-install-recommends ninja-build \
39-
&& rm -rf /var/lib/apt/lists/*
40-
41-
# Google Test
42-
RUN apt-get update && apt-get install -y --no-install-recommends \
43-
libgtest-dev \
44-
&& rm -rf /var/lib/apt/lists/*
29+
# Meson (for ThorVG)
30+
RUN pip3 install meson
31+
32+
# Google Test — libgtest-dev only installs headers, must compile the library
33+
RUN apt-get update && apt-get install -y --no-install-recommends libgtest-dev \
34+
&& rm -rf /var/lib/apt/lists/* \
35+
&& mkdir -p /tmp/gtest-build && cd /tmp/gtest-build \
36+
&& cmake /usr/src/gtest -DBUILD_GMOCK=ON -DCMAKE_INSTALL_PREFIX=/usr/local \
37+
&& make -j$(nproc) \
38+
&& make install \
39+
&& ldconfig \
40+
&& rm -rf /tmp/gtest-build
4541

4642
# Premake5 (build system generator)
4743
RUN PREMAKE_VERSION="5.0.0-beta2" \

.github/workflows/nightly-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
mingw-w64-clang-x86_64-meson
4444
mingw-w64-clang-x86_64-pkgconf
4545
mingw-w64-clang-x86_64-nodejs
46+
mingw-w64-clang-x86_64-gtest
4647
unzip
4748
curl
4849
wget

.gitmodules

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
url = https://github.com/yaml/yaml-test-suite.git
44
[submodule "lambda/tree-sitter-bash"]
55
path = lambda/tree-sitter-bash
6-
url = https://github.com/tree-sitter/tree-sitter-bash.git[submodule "lambda/tree-sitter-python"]
7-
path = lambda/tree-sitter-python
8-
url = https://github.com/tree-sitter/tree-sitter-python.git
6+
url = https://github.com/tree-sitter/tree-sitter-bash.git
7+
[submodule "lambda/tree-sitter-python"]
8+
path = lambda/tree-sitter-python
9+
url = https://github.com/tree-sitter/tree-sitter-python.git

setup-linux-deps.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ build_re2_for_linux() {
913913
echo "Building RE2 for Linux..."
914914

915915
local RE2_SRC="build_temp/re2-noabsl"
916-
local RE2_LIB="$RE2_SRC/build/libre2.a"
916+
local RE2_LIB="$RE2_SRC/cmake_build/libre2.a"
917917

918918
if [ -f "$RE2_LIB" ] && is_elf_archive "$RE2_LIB"; then
919919
echo "✅ RE2 already built for Linux"
@@ -931,8 +931,8 @@ build_re2_for_linux() {
931931
fi
932932

933933
echo "Building RE2 from $RE2_SRC..."
934-
mkdir -p "$RE2_SRC/build"
935-
cd "$RE2_SRC/build"
934+
mkdir -p "$RE2_SRC/cmake_build"
935+
cd "$RE2_SRC/cmake_build"
936936

937937
if cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DRE2_BUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. && \
938938
cmake --build . -j$(nproc); then

setup-windows-deps.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ install_msys2_package "${TOOLCHAIN_PREFIX}-pkgconf" "pkg-config tool"
180180
# Node.js (needed for tree-sitter parser generation)
181181
install_msys2_package "${TOOLCHAIN_PREFIX}-nodejs" "Node.js (for tree-sitter grammar generation)"
182182

183+
# Google Test (needed for test executables)
184+
install_msys2_package "${TOOLCHAIN_PREFIX}-gtest" "Google Test framework"
185+
183186
echo ""
184187
echo "Setting up project-specific dependencies..."
185188

@@ -323,6 +326,19 @@ fi
323326
# Build tree-sitter libraries for Windows
324327
echo "Building tree-sitter libraries for Windows..."
325328

329+
# Ensure RE2 source is available (Makefile builds it, but needs the source)
330+
if [ ! -d "build_temp/re2-noabsl" ]; then
331+
echo "Cloning RE2 (no-abseil version) for Makefile build..."
332+
mkdir -p build_temp
333+
if git clone --depth 1 --branch 2023-03-01 https://github.com/google/re2.git build_temp/re2-noabsl; then
334+
echo "✅ RE2 source cloned to build_temp/re2-noabsl"
335+
else
336+
echo "❌ Failed to clone RE2 — regex support may not work"
337+
fi
338+
else
339+
echo "✅ RE2 source already available"
340+
fi
341+
326342
# Build tree-sitter library (amalgamated, no ICU)
327343
if [ ! -f "lambda/tree-sitter/libtree-sitter.a" ]; then
328344
echo "Building tree-sitter library for Windows (amalgamated, no ICU)..."

0 commit comments

Comments
 (0)