Table-and-Graph-Libs/.github/workflows/ci.yml
2023-03-10 02:07:00 -08:00

59 lines
1.4 KiB
YAML

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *'
jobs:
Linux:
name: Linux C++
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
cxx: [g++, clang++]
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v3
- name: Before script
run: |
sudo apt-get -yqq update
sudo apt-get -yqq install cppcheck
$CXX --version
- name: Script
run: |
$CXX -std=c++14 -Wall -g -Og -fsanitize=address,undefined tables.cpp -o tables
./tables
$CXX -std=c++14 -Wall -g -Og -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.7", "3.8", "3.9", "3.10", "3.11"]
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 -X dev python/test.py