-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·168 lines (160 loc) · 4.56 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
clang_old_build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Install package
run: |
pip install -v .
- name: Remove directories (avoid importing uninstalled module)
run: |
rm -rf ./ceto && rm -rf ./include && rm -rf ./selfhost
- name: Test with pytest
run: |
clang++ -v && pytest -s
env:
CXX: clang++
clang_16_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
python -m pip install --upgrade pip
pip install flake8 pytest
- name: Install package
run: |
pip install -v .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --statistics --max-line-length=127
- name: Remove directories (avoid importing uninstalled module)
run: |
rm -rf ./ceto && rm -rf ./include && rm -rf ./selfhost
- name: Test with pytest
run: |
pytest -s
env:
CXX: clang++-16
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ceto-artifact-clang-16-ubuntu
path: ./ceto
clang_18_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
python -m pip install --upgrade pip
pip install pytest
- name: Install package
run: |
pip install -v .
- name: Remove directories (avoid importing uninstalled module)
run: |
rm -rf ./ceto && rm -rf ./include && rm -rf ./selfhost
- name: Test with pytest
run: |
pytest -s
env:
CXX: clang++
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ceto-artifact-clang-18-ubuntu
path: ./ceto
gcc_12_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt install gcc-12 g++-12
python -m pip install --upgrade pip
pip install pytest
- name: Install package
run: |
pip install -v .
- name: Remove directories (avoid importing uninstalled module)
run: |
rm -rf ./ceto && rm -rf ./include && rm -rf ./selfhost
- name: Test with pytest
run: |
pytest -s
env:
CXX: g++-12
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ceto-artifact-gcc-12-ubuntu
path: ./ceto
msvc_build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Install package
run: |
pip install -v .
- name: Remove directories (avoid importing uninstalled module)
run: |
rm -rf ./ceto && rm -rf ./include && rm -rf ./selfhost
- name: Test with pytest
run: |
pytest -s
env:
CXX: cl
PYTHONUTF8: 1
#esp.extensions:cppcorecheck.dll