-
Notifications
You must be signed in to change notification settings - Fork 54
133 lines (122 loc) · 4.13 KB
/
linux-simple-builds.yml
File metadata and controls
133 lines (122 loc) · 4.13 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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++-12
- g++-13
- g++-14
- clang++-16
- clang++-17
- clang++-18
build_type: [Debug] #, Release]
std: [20]
include:
# cannot be installed on ubuntu-24.04 be default?
- cxx: g++-12
cc: gcc-12
other_pkgs: g++-12
cxxflags: "-O1 -fmax-errors=5"
- cxx: g++-13
cc: gcc-13
other_pkgs: g++-13
cxxflags: "-O1 -fmax-errors=5"
- cxx: g++-14
cc: gcc-14
other_pkgs: g++-14
cxxflags: "-O1 -fmax-errors=5"
- cxx: clang++-16
cc: clang-16
other_pkgs: clang-16
cxxflags: "-O1 -fmax-errors=5"
- cxx: clang++-17
cc: clang-17
other_pkgs: clang-17
cxxflags: "-O1 -fmax-errors=5"
- cxx: clang++-18
cc: clang-18
other_pkgs: clang-18
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