Skip to content

feat(src): add 390-lastRemaining #81

feat(src): add 390-lastRemaining

feat(src): add 390-lastRemaining #81

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 parallel
- 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: |
echo "🔍 Find all problems..."
find build -type f -perm /111 | grep -E '/[0-9]+-' > exec_list.txt
echo "✅ Found $(wc -l < exec_list.txt) problems"
echo "🚀 Run all problems..."
parallel -j $(nproc) --halt now,fail=1 '
exe="{}"
echo "▶️ Run: $exe"
if ! "$exe"; then
echo "❌ failed: $exe"
exit 1
fi
' :::: exec_list.txt