-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (80 loc) · 2.43 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Run format, Build Sphinx Documentation, tests
on:
[pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r quality.txt
- name: Code Format Check
run: |
ruff check .
# static-analysis:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.10"
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r quality.txt
# - name: Check code with ruff
# run: |
# ruff ./pyx2cscope
# - name: Check code with pylint
# run: |
# pylint ./pyx2cscope
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
# Since we moved to generic parser, we don't need to install the xc-16 compiler anymore,
# because generic parser is based on pyelftools.
#
# - name: Set up Microchip XC16 v2.10 compiler
# run: |
# wget -nv -O /tmp/xc16 https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/xc16-v2.10-full-install-linux64-installer.run && \
# chmod +x /tmp/xc16 && \
# sudo /tmp/xc16 --mode unattended --unattendedmodeui none --netservername localhost --LicenseType FreeMode --prefix /opt/microchip/xc16/v2.10 && \
# rm /tmp/xc16
# echo "/opt/microchip/xc16/v2.10/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r quality.txt
pip install -e .
- name: Run tests
run: |
pytest
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r quality.txt
pip install -e .
- name: Build documentation
run: |
sphinx-build -M html doc build --keep-going