This commit is contained in:
Kreyren 2020-02-07 13:20:50 +00:00
parent 6e18eb316e
commit 9e6733e0cc
5 changed files with 240 additions and 64 deletions

26
.github/label-pr.yml vendored

@ -20,9 +20,27 @@
- regExp: ".*\\.br+$"
labels: ["brainfuck"]
# Repo specific
#- regExp: ".*\\LICENSE*+$"
# labels: ["license"]
- regExp: ".*\\.jar+$"
labels: ["java"]
- regExp: "^(.*\\Cargo.toml)$"
- regExp: ".*\\.v+$"
labels: ["vlang"]
- regExp: ".*\\.cs+$"
labels: ["csharp"]
- regExp: "tests\\.*+$"
labels: ["tests"]
- regExp: "benches\\.*+$"
labels: ["benches"]
- regExp: "LICENSE.md"
labels: ["license"]
- regExp: "^(.*\\Cargo.toml\\requirements.txt)$"
labels: ["dependencies"]
# Repository specific
- regExp: "docs\\.*+$"
labels: ["docs"]

20
.github/labels.yml vendored

@ -24,6 +24,14 @@
color: ca0ef0
description: "Relevant to dependencies"
- name: tests
color: 8d0fd6
description: "Relevant to tests"
- name: benches
color: cc1250
description: "Relevant to benchmarks"
# Priority handling
- name: P - SHTF
color: ae00ff
@ -77,3 +85,15 @@
- name: CCP
color: 009dff
description: "Relevant to CCP"
- name: vlang
color: 03cafc
description: "Relevant to vlang"
- name: csharp
color: 08400a
description: "Relevant to csharp"
- name: java
color: ad690a
description: "Relevant to java"

@ -3,37 +3,168 @@ name: ConaIsa
on: [pull_request]
jobs:
rustlang:
# Rustlang
build-rustlang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
- name: building..
run: make build-rustlang
- name: tests
check-rustlang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: checking..
run: make check-rustlang
gc:
bench-rustlang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-gc
run: make build-gc
- name: make check-gc
run: make check-gc
gcc:
- name: running benchmarks..
run: make bench-rustlang
# gcc-c
build-gcc-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-gcc
run: make build-gcc
- name: make check-gcc
run: make check-gcc
shell:
- name: make build-gcc-c
run: make build-gcc-c
check-gcc-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make check-gcc-c
run: make check-gcc-c
bench-gcc-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make bench-gcc-c
run: make bench-gcc-c
# gcc-ccp
build-gcc-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-gcc-ccp
run: make build-gcc-ccp
check-gcc-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make check-gcc-ccp
run: make check-gcc-ccp
bench-gcc-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make bench-gcc-ccp
run: make bench-gcc-ccp
# clang-c
build-clang-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-clang-c
run: make build-clang-c
check-clang-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make check-clang-c
run: make check-clang-c
bench-clang-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make bench-clang-c
run: make bench-clang-c
# clang-ccp
build-clang-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-clang-ccp
run: make build-clang-ccp
check-clang-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make check-clang-ccp
run: make check-clang-ccp
bench-clang-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make bench-clang-ccp
run: make bench-clang-ccp
# vlang
build-vlang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-vlang
run: make build-vlang
check-vlang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make check-vlang
run: make check-vlang
bench-vlang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make bench-vlang
run: make bench-vlang
# Golang
build-golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make build-golang
run: make build-golang
check-golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make check-golang
run: make check-golang
bench-golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: make bench-golang
run: make bench-golang
# Shell
check-shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: shellcheck
uses: azohra/shell-linter@v0.2.0
python:
with:
path: "src/*.sh"
# Bash
check-shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: shellcheck
uses: azohra/shell-linter@v0.2.0
with:
path: "src/*.bash"
# Python
check-python:
runs-on: ubuntu-latest
strategy:
matrix:
@ -46,16 +177,16 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python3 -m pip3 install --upgrade pip
pip3 install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
pip3 install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
pip3 install pytest
pytest

@ -27,7 +27,11 @@ build:
build-rustlang:
@ cargo build --verbose
build-gc:
# FIXME: Add logic
build-clang-c:
@ exit 1
build-gcc-c:
@ # Make a build directory
@ [ ! -d build ] && { mkdir build || exit 1 ;}
@ [ ! -d build/target-gc ] && { mkdir build/build-gc || exit 1 ;}
@ -39,16 +43,16 @@ build-gc:
@ printf '%s\n' "Compilation of target for gc finished"
# FIXME: Replace 'exit 1' with helpful messages
build-gcc:
build-gcc-cpp:
@ # Make a build directory
@ [ ! -d build ] && { mkdir build || exit 1 ;}
@ [ ! -d build/target-gcc ] && { mkdir build/build-gcc || exit 1 ;}
@ # Compilation
@ [ ! -f build/build-gcc ] && { gc src/bin/main.c -o build/build-gcc/gcc-zernit || exit 1 ;}
@ [ ! -f build/build-gcc ] && { gcc src/bin/main.c -o build/build-gcc/gcc-zernit || exit 1 ;}
@ printf '%s\n' "Compilation of target for gcc finished"
build-clang:
build-clang-ccp:
@ printf 'FIXME: %s\n' "translate zernit in clang"
@ exit 1
@ -70,15 +74,15 @@ check:
@ printf 'FIXME: %s\n' "Check all targets if executed"
@ exit 1
check-gc:
check-gcc-c:
@ printf 'FIXME: %s\n' "Add tests for gc"
@ exit 1
check-gcc:
check-clang-c:
@ printf 'FIXME: %s\n' "Add tests for gcc"
@ exit 1
check-clang:
check-gcc-ccp:
@ printf 'FIXME: %s\n' "Add tests for clang"
@ exit 1
@ -106,6 +110,17 @@ check-vlang:
@ printf 'FIXME: %s\n' "Add tests for vlang"
@ exit 1
## BENCHES ##
# FIXME: Run all benches if this is executed
bench:
@ exit 1
# FIXME: Run vendor and
bench-rustlang:
@ exit 1
@ cargo bench
## CLEAN ##
clean:

@ -1,8 +0,0 @@
OBJS = main.c
CC = gcc
C_FLAGS = -w -pedantic
OBJ_NAME = main
all: $(OBJS)
$(CC) $(OBJS) $(C_FLAGS) -o $(OBJ_NAME)