You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+61-31Lines changed: 61 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -89,65 +89,95 @@ jobs:
89
89
path: security-report/
90
90
retention-days: 30
91
91
92
-
# Phase 1: Cross-Compiler Testing
92
+
# Phase 2: Cross-Compiler Testing
93
93
cross-compiler:
94
-
name: Cross-Compiler Testing
94
+
name: Cross-Compiler Testing (gcc-11)
95
95
runs-on: ubuntu-latest
96
-
strategy:
97
-
matrix:
98
-
compiler: [gcc-11, clang-14]
99
-
fail-fast: false
100
-
timeout-minutes: 20
96
+
timeout-minutes: 15
97
+
env:
98
+
CXX: g++-11
99
+
CXXFLAGS: -std=c++17 -Wall -Wextra -O2 -g
101
100
102
101
steps:
103
102
- name: Checkout code
104
103
uses: actions/checkout@v4
105
-
with:
106
-
token: ${{ secrets.GITHUB_TOKEN }}
107
104
108
105
- name: Install Dependencies
109
106
run: |
110
-
echo "🔧 Installing dependencies for ${{ matrix.compiler }}..."
107
+
echo "🔧 Installing dependencies..."
111
108
sudo apt-get update
112
-
if [ "${{ matrix.compiler }}" = "gcc-11" ]; then
113
-
sudo apt-get install -y gcc-11 g++-11 libspdlog-dev libfmt-dev libgtest-dev || echo "⚠️ Some packages could not be installed (continuing...)"
114
-
else
115
-
sudo apt-get install -y clang-14 libspdlog-dev libfmt-dev libgtest-dev || echo "⚠️ Some packages could not be installed (continuing...)"
116
-
fi
109
+
sudo apt-get install -y build-essential libspdlog-dev libfmt-dev libgtest-dev gcc-11 g++-11 || echo "⚠️ Some packages could not be installed (continuing...)"
117
110
118
111
- name: Setup Compiler
119
112
run: |
120
-
echo "🔧 Setting up ${{ matrix.compiler }}..."
121
-
if [ "${{ matrix.compiler }}" = "gcc-11" ]; then
122
-
echo "CXX=g++-11" >> $GITHUB_ENV
123
-
echo "CC=gcc-11" >> $GITHUB_ENV
124
-
else
125
-
echo "CXX=clang++-14" >> $GITHUB_ENV
126
-
echo "CC=clang-14" >> $GITHUB_ENV
127
-
fi
113
+
echo "🔧 Setting up gcc-11..."
114
+
export CC=gcc-11
115
+
export CXX=g++-11
128
116
echo "Using compiler: $CXX"
117
+
echo "Using flags: $CXXFLAGS"
129
118
130
-
- name: Build with ${{ matrix.compiler }}
119
+
- name: Build and Test
131
120
run: |
132
-
echo "🔨 Building with ${{ matrix.compiler }}..."
121
+
echo "🔨 Building with gcc-11..."
133
122
make clean
134
123
make all
135
124
136
-
echo "✅ Build completed with ${{ matrix.compiler }}"
125
+
echo "🧪 Running tests with gcc-11..."
126
+
make enterprise-test
127
+
128
+
echo "✅ gcc-11 build and tests completed"
129
+
130
+
- name: Upload Test Results
131
+
uses: actions/upload-artifact@v4
132
+
if: always()
133
+
with:
134
+
name: gcc-11-test-results
135
+
path: test_logs/
136
+
retention-days: 30
137
+
138
+
# Phase 2: Clang-14 Testing
139
+
clang-testing:
140
+
name: Cross-Compiler Testing (clang-14)
141
+
runs-on: ubuntu-latest
142
+
timeout-minutes: 15
143
+
env:
144
+
CXX: clang++-14
145
+
CXXFLAGS: -std=c++17 -Wall -Wextra -O2 -g
146
+
147
+
steps:
148
+
- name: Checkout code
149
+
uses: actions/checkout@v4
150
+
151
+
- name: Install Dependencies
152
+
run: |
153
+
echo "🔧 Installing dependencies..."
154
+
sudo apt-get update
155
+
sudo apt-get install -y build-essential libspdlog-dev libfmt-dev libgtest-dev clang-14 || echo "⚠️ Some packages could not be installed (continuing...)"
156
+
157
+
- name: Setup Compiler
158
+
run: |
159
+
echo "🔧 Setting up clang-14..."
160
+
export CC=clang-14
161
+
export CXX=clang++-14
162
+
echo "Using compiler: $CXX"
163
+
echo "Using flags: $CXXFLAGS"
137
164
138
-
- name: Run Tests with ${{ matrix.compiler }}
165
+
- name: Build and Test
139
166
run: |
140
-
echo "🧪 Running tests with ${{ matrix.compiler }}..."
141
-
mkdir -p test_logs
167
+
echo "🔨 Building with clang-14..."
168
+
make clean
169
+
make all
170
+
171
+
echo "🧪 Running tests with clang-14..."
142
172
make enterprise-test
143
173
144
-
echo "✅ Tests completed with ${{ matrix.compiler }}"
0 commit comments