Repository navigation
feat(src): add 49-groupAnagrams #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |