From 9e6733e0ccd97fbb67cf54d0950c9c4a689c8e8b Mon Sep 17 00:00:00 2001 From: Kreyren Date: Fri, 7 Feb 2020 13:20:50 +0000 Subject: [PATCH] gjhfhghk --- .github/label-pr.yml | 28 ++++- .github/labels.yml | 22 +++- .github/workflows/cona-isa.yml | 217 ++++++++++++++++++++++++++------- Makefile | 29 +++-- src/bin/Makefile | 8 -- 5 files changed, 240 insertions(+), 64 deletions(-) delete mode 100644 src/bin/Makefile diff --git a/.github/label-pr.yml b/.github/label-pr.yml index 1371079..18c21c4 100644 --- a/.github/label-pr.yml +++ b/.github/label-pr.yml @@ -20,9 +20,27 @@ - regExp: ".*\\.br+$" labels: ["brainfuck"] -# Repo specific -#- regExp: ".*\\LICENSE*+$" -# labels: ["license"] +- regExp: ".*\\.jar+$" + labels: ["java"] -- regExp: "^(.*\\Cargo.toml)$" - labels: ["dependencies"] \ No newline at end of file +- 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"] \ No newline at end of file diff --git a/.github/labels.yml b/.github/labels.yml index 3d8d5c1..6c2f30e 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -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 @@ -76,4 +84,16 @@ - name: CCP color: 009dff - description: "Relevant to CCP" \ No newline at end of file + 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" \ No newline at end of file diff --git a/.github/workflows/cona-isa.yml b/.github/workflows/cona-isa.yml index 42a305e..f276627 100644 --- a/.github/workflows/cona-isa.yml +++ b/.github/workflows/cona-isa.yml @@ -3,59 +3,190 @@ name: ConaIsa on: [pull_request] jobs: - rustlang: + # Rustlang + build-rustlang: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: build - run: make build-rustlang - - name: tests - run: make check-rustlang - gc: + - uses: actions/checkout@v2 + - name: building.. + run: make build-rustlang + check-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: + - uses: actions/checkout@v2 + - name: checking.. + run: make check-rustlang + bench-rustlang: 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: + - uses: actions/checkout@v2 + - 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-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: + - uses: actions/checkout@v2 + - name: shellcheck + uses: azohra/shell-linter@v0.2.0 + 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: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with flake8 - run: | - pip 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 - pytest \ No newline at end of file + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip3 install --upgrade pip + pip3 install -r requirements.txt + - name: Lint with flake8 + run: | + 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: | + pip3 install pytest + pytest \ No newline at end of file diff --git a/Makefile b/Makefile index 089f783..beffd52 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/src/bin/Makefile b/src/bin/Makefile deleted file mode 100644 index 56d2e68..0000000 --- a/src/bin/Makefile +++ /dev/null @@ -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) -