ci: proper CI

This commit is contained in:
2026-05-13 16:30:09 +02:00
parent 3aaefc3174
commit d640017136
3 changed files with 119 additions and 1 deletions
+74
View File
@@ -0,0 +1,74 @@
name: Clang Build CI
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/build.yml'
- 'src/*.c'
- 'src/*.h'
- 'configure.ac'
- 'Makefile.am'
env:
GCC_ARGS: src/*.c src/*.h -lglfw -lGL -lm -lasound -Iinclude hashmap.c/hashmap.c log.c/src/log.c -DGLFW_INCLUDE_NONE -DGLFW_NATIVE_INCLUDE_NONE
GCC_ARGS_VIDEO: -DGLFW_EXPOSE_NATIVE_EGL -DVIDEO_IN
PACKAGES: "libglfw3-dev libgl-dev libasound2-dev"
PACKAGES_VIDEO: "libv4l-dev"
TARGET: forge
TEST_ARGS: "--help"
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: apt update && apt install -y $PACKAGES $PACKAGES_VIDEO
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: 'true'
- name: aclocal
run: aclocal
- name: autoconf
run: autoconf
- name: automake
run: automake --add-missing
- name: configure
run: ./configure
- name: make
run: make
- name: make distcheck
run: make distcheck
run-no-video:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: apt update && apt install -y $PACKAGES
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: 'true'
- name: gcc
run: mkdir -p build && gcc $GCC_ARGS -o build/$TARGET
- name: run program
run: ./build/$TARGET $TEST_ARGS
run-video:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: apt update && apt install -y $PACKAGES $PACKAGES_VIDEO
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: 'true'
- name: gcc
run: mkdir -p build && gcc $GCC_ARGS $GCC_ARGS_VIDEO -o build/$TARGET
- name: run program
run: ./build/$TARGET $TEST_ARGS
+44
View File
@@ -0,0 +1,44 @@
name: Clang Lint CI
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/lint.yml'
- 'src/*.c'
- 'src/*.h'
env:
GCC_ARGS: src/*.c src/*.h -lglfw -lGL -lm -lasound -Iinclude hashmap.c/hashmap.c log.c/src/log.c -DGLFW_INCLUDE_NONE -DGLFW_NATIVE_INCLUDE_NONE
GCC_ARGS_VIDEO: -DGLFW_EXPOSE_NATIVE_EGL -DVIDEO_IN
PACKAGES: "libglfw3-dev libgl-dev libasound2-dev"
PACKAGES_VIDEO: "libv4l-dev"
jobs:
lint-no-video:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: apt update && apt install -y $PACKAGES
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: 'true'
- name: gcc
run: gcc -Wall -Wextra -Werror -Wno-format-truncation -Wno-unused-parameter $GCC_ARGS
lint-video:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: apt update && apt install -y $PACKAGES $PACKAGES_VIDEO
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: 'true'
- name: gcc
run: gcc -Wall -Wextra -Werror -Wno-format-truncation $GCC_ARGS $GCC_ARGS_VIDEO
+1 -1
View File
@@ -1,4 +1,4 @@
[![GitHub Release](https://img.shields.io/github/v/release/klemek/forge-steel?style=flat-square)](https://github.com/klemek/forge-steel/releases) [![GitHub Release Date](https://img.shields.io/github/release-date/klemek/forge-steel?style=flat-square)](https://github.com/klemek/forge-steel/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/klemek/forge?style=flat-square)](https://github.com/klemek/forge-steel/commits/master/) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/klemek/forge-steel/ci.yml?style=flat-square)](https://github.com/klemek/forge-steel/actions/workflows/ci.yml) [![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/klemek_forge-steel?server=https%3A%2F%2Fsonarcloud.io&style=flat-square)](https://sonarcloud.io/summary/new_code?id=klemek_forge-steel) ![LOC](https://img.shields.io/badge/LOC-3.8k-blue?style=flat-square)
[![](https://git.klemek.fr/klemek/forge-steel/actions/workflows/lint.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/forge-steel/actions?workflow=lint.yml) [![](https://git.klemek.fr/klemek/forge-steel/actions/workflows/build.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/forge-steel/actions?workflow=build.yml)
<!-- omit from toc -->
# F.O.R.G.E. (Steel)