add CI configuration: implement GitHub Actions workflow for build and test
This commit is contained in:
41
.github/workflows/ci.yml
vendored
Normal file
41
.github/workflows/ci.yml
vendored
Normal 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/
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user