ci: proper CI
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"
|
||||
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
|
||||
@@ -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,4 +1,4 @@
|
||||
[](https://github.com/klemek/forge-steel/releases) [](https://github.com/klemek/forge-steel/releases) [](https://github.com/klemek/forge-steel/commits/master/) [](https://github.com/klemek/forge-steel/actions/workflows/ci.yml) [](https://sonarcloud.io/summary/new_code?id=klemek_forge-steel) 
|
||||
[](https://git.klemek.fr/klemek/forge-steel/actions?workflow=lint.yml) [](https://git.klemek.fr/klemek/forge-steel/actions?workflow=build.yml)
|
||||
|
||||
<!-- omit from toc -->
|
||||
# F.O.R.G.E. (Steel)
|
||||
|
||||
Reference in New Issue
Block a user