Skip to content

Update dependency org.eolang:eo-maven-plugin to v0.41.2 #853

Update dependency org.eolang:eo-maven-plugin to v0.41.2

Update dependency org.eolang:eo-maven-plugin to v0.41.2 #853

Workflow file for this run

name: Build C2EO
on:
pull_request:
branches:
- master
jobs:
xcop:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: g4s8/xcop-action@master
pdd:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# - uses: g4s8/pdd-action@master
cpplint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install cpplint
run: sudo pip install cpplint
- name: Cpplint
run: cpplint --filter=-runtime/references,-runtime/string,-build/c++11 project/src/transpiler/**
clang-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Clang-format
uses: jidicula/[email protected]
with:
clang-format-version: '14'
check-path: 'project/src/transpiler'
fallback-style: 'Google'
clang-tidy:
needs: [cpplint, clang-format]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: MarkusJx/[email protected]
- name: Cache LLVM
uses: actions/cache@v3
with:
path: llvm-clang.tar.gz
key: ${{ runner.os }}-llvm-clang
- name: Unpack LLVM
run: sudo chmod ugo+rwx llvm-clang.tar.gz && tar -xvf llvm-clang.tar.gz -C . > /dev/null
- name: Install clang-tidy
run: sudo apt install clang-tidy
- name: Clang-tidy
run: |
cd ./project/scripts
python3 clang_tidy.py -h
python3 clang_tidy.py
gcc-c-torture:
needs: [cpplint, clang-format]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: MarkusJx/[email protected]
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: llvm-clang.tar.gz
key: ${{ runner.os }}-llvm-clang
- name: Unpack LLVM
run: sudo chmod ugo+rwx llvm-clang.tar.gz && tar -xvf llvm-clang.tar.gz -C . > /dev/null
- name: Download gcc-c-torture
uses: robinraju/[email protected]
with:
repository: "polystat/c2eo"
tag: "0.1.16"
fileName: "gcc.c-torture.tar.gz"
- name: Unpack gcc-c-torture
run: tar -xvf gcc.c-torture.tar.gz -C . > /dev/null
- name: Transpilation
run: |
cd ./project/scripts
python3 transpile.py -h
python3 transpile.py ../../gcc.c-torture -s gcc -n
c-testcuite:
needs: [cpplint, clang-format]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: MarkusJx/[email protected]
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: llvm-clang.tar.gz
key: ${{ runner.os }}-llvm-clang
- name: Unpack LLVM
run: sudo chmod ugo+rwx llvm-clang.tar.gz && tar -xvf llvm-clang.tar.gz -C . > /dev/null
- name: Download c-testcuite
uses: robinraju/[email protected]
with:
repository: "polystat/c2eo"
tag: "0.1.16"
fileName: "c-testcuite.tar.gz"
- name: Unpack c-testcuite
run: tar -xvf c-testcuite.tar.gz -C . > /dev/null
- name: Testing
run: |
cd ./project/scripts
python3 test.py -h
python3 test.py -p ../../c-testcuite -s testcuite -n -c
- name: Convert raw code coverage to report
run: |
cd ./project/bin/
llvm-profdata-14 merge -sparse *.profraw -o res.profdata
llvm-cov-14 show ./c2eo ../src/transpiler/*.cpp -instr-profile=res.profdata > codecov.txt
- uses: actions/upload-artifact@v3
with:
name: testcuite
path: project/bin/codecov.txt
test_main:
needs: [cpplint, clang-format]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: MarkusJx/[email protected]
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: llvm-clang.tar.gz
key: ${{ runner.os }}-llvm-clang
- name: Unpack LLVM
run: sudo chmod ugo+rwx llvm-clang.tar.gz && tar -xvf llvm-clang.tar.gz -C . > /dev/null
- name: Testing
run: |
cd ./project/scripts
python3 test.py -h
python3 test.py -s test -c
- name: Convert raw code coverage to report
run: |
cd ./project/bin/
llvm-profdata-14 merge -sparse *.profraw -o res.profdata
llvm-cov-14 show ./c2eo ../src/transpiler/*.cpp -instr-profile=res.profdata > codecov.txt
- uses: actions/upload-artifact@v3
with:
name: main
path: project/bin/codecov.txt
unit-tests:
needs: [cpplint, clang-format]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: MarkusJx/[email protected]
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: llvm-clang.tar.gz
key: ${{ runner.os }}-llvm-clang
- name: Unpack LLVM
run: sudo chmod ugo+rwx llvm-clang.tar.gz && tar -xvf llvm-clang.tar.gz -C . > /dev/null
- name: Build c2eo
run: cd ./project/scripts && python3 build_c2eo.py
- name: Unit testing
run: cd ./project/bin/ && ./unit_tests --gtest_filter=*
codecov:
needs: [clang-tidy, gcc-c-torture, c-testcuite, test_main, unit-tests]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: mkdir project/bin/
- name: Download test main codecov report
uses: actions/download-artifact@v3
with:
name: main
path: project/bin/main/
- name: Download testcuite codecov report
uses: actions/download-artifact@v3
with:
name: testcuite
path: project/bin/testcuite/
- uses: codecov/codecov-action@v3
with:
files: ./project/bin/main/codecov.txt,./project/bin/testcuite/codecov.txt