Fix corner-fix Dirichlet BC indexing for Ng>1 #593
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: CI | |
| on: | |
| push: | |
| jobs: | |
| build-and-test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| build_type: [Release, Debug] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake build-essential | |
| - name: Build (CPU-only) | |
| run: | | |
| echo "=========================================" | |
| echo "Building CPU-only version (${{ matrix.build_type }})" | |
| echo "=========================================" | |
| echo "" | |
| echo "Note: This CI workflow tests CPU-only builds." | |
| echo "GPU offload is tested separately in gpu-ci.yml workflow." | |
| echo "" | |
| mkdir -p build_cpu | |
| cd build_cpu | |
| # Suppress unused variable warnings (common in GPU-only code paths) | |
| export CXXFLAGS="-Wno-unused-variable -Wno-unused-but-set-variable" | |
| cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DUSE_GPU_OFFLOAD=OFF -DBUILD_TESTS=ON | |
| make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu) 2>&1 | tee build.log | |
| echo "" | |
| echo "=========================================" | |
| echo "Build complete" | |
| echo "=========================================" | |
| - name: Test (CPU-only) | |
| run: | | |
| echo "=========================================" | |
| echo "Running tests (${{ matrix.build_type }})" | |
| echo "=========================================" | |
| echo "" | |
| chmod +x scripts/ci.sh | |
| chmod +x scripts/check_code_sharing.sh | |
| # Debug builds run only fast tests with 4x timeout multiplier | |
| # Release builds run all tests with normal timeouts | |
| if [[ "${{ matrix.build_type }}" == "Debug" ]]; then | |
| echo "Running fast tests only (Debug build with 4x timeouts)" | |
| ./scripts/ci.sh --cpu --debug fast | |
| else | |
| echo "Running all tests (Release build)" | |
| ./scripts/ci.sh --cpu | |
| fi | |
| - name: Check for warnings | |
| if: matrix.build_type == 'Release' | |
| run: | | |
| cd build_cpu | |
| export CXXFLAGS="-Wno-unused-variable -Wno-unused-but-set-variable" | |
| cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_GPU_OFFLOAD=OFF | |
| make clean | |
| make 2>&1 | tee build.log | |
| # Check for warnings but exclude unused variable warnings (GPU-only code paths) | |
| if grep -i "warning:" build.log | grep -v "unused-variable" | grep -v "unused-but-set-variable"; then | |
| echo "Warnings detected (excluding unused-variable warnings)!" | |
| exit 1 | |
| fi | |
| echo "No warnings detected (unused-variable warnings excluded)" |