Repository navigation
109 lines (98 loc) · 3.52 KB
/
Copy pathlinux-simple-builds.yml
File metadata and controls
109 lines (98 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Linux builds (basic)
on: [push, pull_request]
jobs:
build:
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
cxx:
- g++-14
# Note: Older compilers (g++-12, g++-13, clang++-16, clang++-17, clang++-18)
# don't have full C++23 stdlib support (missing std::format in libstdc++)
build_type: [Debug] #, Release]
std: [23]
include:
- cxx: g++-14
cc: gcc-14
other_pkgs: g++-14
cxxflags: "-O1 -fmax-errors=5"
steps:
- uses: actions/checkout@v4
- name: Verify directory structure
run: |
echo "Verifying directory structure..."
echo "Contents of root directory:"
ls -la
echo ""
echo "Checking essential directories:"
for dir in src main scripts assets config docs fonts external/core; do
if [ -d "$dir" ]; then
echo "✓ $dir/ exists"
else
echo "✗ $dir/ missing"
exit 1
fi
done
echo "Directory verification complete."
- name: Prepare environment
env:
TZ: "America/Los_Angeles"
run: |
sudo ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime
echo ${TZ} | sudo tee /etc/timezone
sudo apt-get update -q
sudo apt-get install -y -y --no-install-recommends \
${{matrix.other_pkgs}} \
build-essential \
xorg-dev \
libmotif-dev \
libfreetype6-dev \
cmake \
git \
xwit \
xfonts-base \
xfonts-75dpi \
xfonts-100dpi \
tzdata \
libcurl4-gnutls-dev
- name: Configure build
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
echo "Configuring build for ${{matrix.cxx}}..."
cmake -S . -B _build_${{matrix.cxx}}_${{matrix.std}} \
-DCMAKE_INSTALL_PREFIX="${PWD}/_install_${{matrix.cxx}}_${{matrix.std}}" \
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}" \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_EXTENSIONS=OFF
- name: Build + install
run: |
echo "Building with ${{matrix.cxx}}..."
echo "Available CPU cores: $(nproc)"
echo "Starting build at $(date)..."
# Run build and capture exit code
set +e
timeout 600 cmake --build _build_${{matrix.cxx}}_${{matrix.std}} -j4
BUILD_EXIT_CODE=$?
set -e
echo "Build command completed at $(date) with exit code $BUILD_EXIT_CODE"
if [ $BUILD_EXIT_CODE -ne 0 ]; then
echo "Build failed with exit code $BUILD_EXIT_CODE"
echo "Showing last 100 lines of CMake build output:"
tail -100 _build_${{matrix.cxx}}_${{matrix.std}}/CMakeFiles/CMakeOutput.log 2>/dev/null || echo "No CMakeOutput.log found"
echo "Showing last 100 lines of CMake error output:"
tail -100 _build_${{matrix.cxx}}_${{matrix.std}}/CMakeFiles/CMakeError.log 2>/dev/null || echo "No CMakeError.log found"
exit $BUILD_EXIT_CODE
fi
if [ -f "_build_${{matrix.cxx}}_${{matrix.std}}/vt_main" ]; then
echo "Build appears successful, proceeding with install..."
timeout 120 cmake --build _build_${{matrix.cxx}}_${{matrix.std}} --target install
else
echo "Build failed - executable not found"
exit 1
fi