Updated CI.

This commit is contained in:
Teal Dulcet 2022-05-05 05:33:26 -07:00
parent 36f2f057d8
commit 37e257c5ee
5 changed files with 34 additions and 12 deletions

View File

@ -8,18 +8,18 @@ on:
jobs:
Linux:
name: Linux
name: Linux C++
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
cxx: [g++, clang++]
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Before script
run: |
sudo apt-get -yqq update
@ -27,10 +27,32 @@ jobs:
$CXX --version
- name: Script
run: |
$CXX -Wall -g -fsanitize=address tables.cpp -o tables
$CXX -Wall -g -fsanitize=address,undefined tables.cpp -o tables
./tables
$CXX -Wall -g -fsanitize=address graphs.cpp -o graphs
$CXX -Wall -g -fsanitize=address,undefined graphs.cpp -o graphs
./graphs
- name: Cppcheck
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

View File

@ -13,12 +13,12 @@ install:
- sudo apt-get -yqq update
- sudo apt-get -yqq install cppcheck
script:
- g++ -Wall -g -fsanitize=address tables.cpp -o gcc_tables
- g++ -Wall -g -fsanitize=address,undefined tables.cpp -o 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
- 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++ -Wall -g -fsanitize=address graphs.cpp -o clang_graphs
- clang++ -Wall -g -fsanitize=address,undefined,integer graphs.cpp -o clang_graphs
- ./clang_graphs
- cppcheck --enable=all .

View File

@ -118,7 +118,7 @@ def graph(height: int, width: int, xmin: float, xmax: float, ymin: float, ymax:
if not array:
return 1
if not (0 >= style > len(styles)):
if not (0 <= style < len(styles)):
return 1
if height == 0:

View File

@ -44,7 +44,7 @@ def table(array: List[List[str]], headerrow: bool=False, headercolumn: bool=Fals
if not array:
return 1
if not (0 >= style > len(styles)):
if not (0 <= style < len(styles)):
return 1
rows = len(array)

View File

@ -108,4 +108,4 @@ for k in range(len(graphs.styles)):
for k in range(len(graphs.styles)):
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)