Skip to content

Commit eba2eb2

Browse files
committed
Auto-sync: 2026-02-07 16:30
1 parent f8eb57d commit eba2eb2

28 files changed

Lines changed: 3251 additions & 16 deletions

.github/workflows/testing.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Testing Tasks
22

3-
on: [push, pull_request]
3+
on: [push]
44

55
jobs:
66
test:
@@ -30,12 +30,17 @@ jobs:
3030
tasks=("addition" "rms" "print_bits" "check_flags" "length_lit" "quadratic" "char_changer"
3131
"swap_ptr" "func_array" "longest" "last_of_us" "little_big" "pretty_array"
3232
"data_stats" "unique" "range" "minmax" "find_all" "os_overload" "easy_compare" "filter" "enum_operators"
33-
"stack" "queue" "ring_buffer" "phasor")
33+
"stack" "queue" "ring_buffer" "phasor"
34+
"tracer" "string_view" "cow_string" "simple_vector")
3435
3536
declare -i passed_count=0
3637
declare -i failed_count=0
3738
declare -i task_count=0
3839
40+
# task name arrays
41+
passed_tasks=()
42+
failed_tasks=()
43+
3944
echo "=== Starting tests for changed tasks ==="
4045
4146
for task in "${tasks[@]}"; do
@@ -49,22 +54,25 @@ jobs:
4954
if ./build/tasks/test_$task; then
5055
echo "✅ test_$task PASSED"
5156
passed_count+=1
57+
passed_tasks+=("$task")
5258
else
5359
echo "❌ test_$task FAILED"
5460
failed_count+=1
61+
failed_tasks+=("$task")
5562
fi
5663
else
5764
echo "❌ test_$task build FAILED"
5865
failed_count+=1
66+
failed_tasks+=("$task")
5967
fi
6068
fi
6169
done
6270
6371
echo "=== Test Results Summary ==="
6472
echo "Total tasks in list: ${#tasks[@]}"
6573
echo "Processed: $task_count"
66-
echo "✅ Passed: $passed_count"
67-
echo "❌ Failed: $failed_count"
74+
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
75+
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"
6876
6977
if [ $failed_count -gt 0 ]; then
7078
echo "❌ Some tasks failed!"

.github/workflows/testing_week_01.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
- quadratic
1919
- char_changer
2020

21+
schedule:
22+
- cron: '59 20 4 12 *' # UTC: 20:59 = 23:59 MSK 4 December
23+
2124
jobs:
2225
test:
2326
runs-on: ubuntu-latest
@@ -33,7 +36,8 @@ jobs:
3336
- name: Determine tasks to run
3437
id: get-tasks
3538
run: |
36-
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
39+
if [["${{ github.event_name }}" = "schedule"]] ||
40+
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
3741
# Find all tasks
3842
TASKS=()
3943
for dir in 01_week/tasks/*/; do
@@ -48,13 +52,19 @@ jobs:
4852
4953
- name: Build and run tests for selected tasks
5054
run: |
55+
echo "Event: ${{ github.event_name }}"
56+
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"
5157
5258
IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"
5359
5460
declare -i passed_count=0
5561
declare -i failed_count=0
5662
declare -i task_count=0
5763
64+
# task name arrays
65+
passed_tasks=()
66+
failed_tasks=()
67+
5868
echo "=== Starting tests for selected tasks ==="
5969
6070
for task in "${tasks[@]}"; do
@@ -80,8 +90,8 @@ jobs:
8090
echo "=== Test Results Summary ==="
8191
echo "Total tasks in list: ${#tasks[@]}"
8292
echo "Processed: $task_count"
83-
echo "✅ Passed: $passed_count"
84-
echo "❌ Failed: $failed_count"
93+
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
94+
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"
8595
8696
if [ $failed_count -gt 0 ]; then
8797
echo "❌ Some tasks failed!"

.github/workflows/testing_week_02.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
- little_big
1818
- pretty_array
1919

20+
schedule:
21+
- cron: '59 20 11 12 *' # UTC: 20:59 = 23:59 MSK 11 December
22+
2023
jobs:
2124
test:
2225
runs-on: ubuntu-latest
@@ -32,7 +35,8 @@ jobs:
3235
- name: Determine tasks to run
3336
id: get-tasks
3437
run: |
35-
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
38+
if [["${{ github.event_name }}" = "schedule"]] ||
39+
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
3640
# Find all tasks
3741
TASKS=()
3842
for dir in 02_week/tasks/*/; do
@@ -47,13 +51,19 @@ jobs:
4751
4852
- name: Build and run tests for selected tasks
4953
run: |
54+
echo "Event: ${{ github.event_name }}"
55+
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"
5056
5157
IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"
5258
5359
declare -i passed_count=0
5460
declare -i failed_count=0
5561
declare -i task_count=0
5662
63+
# task name arrays
64+
passed_tasks=()
65+
failed_tasks=()
66+
5767
echo "=== Starting tests for selected tasks ==="
5868
5969
for task in "${tasks[@]}"; do
@@ -79,8 +89,8 @@ jobs:
7989
echo "=== Test Results Summary ==="
8090
echo "Total tasks in list: ${#tasks[@]}"
8191
echo "Processed: $task_count"
82-
echo "✅ Passed: $passed_count"
83-
echo "❌ Failed: $failed_count"
92+
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
93+
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"
8494
8595
if [ $failed_count -gt 0 ]; then
8696
echo "❌ Some tasks failed!"

