ci: add proper ci
Clang Lint CI / lint-video (push) Failing after 1m0s
Clang Build CI / run-video (push) Successful in 1m8s
Clang Build CI / run-no-video (push) Successful in 1m9s
Clang Lint CI / lint-no-video (push) Has been cancelled
Clang Build CI / build-release (push) Successful in 1m38s
Clang Lint CI / lint-video (push) Failing after 1m0s
Clang Build CI / run-video (push) Successful in 1m8s
Clang Build CI / run-no-video (push) Successful in 1m9s
Clang Lint CI / lint-no-video (push) Has been cancelled
Clang Build CI / build-release (push) Successful in 1m38s
This commit is contained in:
@@ -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 libbsd-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
|
||||||
@@ -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
|
|
||||||
@@ -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 libbsd-dev"
|
||||||
|
PACKAGES_VIDEO: "libv4l-dev"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-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 -v -Wall -Wextra -Werror -Wno-format-truncation -Wunused-parameter $GCC_ARGS
|
||||||
|
|
||||||
|
lint-no-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 -v -Wall -Wextra -Werror -Wno-format-truncation $GCC_ARGS $GCC_ARGS_VIDEO
|
||||||
+2
-1
@@ -26,4 +26,5 @@ confdeps.*
|
|||||||
conftest.*
|
conftest.*
|
||||||
*.txt
|
*.txt
|
||||||
error.glsl
|
error.glsl
|
||||||
draft/
|
draft/
|
||||||
|
*.gch
|
||||||
|
|||||||
+18
-19
@@ -25,6 +25,23 @@ build:
|
|||||||
-o build/$(TARGET) \
|
-o build/$(TARGET) \
|
||||||
-g -Og
|
-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 -lbsd \
|
||||||
|
-Wall -Wextra \
|
||||||
|
-Wno-format-truncation \
|
||||||
|
-DGLFW_INCLUDE_NONE \
|
||||||
|
-DGLFW_NATIVE_INCLUDE_NONE \
|
||||||
|
-DLOG_USE_COLOR \
|
||||||
|
-o build/$(TARGET) \
|
||||||
|
-g -Og
|
||||||
|
|
||||||
.PHONY: format
|
.PHONY: format
|
||||||
format:
|
format:
|
||||||
clang-format -i src/*
|
clang-format -i src/*
|
||||||
@@ -50,25 +67,7 @@ valgrind: build
|
|||||||
|
|
||||||
.PHONY: clean-release
|
.PHONY: clean-release
|
||||||
clean-release:
|
clean-release:
|
||||||
@rm -rf \
|
git clone -f -x
|
||||||
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
|
|
||||||
|
|
||||||
.PHONY: test-release
|
.PHONY: test-release
|
||||||
test-release: clean clean-release
|
test-release: clean clean-release
|
||||||
|
|||||||
+2
-1
@@ -48,6 +48,7 @@ bool check_glerror(ShaderProgram *program, const char *context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool check_eglerror_ro(const char *context) {
|
bool check_eglerror_ro(const char *context) {
|
||||||
|
#ifdef VIDEO_IN
|
||||||
unsigned int code;
|
unsigned int code;
|
||||||
|
|
||||||
code = eglGetError();
|
code = eglGetError();
|
||||||
@@ -56,7 +57,7 @@ bool check_eglerror_ro(const char *context) {
|
|||||||
log_warn("EGL Error: %04x (%s)", code, context);
|
log_warn("EGL Error: %04x (%s)", code, context);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif /* VIDEO_IN */
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user