Repository navigation
feat(src): add 7-reverse, 9-isPalindrome, 11-maxArea #5
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 | |
| - 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 |