.github/workflows/testing_week_03.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
- name: Determine tasks to run
3939
id: get-tasks
4040
run: |
41-
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
41+
if [["${{ github.event_name }}" = "schedule"]] ||
42+
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
4243
# Find all tasks
4344
TASKS=()
4445
for dir in 03_week/tasks/*/; do
@@ -53,13 +54,19 @@ jobs:
5354
5455
- name: Build and run tests for selected tasks
5556
run: |
57+
echo "Event: ${{ github.event_name }}"
58+
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"
5659
5760
IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"
5861
5962
declare -i passed_count=0
6063
declare -i failed_count=0
6164
declare -i task_count=0
6265
66+
# task name arrays
67+
passed_tasks=()
68+
failed_tasks=()
69+
6370
echo "=== Starting tests for selected tasks ==="
6471
6572
for task in "${tasks[@]}"; do
@@ -85,8 +92,8 @@ jobs:
8592
echo "=== Test Results Summary ==="
8693
echo "Total tasks in list: ${#tasks[@]}"
8794
echo "Processed: $task_count"
88-
echo "✅ Passed: $passed_count"
89-
echo "❌ Failed: $failed_count"
95+
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
96+
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"
9097
9198
if [ $failed_count -gt 0 ]; then
9299
echo "❌ Some tasks failed!"

.github/workflows/testing_week_04.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
- name: Determine tasks to run
3434
id: get-tasks
3535
run: |
36-
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
36+
if [["${{ github.event_name }}" = "schedule"]] ||
37+
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
3738
# Find all tasks
3839
TASKS=()
3940
for dir in 04_week/tasks/*/; do
@@ -48,13 +49,19 @@ jobs:
4849
4950
- name: Build and run tests for selected tasks
5051
run: |
52+
echo "Event: ${{ github.event_name }}"
53+
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"
5154
5255
IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"
5356
5457
declare -i passed_count=0
5558
declare -i failed_count=0
5659
declare -i task_count=0
5760
61+
# task name arrays
62+
passed_tasks=()
63+
failed_tasks=()
64+
5865
echo "=== Starting tests for selected tasks ==="
5966
6067
for task in "${tasks[@]}"; do
@@ -80,8 +87,8 @@ jobs:
8087
echo "=== Test Results Summary ==="
8188
echo "Total tasks in list: ${#tasks[@]}"
8289
echo "Processed: $task_count"
83-
echo "✅ Passed: $passed_count"
84-
echo "❌ Failed: $failed_count"
90+
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
91+
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"
8592
8693
if [ $failed_count -gt 0 ]; then
8794
echo "❌ Some tasks failed!"
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Testing Tasks Week 05
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tasks:
7+
description: 'Select tasks to test'
8+
required: true
9+
type: choice
10+
default: 'all'
11+
options:
12+
- all
13+
- tracer
14+
- string_view
15+
- cow_string
16+
- simple_vector
17+
18+
schedule:
19+
- cron: '59 20 16 02 *' # UTC: 20:59 = 23:59 MSK 16 February
20+
21+
jobs:
22+
test:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install compiler and CMake
28+
run: sudo apt install -y cmake build-essential g++-14 libgtest-dev libgmock-dev
29+
30+
- name: Configure project
31+
run: cmake -B build
32+
33+
- name: Determine tasks to run
34+
id: get-tasks
35+
run: |
36+
if [["${{ github.event_name }}" = "schedule"]] ||
37+
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
38+
# Find all tasks
39+
TASKS=()
40+
for dir in 05_week/tasks/*/; do
41+
task=$(basename "$dir")
42+
TASKS+=("$task")
43+
done
44+
echo "tasks=${TASKS[*]}" >> $GITHUB_OUTPUT
45+
else
46+
# Используем указанную задачу
47+
echo "tasks=${{ github.event.inputs.tasks }}" >> $GITHUB_OUTPUT
48+
fi
49+
50+
- name: Build and run tests for selected tasks
51+
run: |
52+
echo "Event: ${{ github.event_name }}"
53+
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"
54+
55+
IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"
56+
57+
declare -i passed_count=0
58+
declare -i failed_count=0
59+
declare -i task_count=0
60+
61+
# task name arrays
62+
passed_tasks=()
63+
failed_tasks=()
64+
65+
echo "=== Starting tests for selected tasks ==="
66+
67+
for task in "${tasks[@]}"; do
68+
task_count+=1
69+
echo "=== Processing $task ==="
70+
71+
if cmake --build build --target test_$task; then
72+
echo "✅ test_$task built successfully"
73+
74+
if ./build/tasks/test_$task; then
75+
echo "✅ test_$task PASSED"
76+
passed_count+=1
77+
passed_tasks+=("$task")
78+
else
79+
echo "❌ test_$task FAILED"
80+
failed_count+=1
81+
failed_tasks+=("$task")
82+
fi
83+
else
84+
echo "❌ test_$task build FAILED"
85+
failed_count+=1
86+
failed_tasks+=("$task")
87+
fi
88+
done
89+
90+
echo "=== Test Results Summary ==="
91+
echo "Total tasks in list: ${#tasks[@]}"
92+
echo "Processed: $task_count"
93+
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
94+
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"
95+
96+
if [ $failed_count -gt 0 ]; then
97+
echo "❌ Some tasks failed!"
98+
exit 1
99+
elif [ $task_count -eq 0 ]; then
100+
echo "No tasks were processed (no changes)"
101+
exit 0
102+
else
103+
echo "✅ All processed tasks passed!"
104+
exit 0
105+
fi

0 commit comments

Comments
 (0)