-
Notifications
You must be signed in to change notification settings - Fork 198
51 lines (48 loc) · 1.79 KB
/
Copy pathbuild.yml
File metadata and controls
51 lines (48 loc) · 1.79 KB
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
name: Build
on:
workflow_call:
workflow_dispatch:
permissions: {}
jobs:
build:
name: Build
runs-on:
- ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9", "3.14"] # oldest supported and latest tested
env:
codegen-python-version: "3.9"
steps:
- name: Check out repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2554c7e5680982d3355677b2290e48b60678744 # v0.8.0
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry
uses: ni/python-actions/setup-poetry@a2554c7e5680982d3355677b2290e48b60678744 # v0.8.0
- name: Run linters and type checkers
uses: ni/python-actions/analyze-project@a2554c7e5680982d3355677b2290e48b60678744 # v0.8.0
with:
install-args: "--all-extras --with examples"
- name: Run Bandit security checks
run: poetry run bandit -c pyproject.toml -r generated/nidaqmx
- name: Run cspell
uses: streetsidesoftware/cspell-action@e0668cf020899e887ee8ad4d173c31738a79eae8 # v9.0.1
with:
incremental_files_only: false
check_dot_files: explicit
- name: Generate ni-daqmx files
if: ${{ runner.os == 'Linux' && matrix.python-version == env.codegen-python-version }}
run: |
rm -fr generated/nidaqmx
poetry run python src/codegen --dest generated/nidaqmx
- name: Check for files dirtied by codegen
if: ${{ runner.os == 'Linux' && matrix.python-version == env.codegen-python-version }}
run: git diff --exit-code