From 6b077f07ffa13d3ca47a1d5b8d9e9de18aaac47d Mon Sep 17 00:00:00 2001 From: Coldwings Date: Tue, 20 Jan 2026 10:44:17 +0800 Subject: [PATCH] Refactor CI workflow for multi-branch support Updated CI workflow to support multiple branches and configurations. --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 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..8954cb6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [ main, master, develop ] + pull_request: + branches: [ main, master, develop ] + +jobs: + build-and-test: + runs-on: ubuntu-24.04 + + strategy: + fail-fast: false + matrix: + build_type: [Release, Debug] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + ninja-build \ + liburing-dev \ + g++-14 + + - name: Configure CMake + run: | + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + -DCMAKE_C_COMPILER=gcc-14 \ + -DCMAKE_CXX_COMPILER=g++-14 + + - name: Build + run: cmake --build build --parallel + + - name: Run unit tests + run: ./build/tests/elcache_tests