chore: add initial CI pipeline with Gitea Actions, Makefile, and project scaffolding for loreg regex engine
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make valgrind
|
||||
|
||||
- name: Build release
|
||||
run: make
|
||||
|
||||
- name: Build debug
|
||||
run: make debug
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
||||
valgrind:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make valgrind
|
||||
|
||||
- name: Build test binaries
|
||||
run: make build/test_integration build/test_all
|
||||
|
||||
- name: Valgrind comprehensive tests
|
||||
run: |
|
||||
valgrind --leak-check=full --show-leak-kinds=all \
|
||||
--track-origins=yes --error-exitcode=1 \
|
||||
./build/test_all
|
||||
|
||||
- name: Valgrind integration tests
|
||||
run: |
|
||||
valgrind --leak-check=full --show-leak-kinds=all \
|
||||
--track-origins=yes --error-exitcode=1 \
|
||||
./build/test_integration
|
||||
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc make gcovr
|
||||
|
||||
- name: Generate coverage
|
||||
run: make coverage
|
||||
|
||||
- name: Upload coverage artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-report
|
||||
path: build/coverage/
|
||||
Reference in New Issue
Block a user