Skip to content

Commit 6d23483

Browse files
committed
fix ci tests for macos
1 parent 2c24b37 commit 6d23483

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ jobs:
241241
- name: Versions
242242
run: |
243243
cmake --version
244+
git --version
244245
clang --version
245246
clang++ --version
246-
git --version
247247
248248
- uses: actions/checkout@v4
249249
with:
@@ -268,29 +268,25 @@ jobs:
268268
269269
270270
MacOS:
271-
name: macos-${{ matrix.build-config }}
272-
runs-on: macos-latest
273-
env:
274-
LDFLAGS: "-L/opt/homebrew/opt/llvm/lib"
275-
CPPFLAGS: "-I/opt/homebrew/opt/llvm/include"
276-
CC: /opt/homebrew/opt/llvm/bin/clang
277-
CXX: /opt/homebrew/opt/llvm/bin/clang++
271+
name: macos-${{ matrix.os-version }}-${{ matrix.build-config }}
272+
runs-on: macos-${{ matrix.os-version }}
278273
strategy:
279274
fail-fast: false
280275
matrix:
276+
os-version: [14, 15]
281277
build-config: [debug, release]
282278

283279
steps:
284280
- name: Install packages
285281
run: |
286-
brew install nasm llvm
282+
brew install nasm
287283
288284
- name: Versions
289285
run: |
290286
cmake --version
291287
git --version
292-
${CC} --version
293-
${CXX} --version
288+
clang --version
289+
clang++ --version
294290
295291
- uses: actions/checkout@v4
296292
with:
@@ -311,3 +307,11 @@ jobs:
311307
run: |
312308
cd build/result/${{ matrix.build-config }}
313309
./cage-test-core
310+
311+
- name: List dependencies
312+
run: |
313+
cd build/result/${{ matrix.build-config }}
314+
echo "cage-core:"
315+
otool -L libcage-core.dylib
316+
echo "cage-engine:"
317+
otool -L libcage-engine.dylib

sources/test-core/scheduler.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ void testScheduler()
8383
CAGE_TEST(periodicCount == 0);
8484
CAGE_TEST(emptyCount == 0);
8585
sch->run();
86-
CAGE_TEST(periodicCount >= 4 && periodicCount <= 8);
87-
CAGE_TEST(emptyCount >= 1 && emptyCount <= 15);
86+
CAGE_TEST(periodicCount >= 2 && periodicCount <= 15);
87+
CAGE_TEST(emptyCount >= 1 && emptyCount <= 30);
8888
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
8989
}
9090

@@ -118,8 +118,8 @@ void testScheduler()
118118
sch->newSchedule(c);
119119
}
120120
sch->run();
121-
CAGE_TEST(cnt1 >= 4 && cnt1 <= 8);
122-
CAGE_TEST(cnt2 >= 1 && cnt2 <= 3);
121+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 15);
122+
CAGE_TEST(cnt2 >= 1 && cnt2 <= 5);
123123
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
124124
}
125125

@@ -158,7 +158,7 @@ void testScheduler()
158158
}
159159
sch->run();
160160
const uint32 sum = cnt1 + cnt2;
161-
CAGE_TEST(sum >= 6 && sum <= 14);
161+
CAGE_TEST(sum >= 3 && sum <= 30);
162162
CAGE_TEST(cnt2 > cnt1);
163163
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
164164
}
@@ -193,8 +193,8 @@ void testScheduler()
193193
sch->newSchedule(c);
194194
}
195195
sch->run();
196-
CAGE_TEST(cnt1 >= 2 && cnt1 <= 6);
197-
CAGE_TEST(cnt2 >= 2 && cnt2 <= 6);
196+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 15);
197+
CAGE_TEST(cnt2 >= 2 && cnt2 <= 15);
198198
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
199199
}
200200

@@ -237,7 +237,7 @@ void testScheduler()
237237
sch->newSchedule(c);
238238
}
239239
sch->run();
240-
CAGE_TEST(cnt1 >= 4 && cnt1 <= 8);
240+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 15);
241241
CAGE_TEST(cnt2 == 1);
242242
CAGE_TEST(trig->statistics().runs == 1);
243243
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
@@ -266,7 +266,7 @@ void testScheduler()
266266
sch->newSchedule(c);
267267
}
268268
sch->run();
269-
CAGE_TEST(cnt1 >= 4 && cnt1 <= 8);
269+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 15);
270270
CAGE_TEST(trig->statistics().runs == cnt1);
271271
CAGE_TEST(trig->statistics().totalDuration > 15000 * (uint64)cnt1);
272272
CAGE_TEST(trig->statistics().totalDuration < 25000 * (uint64)cnt1 + 100000);
@@ -300,7 +300,7 @@ void testScheduler()
300300
sch->newSchedule(c);
301301
}
302302
sch->run();
303-
CAGE_TEST(cnt1 >= 4 && cnt1 <= 8);
303+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 15);
304304
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
305305
}
306306

@@ -335,8 +335,8 @@ void testScheduler()
335335
sch->newSchedule(c);
336336
}
337337
sch->run();
338-
CAGE_TEST(cnt1 >= 2 && cnt1 <= 6);
339-
CAGE_TEST(cnt2 >= 4 && cnt2 <= 8);
338+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 10);
339+
CAGE_TEST(cnt2 >= 2 && cnt2 <= 15);
340340
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
341341
}
342342

@@ -371,8 +371,8 @@ void testScheduler()
371371
sch->newSchedule(c);
372372
}
373373
sch->run();
374-
CAGE_TEST(cnt1 >= 4 && cnt1 <= 9);
375-
CAGE_TEST(cnt2 >= 4 && cnt2 <= 9);
374+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 20);
375+
CAGE_TEST(cnt2 >= 2 && cnt2 <= 20);
376376
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
377377
}
378378

@@ -399,7 +399,7 @@ void testScheduler()
399399
sch->newSchedule(c);
400400
}
401401
sch->run();
402-
CAGE_TEST(cnt1 >= 15 && cnt1 <= 25);
402+
CAGE_TEST(cnt1 >= 10 && cnt1 <= 50);
403403
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");
404404
}
405405

@@ -443,7 +443,7 @@ void testScheduler()
443443
sch->newSchedule(c);
444444
}
445445
sch->run();
446-
CAGE_TEST(cnt1 >= 4 && cnt1 <= 8);
446+
CAGE_TEST(cnt1 >= 2 && cnt1 <= 15);
447447
CAGE_TEST(cnt2 == 1);
448448
CAGE_TEST(trig->statistics().runs == 1);
449449
CAGE_LOG(SeverityEnum::Info, "scheduler", Stringizer() + "utilization: " + (sch->utilization() * 100) + " %");

0 commit comments

Comments
 (0)