Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
28d08cd
реализация addition
GushchinAndrei1 Nov 25, 2025
74d74df
Update testing.yml
GushchinAndrei1 Nov 25, 2025
69700c1
реализация print_bits.cpp
GushchinAndrei1 Nov 26, 2025
c4df47e
Merge branch 'development' of github.com:GushchinAndrei1/psds-cpp-202…
GushchinAndrei1 Nov 26, 2025
b83a96f
реализация print_bits.cpp
GushchinAndrei1 Nov 26, 2025
9ac64e2
Update testing.yml
GushchinAndrei1 Nov 26, 2025
62eec26
Update testing.yml
GushchinAndrei1 Nov 28, 2025
934f30d
реализация rms
GushchinAndrei1 Nov 28, 2025
7b75756
реализцаия check_flags
GushchinAndrei1 Nov 28, 2025
8b8b294
реализация length
GushchinAndrei1 Nov 28, 2025
ef05ef7
реализация quadratic
GushchinAndrei1 Nov 28, 2025
ac1a145
Update testing.yml
GushchinAndrei1 Nov 28, 2025
3c0000c
небольшая корректровка, добавление values == nullptr
GushchinAndrei1 Nov 28, 2025
d49f95d
реализация char_changer
GushchinAndrei1 Nov 30, 2025
9eb26d0
resolve conflict in testing.yml
GushchinAndrei1 Dec 2, 2025
7977551
Update testing.yml
GushchinAndrei1 Dec 2, 2025
a328691
реализация swap_ptr
GushchinAndrei1 Dec 3, 2025
25e327f
Merge branch 'development' of github.com:GushchinAndrei1/psds-cpp-202…
GushchinAndrei1 Dec 3, 2025
0ed0241
реализация func_array
GushchinAndrei1 Dec 4, 2025
23c09fd
реализация func_array
GushchinAndrei1 Dec 4, 2025
dc7e2ca
доработка swap_ptr
GushchinAndrei1 Dec 6, 2025
31c0c0e
реализация longest
GushchinAndrei1 Dec 6, 2025
aba1f07
реализация last_of_us
GushchinAndrei1 Dec 6, 2025
fa0ab69
fix
GushchinAndrei1 Dec 7, 2025
1ddb73c
исправление конфликтов
GushchinAndrei1 Dec 7, 2025
31865a2
Fix test.cpp
GushchinAndrei1 Dec 7, 2025
376dc49
Sync pretty_array from main
GushchinAndrei1 Dec 7, 2025
92a4646
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GushchinAndrei1 Dec 15, 2025
c4492a4
Merge branch 'main' of github.com:GushchinAndrei1/psds-cpp-2025
GushchinAndrei1 Dec 18, 2025
e85e397
Merge branch 'main' of github.com:psds-cpp/psds-cpp-2025
18thday Dec 23, 2025
7791b0b
Merge remote-tracking branch 'upstream/main'
GushchinAndrei1 Dec 25, 2025
5904d15
Merge branch 'main' of github.com:GushchinAndrei1/psds-cpp-2025
GushchinAndrei1 Dec 25, 2025
6cd86bd
Add 05_week
GushchinAndrei1 Feb 9, 2026
f66a69f
Update
GushchinAndrei1 Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Testing Tasks

on: [push, pull_request]
on: [push]

jobs:
test:
Expand Down Expand Up @@ -30,12 +30,17 @@ jobs:
tasks=("addition" "rms" "print_bits" "check_flags" "length_lit" "quadratic" "char_changer"
"swap_ptr" "func_array" "longest" "last_of_us" "little_big" "pretty_array"
"data_stats" "unique" "range" "minmax" "find_all" "os_overload" "easy_compare" "filter" "enum_operators"
"stack" "queue" "ring_buffer" "phasor")
"stack" "queue" "ring_buffer" "phasor"
"tracer" "string_view" "cow_string" "simple_vector")

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for changed tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -49,22 +54,25 @@ jobs:
if ./build/tasks/test_$task; then
echo "✅ test_$task PASSED"
passed_count+=1
passed_tasks+=("$task")
else
echo "❌ test_$task FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
else
echo "❌ test_$task build FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
fi
done

echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/testing_week_01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
- quadratic
- char_changer

schedule:
- cron: '59 20 4 12 *' # UTC: 20:59 = 23:59 MSK 4 December

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -33,7 +36,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 01_week/tasks/*/; do
Expand All @@ -48,13 +52,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -80,8 +90,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/testing_week_02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
- little_big
- pretty_array

schedule:
- cron: '59 20 11 12 *' # UTC: 20:59 = 23:59 MSK 11 December

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -32,7 +35,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 02_week/tasks/*/; do
Expand All @@ -47,13 +51,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -79,8 +89,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/testing_week_03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 03_week/tasks/*/; do
Expand All @@ -53,13 +54,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -85,8 +92,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/testing_week_04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
- name: Determine tasks to run
id: get-tasks
run: |
if [ "${{ github.event.inputs.tasks }}" = "all" ]; then
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 04_week/tasks/*/; do
Expand All @@ -48,13 +49,19 @@ jobs:

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
Expand All @@ -80,8 +87,8 @@ jobs:
echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count"
echo "❌ Failed: $failed_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/testing_week_05.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Testing Tasks Week 05

on:
workflow_dispatch:
inputs:
tasks:
description: 'Select tasks to test'
required: true
type: choice
default: 'all'
options:
- all
- tracer
- string_view
- cow_string
- simple_vector

schedule:
- cron: '59 20 16 02 *' # UTC: 20:59 = 23:59 MSK 16 February

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install compiler and CMake
run: sudo apt install -y cmake build-essential g++-14 libgtest-dev libgmock-dev

- name: Configure project
run: cmake -B build

- name: Determine tasks to run
id: get-tasks
run: |
if [["${{ github.event_name }}" = "schedule"]] ||
[[ "${{ github.event.inputs.tasks }}" = "all" ]]; then
# Find all tasks
TASKS=()
for dir in 05_week/tasks/*/; do
task=$(basename "$dir")
TASKS+=("$task")
done
echo "tasks=${TASKS[*]}" >> $GITHUB_OUTPUT
else
# Используем указанную задачу
echo "tasks=${{ github.event.inputs.tasks }}" >> $GITHUB_OUTPUT
fi

- name: Build and run tests for selected tasks
run: |
echo "Event: ${{ github.event_name }}"
echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'"

IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}"

declare -i passed_count=0
declare -i failed_count=0
declare -i task_count=0

# task name arrays
passed_tasks=()
failed_tasks=()

echo "=== Starting tests for selected tasks ==="

for task in "${tasks[@]}"; do
task_count+=1
echo "=== Processing $task ==="

if cmake --build build --target test_$task; then
echo "✅ test_$task built successfully"

if ./build/tasks/test_$task; then
echo "✅ test_$task PASSED"
passed_count+=1
passed_tasks+=("$task")
else
echo "❌ test_$task FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
else
echo "❌ test_$task build FAILED"
failed_count+=1
failed_tasks+=("$task")
fi
done

echo "=== Test Results Summary ==="
echo "Total tasks in list: ${#tasks[@]}"
echo "Processed: $task_count"
echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]"
echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]"

if [ $failed_count -gt 0 ]; then
echo "❌ Some tasks failed!"
exit 1
elif [ $task_count -eq 0 ]; then
echo "No tasks were processed (no changes)"
exit 0
else
echo "✅ All processed tasks passed!"
exit 0
fi
13 changes: 8 additions & 5 deletions 01_week/tasks/addition/addition.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#include <cstdint>
#include <stdexcept>

#include <cstddef> // заголовочный файл с целочисленными типами фиксированного размера
#include <stdexcept> // из этого мы ничего не используем

// функция принимает две перменных типа int и возвращает число типа int64_t
int64_t Addition(int a, int b) {
throw std::runtime_error{"Not implemented"};
}

// Чтобы сложение выполнялось в int64_t, приводим a и b к этому типу
// static_cast<новый тип>(переменная)
return static_cast<int64_t>(a) + static_cast<int64_t>(b);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лишний каст, достаточно явно кастовать только один операнд, второй будет неявно преобразован, необходимо использовать данную возможность языка и не писать лишний код

}
Loading