add CI configuration: implement GitHub Actions workflow for build and test

This commit is contained in:
2026-03-27 16:13:40 -03:00
parent 8ed8c60afd
commit 57827512c9
3 changed files with 46 additions and 2 deletions

41
.github/workflows/ci.yml vendored Normal file
View File

@@ -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/

View File

@@ -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)

View File

@@ -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)