Skip to content
Merged
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions .github/workflows/run-all-problems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Run All Problems

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build-and-run:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential

- name: Configure project
run: cmake -S . -B build

- name: Build all
run: cmake --build build -- -j$(nproc)

- name: Run all executables (stop on failure)
run: |
set -e
echo "Find and run all problems..."

find build -type f -perm /111 | while read exe; do
if [[ "$(basename "$exe")" =~ ^[0-9]+- ]]; then
echo "▶️ Run: $exe"
if ! "$exe"; then
echo "❌ Failed: $exe"
exit 1
fi
fi
done