-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (87 loc) · 2.74 KB
/
test.yml
File metadata and controls
98 lines (87 loc) · 2.74 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
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
98
name: Tests
on:
push:
branches: [ master, develop ]
paths:
- 'cmake/**'
- 'tests/**'
- '.github/workflows/test.yml'
pull_request:
branches: [ master ]
paths:
- 'cmake/**'
- 'tests/**'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Enable debug mode'
required: false
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11']
include:
# Add specific CMake versions for each OS
- os: ubuntu-latest
cmake-version: '3.25'
- os: windows-latest
cmake-version: '3.25'
- os: macos-latest
cmake-version: '3.25'
# Add latest Python to Ubuntu
- os: ubuntu-latest
python-version: '3.12'
cmake-version: '3.25'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for version detection
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements*.txt
pyproject.toml
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake-version }}
- name: Cache test dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.local
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip --no-warn-script-location
# Set environment variable to disable pip upgrade notifications
echo "PIP_DISABLE_PIP_VERSION_CHECK=1" >> $GITHUB_ENV
python run_tests.py --check-deps --install-deps
- name: System information
run: |
python --version
cmake --version
git --version
- name: Run tests
if: runner.os != 'Windows'
run: |
python run_tests.py --verbose --parallel