From 57827512c9769d90bae779e91420f1e00ff0b8d2 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Fri, 27 Mar 2026 16:13:40 -0300 Subject: [PATCH] add CI configuration: implement GitHub Actions workflow for build and test --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- README.md | 5 ++++- 3 files changed, 46 insertions(+), 2 deletions(-) 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..8536fd1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Cache and install APT packages + uses: awalsh128/cache-apt-pkgs-action@v1 + with: + packages: cmake build-essential + + - name: Configure project + run: make configure + + - name: Build project + run: make build + + - name: Run tests + run: make test + + - name: Test Installation + run: make install INSTALL_PREFIX=${{ runner.temp }}/install + + - name: Verify installation + run: | + ls -la ${{ runner.temp }}/install/lib/ + ls -la ${{ runner.temp }}/install/include/ + + + diff --git a/CMakeLists.txt b/CMakeLists.txt index de5f000..54928d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 4.2) +cmake_minimum_required(VERSION 3.13) project(dynamic_array LANGUAGES C) set(CMAKE_C_STANDARD 11) diff --git a/README.md b/README.md index a4b145f..ed9fcd6 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,12 @@ test-meson/ ``` ## 🔧 Prerequisites +**Linux-only project** + - **CMake** ≥ 3.12 -- **C compiler** (GCC, Clang, MSVC) +- **C compiler** (GCC recommended, Clang supported) - **Make** (optional, but recommended) +- **build-essential** (on Ubuntu/Debian): `sudo apt-get install build-essential` ## 🔨 Building ### Using the Makefile (Recommended)