-
Notifications
You must be signed in to change notification settings - Fork 4
118 lines (92 loc) · 2.82 KB
/
ci.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: ci
env:
CMAKE_BUILD_TYPE: Release
CMAKE_INSTALL_PREFIX: ~/libgem
GEMINI_ROOT: ~/libgem
CMAKE_GENERATOR: Ninja
HOMEBREW_NO_INSTALL_CLEANUP: 1
CMAKE_BUILD_PARALLEL_LEVEL: 4
# GEMINI_ROOT is used to find Gemini3D by PyGemini
on:
push:
paths:
- "**.py"
- ".github/workflows/**"
- "src/gemini3d/libraries.json"
- "!scripts/**"
- "!example/**"
- "!Examples/**"
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: macos-latest
python-version: "3.12"
- os: windows-latest
python-version: "3.12"
name: Lint ${{ matrix.os }} Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -e .[lint]
- run: flake8
- run: mypy
core:
timeout-minutes: 45
strategy:
fail-fast: true
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest]
include:
- os: macos-latest
python-version: '3.13'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
steps:
- name: Git Checkout ${{ github.action_repository }}
uses: actions/checkout@v4
- uses: ./.github/workflows/composite-python
timeout-minutes: 15
env:
GEMINI_CIROOT: ${{ github.workspace }}/ci
GEMCI_ROOT: ${{ github.workspace }}/gemci
- name: upload test files if failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: input-${{ runner.os }}-py${{ matrix.python-version }}
path: ${{ github.workspace }}/pytest/test*mini2*
retention-days: 1
- uses: ./.github/workflows/composite-pkg
if: runner.os == 'Linux'
timeout-minutes: 15
- uses: ./.github/workflows/composite-gemini3d
if: runner.os == 'Linux'
timeout-minutes: 15
- name: Executable tests
if: runner.os == 'Linux'
run: pytest ${{ github.workspace }} -m "exe" --basetemp=${{ github.workspace }}/pytest-exe
env:
GEMCI_ROOT: ${{ github.workspace }}/gemci
GEMINI_CIROOT: ${{ github.workspace }}/ci
- name: upload test files if failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: exe-${{ runner.os }}-py${{ matrix.python-version }}
path: ${{ github.workspace }}/pytest-exe/test*mini2*
retention-days: 1
# codecov coverage
# - run: pip install codecov pytest-cov
# - run: pytest --cov --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1