Skip to content

Commit 962be0b

Browse files
modified actions (#535)
1 parent 1393b5f commit 962be0b

8 files changed

Lines changed: 517 additions & 232 deletions

.github/workflows/build-and-deploy.yml

Lines changed: 14 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
jobs:
1010
wheels-windows:
11-
runs-on: windows-latest
1211
strategy:
1312
fail-fast: false
1413
matrix:
@@ -28,81 +27,22 @@ jobs:
2827
- python-version: "3.14"
2928
python-tag: "314"
3029
architecture: "AMD64"
31-
32-
33-
34-
steps:
35-
- uses: actions/checkout@v4
36-
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v5
38-
with:
39-
python-version: ${{ matrix.python-version }}
40-
- uses: bus1/cabuild/action/msdevshell@v1
41-
with:
42-
architecture: x64
43-
if: matrix.architecture == 'AMD64'
44-
- uses: bus1/cabuild/action/msdevshell@v1
45-
with:
46-
architecture: x86
47-
if: matrix.architecture == 'x86'
48-
- name: Generate meson files
49-
run: |
50-
python scripts/generate_meson.py ./src/dbzero/ core
51-
python scripts/generate_meson_tests.py tests/
52-
python scripts/generate_meson_dbzero.py dbzero/
53-
54-
- name: Configure git
55-
run: |
56-
git config --global user.email "ci@example.com"
57-
git config --global user.name "CI Builder"
58-
rm .gitignore
59-
git add . && git commit -m "Update meson files for build"
60-
61-
- run: pip3 install pipx
62-
- run: pipx run cibuildwheel
63-
env:
64-
CIBW_BUILD: cp${{ matrix.python-tag }}-*
65-
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }}
66-
- uses: actions/upload-artifact@v4
67-
with:
68-
name: wheels-windows-${{ matrix.python-version }}
69-
path: wheelhouse/*.whl
30+
uses: ./.github/workflows/build-windows-wheel.yml
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
python-tag: ${{ matrix.python-tag }}
34+
architecture: ${{ matrix.architecture }}
7035

7136
wheels-linux:
72-
runs-on: ubuntu-latest
7337
strategy:
7438
fail-fast: false
7539
matrix:
7640
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
77-
steps:
78-
- uses: actions/checkout@v4
79-
- name: Set up Python ${{ matrix.python-version }}
80-
uses: actions/setup-python@v5
81-
with:
82-
python-version: ${{ matrix.python-version }}
83-
- uses: actions/checkout@v3
84-
- run: python3 scripts/generate_meson.py ./src/dbzero/ core
85-
- run: python3 scripts/generate_meson_tests.py tests/
86-
- run: python3 scripts/generate_meson_dbzero.py dbzero/
87-
- run: git config --global user.email "you@example.com"
88-
- run: git config --global user.name "Your Name"
89-
- run: rm .gitignore
90-
- run: git add . && git commit -m "Update meson files"
91-
- run: pip install build
92-
- run: python3 -m build
93-
env:
94-
CIBW_SKIP: pp* cp36-* *-musllinux*
95-
CIBW_ARCHS_MACOS: x86_64 arm64
96-
CIBW_ARCHS_LINUX: x86_64 aarch64
97-
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }}
98-
99-
- uses: actions/upload-artifact@v4
100-
with:
101-
name: wheels-linux-${{ matrix.python-version }}
102-
path: dist/*.whl
41+
uses: ./.github/workflows/build-linux-wheel.yml
42+
with:
43+
python-version: ${{ matrix.python-version }}
10344

10445
test-wheels-windows:
105-
runs-on: windows-latest
10646
needs: wheels-windows
10747
strategy:
10848
fail-fast: false
@@ -123,54 +63,19 @@ jobs:
12363
- python-version: "3.14"
12464
python-tag: "314"
12565
architecture: "AMD64"
126-
steps:
127-
- uses: actions/checkout@v4
128-
- name: Set up Python ${{ matrix.python-version }}
129-
uses: actions/setup-python@v5
130-
with:
131-
python-version: ${{ matrix.python-version }}
132-
- name: Download wheel artifact
133-
uses: actions/download-artifact@v4
134-
with:
135-
name: wheels-windows-${{ matrix.python-version }}
136-
path: ./wheels/
137-
- name: Install wheel and dependencies
138-
run: |
139-
pip install pytest
140-
pip install -r requirements.txt
141-
Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName }
142-
shell: powershell
143-
- name: Run tests
144-
run: |
145-
python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv
66+
uses: ./.github/workflows/test-windows-wheel.yml
67+
with:
68+
python-version: ${{ matrix.python-version }}
14669

14770
test-wheels-linux:
148-
runs-on: ubuntu-latest
14971
needs: wheels-linux
15072
strategy:
15173
fail-fast: false
15274
matrix:
15375
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
154-
155-
steps:
156-
- uses: actions/checkout@v4
157-
- name: Set up Python ${{ matrix.python-version }}
158-
uses: actions/setup-python@v5
159-
with:
160-
python-version: ${{ matrix.python-version }}
161-
- name: Download wheel artifact
162-
uses: actions/download-artifact@v4
163-
with:
164-
name: wheels-linux-${{ matrix.python-version }}
165-
path: ./wheels/
166-
- name: Install wheel and dependencies
167-
run: |
168-
pip install pytest
169-
pip install -r requirements.txt
170-
pip install ./wheels/*.whl
171-
- name: Run tests
172-
run: |
173-
python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv
76+
uses: ./.github/workflows/test-linux-wheel.yml
77+
with:
78+
python-version: ${{ matrix.python-version }}
17479

17580
sdist:
17681
runs-on: ubuntu-latest

.github/workflows/build-and-test-with-asan.yml

Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,23 @@ on:
44

55
jobs:
66
build-linux:
7-
runs-on: ubuntu-latest
8-
timeout-minutes: 60
97
strategy:
108
fail-fast: false
119
matrix:
1210
python-version: ["3.12"]
13-
steps:
14-
- uses: actions/checkout@v4
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v5
17-
with:
18-
python-version: ${{ matrix.python-version }}
19-
- uses: actions/checkout@v3
20-
- run: python3 scripts/generate_meson.py ./src/dbzero/ core
21-
- run: python3 scripts/generate_meson_tests.py tests/
22-
- run: python3 scripts/generate_meson_dbzero.py dbzero/
23-
- run: git config --global user.email "you@example.com"
24-
- run: git config --global user.name "Your Name"
25-
- run: rm .gitignore
26-
- run: git add . && git commit -m "Update meson files"
27-
- run: pip install build
28-
- run: python3 -m build --config-setting=setup-args=-Denable_sanitizers=true
29-
env:
30-
CIBW_SKIP: pp* cp36-* *-musllinux*
31-
CIBW_ARCHS_MACOS: x86_64 arm64
32-
CIBW_ARCHS_LINUX: x86_64 aarch64
33-
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }}
34-
35-
- uses: actions/upload-artifact@v4
36-
with:
37-
name: wheels-linux-${{ matrix.python-version }}
38-
path: dist/*.whl
11+
uses: ./.github/workflows/build-linux-wheel.yml
12+
with:
13+
python-version: ${{ matrix.python-version }}
14+
build-args: '--config-setting=setup-args=-Denable_sanitizers=true'
3915

4016
test-wheels-linux:
41-
runs-on: ubuntu-latest
42-
timeout-minutes: 15
4317
needs: build-linux
4418
strategy:
4519
fail-fast: false
4620
matrix:
4721
python-version: ["3.12"]
48-
49-
steps:
50-
- uses: actions/checkout@v4
51-
- name: Set up Python ${{ matrix.python-version }}
52-
uses: actions/setup-python@v5
53-
with:
54-
python-version: ${{ matrix.python-version }}
55-
- name: Download wheel artifact
56-
uses: actions/download-artifact@v4
57-
with:
58-
name: wheels-linux-${{ matrix.python-version }}
59-
path: ./wheels/
60-
- name: Install wheel and dependencies
61-
run: |
62-
pip install pytest
63-
pip install -r requirements.txt
64-
pip install ./wheels/*.whl
65-
- name: Run tests
66-
run: |
67-
LD_PRELOAD=$(gcc -print-file-name=libasan.so) python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv
22+
uses: ./.github/workflows/test-linux-wheel.yml
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
ld-preload: 'LD_PRELOAD=$(gcc -print-file-name=libasan.so)'
6826

.github/workflows/build-and-test.yml

Lines changed: 13 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -8,93 +8,33 @@ on:
88

99
jobs:
1010
build-linux:
11-
runs-on: ubuntu-latest
12-
timeout-minutes: 60
1311
strategy:
1412
fail-fast: false
1513
matrix:
1614
python-version: ["3.12"]
17-
steps:
18-
- uses: actions/checkout@v4
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v5
21-
with:
22-
python-version: ${{ matrix.python-version }}
23-
- uses: actions/checkout@v3
24-
- run: python3 scripts/generate_meson.py ./src/dbzero/ core
25-
- run: python3 scripts/generate_meson_tests.py tests/
26-
- run: python3 scripts/generate_meson_dbzero.py dbzero/
27-
- run: git config --global user.email "you@example.com"
28-
- run: git config --global user.name "Your Name"
29-
- run: rm .gitignore
30-
- run: git add . && git commit -m "Update meson files"
31-
- run: pip install build
32-
- run: python3 -m build
33-
env:
34-
CIBW_SKIP: pp* cp36-* *-musllinux*
35-
CIBW_ARCHS_MACOS: x86_64 arm64
36-
CIBW_ARCHS_LINUX: x86_64 aarch64
37-
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }}
38-
39-
- uses: actions/upload-artifact@v4
40-
with:
41-
name: wheels-linux-${{ matrix.python-version }}
42-
path: dist/*.whl
15+
uses: ./.github/workflows/build-linux-wheel.yml
16+
with:
17+
python-version: ${{ matrix.python-version }}
4318

4419
test-wheels-linux:
45-
runs-on: ubuntu-latest
46-
timeout-minutes: 15
4720
needs: build-linux
4821
strategy:
4922
fail-fast: false
5023
matrix:
5124
python-version: ["3.12"]
52-
53-
steps:
54-
- uses: actions/checkout@v4
55-
- name: Set up Python ${{ matrix.python-version }}
56-
uses: actions/setup-python@v5
57-
with:
58-
python-version: ${{ matrix.python-version }}
59-
- name: Download wheel artifact
60-
uses: actions/download-artifact@v4
61-
with:
62-
name: wheels-linux-${{ matrix.python-version }}
63-
path: ./wheels/
64-
- name: Install wheel and dependencies
65-
run: |
66-
pip install pytest
67-
pip install -r requirements.txt
68-
pip install ./wheels/*.whl
69-
- name: Run tests
70-
run: |
71-
python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv
72-
stress-tests-wheels-linux:
73-
runs-on: ubuntu-latest
74-
timeout-minutes: 15
25+
uses: ./.github/workflows/test-linux-wheel.yml
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
stress-test-linux:
7530
needs: build-linux
7631
strategy:
7732
fail-fast: false
7833
matrix:
7934
python-version: ["3.12"]
80-
81-
steps:
82-
- uses: actions/checkout@v4
83-
- name: Set up Python ${{ matrix.python-version }}
84-
uses: actions/setup-python@v5
85-
with:
86-
python-version: ${{ matrix.python-version }}
87-
- name: Download wheel artifact
88-
uses: actions/download-artifact@v4
89-
with:
90-
name: wheels-linux-${{ matrix.python-version }}
91-
path: ./wheels/
92-
- name: Install wheel and dependencies
93-
run: |
94-
pip install pytest
95-
pip install -r requirements.txt
96-
pip install ./wheels/*.whl
97-
- name: Run tests
98-
run: |
99-
python3 -m pytest -m 'stress_test' -c pytest.ini --capture=no -vv -s
35+
uses: ./.github/workflows/test-linux-wheel.yml
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
pytest-markers: "-m 'stress_test'"
39+
timeout-minutes: 60
10040

0 commit comments

Comments
 (0)