feat: Github CI (#12)
* feat: Github CI * add verbose to gcc * reorder jobs * add extra warnings and small fix
This commit is contained in:
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user