From 97598b90ae8f48b4db1180d08da10ddc5e7b1e63 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 17:04:46 +0000 Subject: [PATCH 1/2] Add GitHub Actions CI workflow with 8-build matrix Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/1d3e0cf9-5ffe-42b7-b295-e7cc865128ee Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com> --- .github/workflows/ci.yml | 95 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0b10dd9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,95 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build: + name: ${{ matrix.compiler }} ${{ matrix.build_type }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + compiler: GCC + build_type: Debug + cmake_c_compiler: gcc + cmake_cxx_compiler: g++ + + - os: ubuntu-latest + compiler: GCC + build_type: Release + cmake_c_compiler: gcc + cmake_cxx_compiler: g++ + + - os: ubuntu-latest + compiler: Clang + build_type: Debug + cmake_c_compiler: clang + cmake_cxx_compiler: clang++ + + - os: ubuntu-latest + compiler: Clang + build_type: Release + cmake_c_compiler: clang + cmake_cxx_compiler: clang++ + + - os: ubuntu-latest + compiler: Clang libc++ + build_type: Debug + cmake_c_compiler: clang + cmake_cxx_compiler: clang++ + cxxflags: -stdlib=libc++ + ldflags: -stdlib=libc++ + install_libcxx: true + + - os: ubuntu-latest + compiler: Clang libc++ + build_type: Release + cmake_c_compiler: clang + cmake_cxx_compiler: clang++ + cxxflags: -stdlib=libc++ + ldflags: -stdlib=libc++ + install_libcxx: true + + - os: windows-latest + compiler: MSVC + build_type: Debug + + - os: windows-latest + compiler: MSVC + build_type: Release + + steps: + - uses: actions/checkout@v4 + + - name: Install libc++ + if: matrix.install_libcxx + run: sudo apt-get install -y libc++-dev libc++abi-dev + + - name: Configure (Unix) + if: runner.os != 'Windows' + run: | + cmake -S . -B build \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + -DCMAKE_C_COMPILER=${{ matrix.cmake_c_compiler }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.cmake_cxx_compiler }} \ + -DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" \ + -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.ldflags }}" + + - name: Configure (Windows) + if: runner.os == 'Windows' + run: cmake -S . -B build + + - name: Build + run: cmake --build build --config ${{ matrix.build_type }} + + - name: Test (Unix) + if: runner.os != 'Windows' + run: ./build/test + + - name: Test (Windows) + if: runner.os == 'Windows' + run: .\build\${{ matrix.build_type }}\test.exe From 37cc83c8a7bfb8c65c1d9e38c4503029ecb5ee1b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 17:05:22 +0000 Subject: [PATCH 2/2] Address code review feedback: rename Clang libc++ and add comment Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/1d3e0cf9-5ffe-42b7-b295-e7cc865128ee Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com> --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b10dd9..e8bd5c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: cmake_cxx_compiler: clang++ - os: ubuntu-latest - compiler: Clang libc++ + compiler: Clang-libcxx build_type: Debug cmake_c_compiler: clang cmake_cxx_compiler: clang++ @@ -46,7 +46,7 @@ jobs: install_libcxx: true - os: ubuntu-latest - compiler: Clang libc++ + compiler: Clang-libcxx build_type: Release cmake_c_compiler: clang cmake_cxx_compiler: clang++ @@ -80,6 +80,7 @@ jobs: -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.ldflags }}" - name: Configure (Windows) + # Visual Studio is a multi-config generator; build type is passed via --config at build time if: runner.os == 'Windows' run: cmake -S . -B build