4 Commits

Author SHA1 Message Date
klemek 99a71e9833 forge (steel) v1.0.2
Clang Lint CI / lint-no-video (push) Successful in 1m0s
Clang Lint CI / lint-video (push) Successful in 2m0s
Clang Build CI / run-no-video (push) Successful in 1m59s
Clang Build CI / run-video (push) Successful in 1m11s
Clang Build CI / build-release (push) Successful in 3m3s
2026-05-13 16:32:28 +02:00
klemek 51c6429957 fix: PKGBUILD 2026-05-13 16:32:11 +02:00
klemek d640017136 ci: proper CI 2026-05-13 16:32:11 +02:00
klemek 3aaefc3174 fix: remove bsd dependency and make no-video build 2026-05-13 16:32:09 +02:00
10 changed files with 150 additions and 85 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
-52
View File
@@ -1,52 +0,0 @@
name: C-lang CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: install libs
run: sudo apt install -y libglfw3-dev libgl-dev libv4l-dev libasound2-dev libbsd-dev
- name: gcc
run: mkdir -p build && gcc -v -Wall -Wextra -Werror -Wno-format-truncation src/*.c src/*.h -lglfw -lGL -lm -lasound -lbsd -Iinclude hashmap.c/hashmap.c log.c/src/log.c -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE -DVIDEO_IN
build-no-video:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: install libs
run: sudo apt install -y libglfw3-dev libgl-dev libasound2-dev libbsd-dev
- name: gcc
run: mkdir -p build && gcc -v -Werror src/*.c src/*.h -lglfw -lGL -lm -lasound -lbsd -Iinclude hashmap.c/hashmap.c log.c/src/log.c -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE
build-release:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: install libs
run: sudo apt install -y libglfw3-dev libgl-dev libv4l-dev libasound2-dev libbsd-dev
- 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
+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
+2 -1
View File
@@ -26,4 +26,5 @@ confdeps.*
conftest.*
*.txt
error.glsl
draft/
draft/
*.gch
+2 -2
View File
@@ -2,9 +2,9 @@ AUTOMAKE_OPTIONS = foreign subdir-objects -Wall
bin_PROGRAMS = forge
forge_SOURCES = src/args.c src/arr.c src/config_file.c src/file.c src/forge.c src/main.c src/midi.c src/project.c src/rand.c src/shaders.c src/shared.c src/state.c src/string.c src/tempo.c src/timer.c src/video.c src/window.c $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/hashmap.c/hashmap.c $(top_srcdir)/log.c/src/log.c
forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE -DLOG_USE_COLOR -DVIDEO_IN -DDATADIR=\"$(datadir)/$(PACKAGE)\"
forge_LDADD = -lm -lGL -lglfw -lasound -lbsd
forge_LDADD = -lm -lGL -lglfw -lasound
include_HEADERS = src/args.h src/arr.h src/config.h src/config_file.h src/constants.h src/file.h src/forge.h src/main.h src/midi.h src/project.h src/rand.h src/shaders.h src/shared.h src/state.h src/string.h src/tempo.h src/timer.h src/types.h src/video.h src/window.h $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/include/linmath.h $(top_srcdir)/include/hashmap.h $(top_srcdir)/include/log.h
EXTRA_DIST = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuyv.glsl
confdir = $(prefix)/share/$(PACKAGE)
conf_DATA = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuyv.glsl
conf_DATA = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuyv.glsl
+20 -20
View File
@@ -14,7 +14,7 @@ build:
-Iinclude \
hashmap.c/hashmap.c \
log.c/src/log.c \
-lm -lGL -lglfw -lasound -lbsd \
-lm -lGL -lglfw -lasound \
-Wall -Wextra \
-Wno-format-truncation \
-DGLFW_INCLUDE_NONE \
@@ -25,6 +25,24 @@ build:
-o build/$(TARGET) \
-g -Og
.PHONY: build-no-video
build-no-video:
@mkdir -p build
gcc \
src/*.h src/*.c \
-Iinclude \
hashmap.c/hashmap.c \
log.c/src/log.c \
-lm -lGL -lglfw -lasound \
-Wall -Wextra \
-Wno-format-truncation \
-Wno-unused-parameter \
-DGLFW_INCLUDE_NONE \
-DGLFW_NATIVE_INCLUDE_NONE \
-DLOG_USE_COLOR \
-o build/$(TARGET) \
-g -Og
.PHONY: format
format:
clang-format -i src/*
@@ -50,25 +68,7 @@ valgrind: build
.PHONY: clean-release
clean-release:
@rm -rf \
autom4te.cache \
aclocal.m4 \
compile \
config.* \
configure \
configure~ \
depcomp \
**/.deps \
**/**/.deps \
$(TARGET) \
$(TARGET)-*.tar.gz \
$(TARGET)-*.pkg.tar.zst \
install-sh \
Makefile \
Makefile.in \
missing \
src/.* \
src/*.o
git clean -f -x
.PHONY: test-release
test-release: clean clean-release
+3 -3
View File
@@ -1,12 +1,12 @@
pkgname=forge-steel
pkgver=1.0.1
pkgver=1.0.2
pkgrel=1
pkgdesc="Fusion Of Real Time Generative Effects"
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'riscv64')
depends=('glfw>=1:3', 'v4l-utils>=1.32', 'alsa-lib>=1.2', 'libglvnd>=1.7')
url="https://github.com/klemek/forge-steel"
source=("${pkgname}-steel-${pkgver}.tar.gz::https://github.com/klemek/forge-steel/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('b2345c1a87f6b5b13dcce6a237a3f9a9ddb7fa9c3e982f5e164e7d7fef5725f3')
source=("${pkgname}-steel-${pkgver}.tar.gz::https://git.klemek.fr/klemek/forge-steel/releases/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('53d47f1099556597bf4d9e09d9874e465aad77b3aaa51b3259a1fb955e774f83')
srcdir=build
backup=("usr/share/${pkgname}")
+1 -2
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)
@@ -116,7 +116,6 @@ Here's a quick rundown of the process:
| libGL | libgl-dev | extra/libglvnd |
| libasound | libasound2-dev | extra/alsa-lib |
| libv4l2 | libv4l-dev | extra/v4l-utils |
| libbsd | libbsd-dev | extra/libbsd |
### From release
+2 -4
View File
@@ -1,4 +1,4 @@
AC_INIT([forge], [steel-1.0.1], [klemek.dev@proton.me])
AC_INIT([forge], [steel-1.0.2], [klemek.dev@proton.me])
AM_INIT_AUTOMAKE
AC_PROG_CC
@@ -23,8 +23,6 @@ AC_CHECK_HEADERS([string.h])
AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([bsd/string.h])
AC_CHECK_HEADERS([linux/videodev2.h])
AC_CHECK_HEADERS([alsa/rawmidi.h])
@@ -33,4 +31,4 @@ AC_CHECK_HEADERS([GLFW/glfw3.h])
AC_CHECK_HEADERS([GLFW/glfw3native.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_OUTPUT
+2 -1
View File
@@ -48,6 +48,7 @@ bool check_glerror(ShaderProgram *program, const char *context) {
}
bool check_eglerror_ro(const char *context) {
#ifdef VIDEO_IN
unsigned int code;
code = eglGetError();
@@ -56,7 +57,7 @@ bool check_eglerror_ro(const char *context) {
log_warn("EGL Error: %04x (%s)", code, context);
return true;
}
#endif /* VIDEO_IN */
return false;
}