feat: Github CI (#12)

* feat: Github CI

* add verbose to gcc

* reorder jobs

* add extra warnings and small fix
This commit is contained in:
2025-08-20 11:10:08 +02:00
committed by GitHub
parent 70c2f02b0b
commit bb82ae6458
3 changed files with 35 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
name: C-lang CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: gcc
run: mkdir -p build && gcc -v -Wall -Wextra -Werror src/*.c src/*.h -lm -o build/out
build-release:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
+1 -1
View File
@@ -9,7 +9,7 @@ clean:
build:
@mkdir -p build
gcc -Wall src/*.c src/*.h -lm -o build/$(TARGET)
gcc -v -Wall -Wextra src/*.c src/*.h -lm -o build/$(TARGET)
.PHONY: install
install: build
+1 -1
View File
@@ -68,7 +68,7 @@ bool is_number(char *value) {
return false;
}
unsigned long value_len = strlen(value);
int i;
unsigned int i;
for (i = 0; i < value_len; i++) {
if (!is_digit(value[i])) {
return false;