mirror of
https://github.com/tdulcet/Table-and-Graph-Libs.git
synced 2025-05-05 21:41:12 +08:00
Updated CI.
This commit is contained in:
parent
36f2f057d8
commit
37e257c5ee
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@ -8,18 +8,18 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Linux:
|
Linux:
|
||||||
name: Linux
|
name: Linux C++
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, ubuntu-20.04]
|
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
|
||||||
cxx: [g++, clang++]
|
cxx: [g++, clang++]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
env:
|
env:
|
||||||
CXX: ${{ matrix.cxx }}
|
CXX: ${{ matrix.cxx }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Before script
|
- name: Before script
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -yqq update
|
sudo apt-get -yqq update
|
||||||
@ -27,10 +27,32 @@ jobs:
|
|||||||
$CXX --version
|
$CXX --version
|
||||||
- name: Script
|
- name: Script
|
||||||
run: |
|
run: |
|
||||||
$CXX -Wall -g -fsanitize=address tables.cpp -o tables
|
$CXX -Wall -g -fsanitize=address,undefined tables.cpp -o tables
|
||||||
./tables
|
./tables
|
||||||
$CXX -Wall -g -fsanitize=address graphs.cpp -o graphs
|
$CXX -Wall -g -fsanitize=address,undefined graphs.cpp -o graphs
|
||||||
./graphs
|
./graphs
|
||||||
- name: Cppcheck
|
- name: Cppcheck
|
||||||
run: cppcheck --enable=all .
|
run: cppcheck --enable=all .
|
||||||
|
|
||||||
|
Python:
|
||||||
|
name: Linux Python
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install wcwidth
|
||||||
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
- name: Script
|
||||||
|
run: |
|
||||||
|
python python/test.py
|
||||||
|
@ -13,12 +13,12 @@ install:
|
|||||||
- sudo apt-get -yqq update
|
- sudo apt-get -yqq update
|
||||||
- sudo apt-get -yqq install cppcheck
|
- sudo apt-get -yqq install cppcheck
|
||||||
script:
|
script:
|
||||||
- g++ -Wall -g -fsanitize=address tables.cpp -o gcc_tables
|
- g++ -Wall -g -fsanitize=address,undefined tables.cpp -o gcc_tables
|
||||||
- ./gcc_tables
|
- ./gcc_tables
|
||||||
- g++ -Wall -g -fsanitize=address graphs.cpp -o gcc_graphs
|
- g++ -Wall -g -fsanitize=address,undefined graphs.cpp -o gcc_graphs
|
||||||
- ./gcc_graphs
|
- ./gcc_graphs
|
||||||
- clang++ -Wall -g -fsanitize=address tables.cpp -o clang_tables
|
- clang++ -Wall -g -fsanitize=address,undefined,integer tables.cpp -o clang_tables
|
||||||
- ./clang_tables
|
- ./clang_tables
|
||||||
- clang++ -Wall -g -fsanitize=address graphs.cpp -o clang_graphs
|
- clang++ -Wall -g -fsanitize=address,undefined,integer graphs.cpp -o clang_graphs
|
||||||
- ./clang_graphs
|
- ./clang_graphs
|
||||||
- cppcheck --enable=all .
|
- cppcheck --enable=all .
|
||||||
|
@ -118,7 +118,7 @@ def graph(height: int, width: int, xmin: float, xmax: float, ymin: float, ymax:
|
|||||||
if not array:
|
if not array:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if not (0 >= style > len(styles)):
|
if not (0 <= style < len(styles)):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if height == 0:
|
if height == 0:
|
||||||
|
@ -44,7 +44,7 @@ def table(array: List[List[str]], headerrow: bool=False, headercolumn: bool=Fals
|
|||||||
if not array:
|
if not array:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if not (0 >= style > len(styles)):
|
if not (0 <= style < len(styles)):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
rows = len(array)
|
rows = len(array)
|
||||||
|
@ -108,4 +108,4 @@ for k in range(len(graphs.styles)):
|
|||||||
|
|
||||||
for k in range(len(graphs.styles)):
|
for k in range(len(graphs.styles)):
|
||||||
graphs.functions(height, width, -(2 * math.pi), 2 *
|
graphs.functions(height, width, -(2 * math.pi), 2 *
|
||||||
math.pi, -4, 4, [math.sin, math.cos, math.tan], style=k)
|
math.pi, -4, 4, [math.sin, math.cos, math.tan], axisunitslabel=False, style=k)
|
||||||
|
Loading…
Reference in New Issue
Block a user