-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (84 loc) · 2.66 KB
/
cross_platform_tests.yml
File metadata and controls
100 lines (84 loc) · 2.66 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
99
100
name: Cross-Platform Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch: # Allows manual triggering
# Add this section to control notification behavior
defaults:
run:
shell: bash
# Explicitly disable all notifications
env:
GITHUB_ACTIONS_SKIP_NOTIFICATIONS: true
ACTIONS_STEP_DEBUG: false
GITHUB_ACTIONS_NOTIFICATIONS: false
jobs:
build_and_test:
name: Build and test on Ubuntu with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false # Continue with other jobs if one fails
matrix:
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for testing
run: |
python -m pip install --upgrade pip
pip install pytest pytest-benchmark
if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi
- name: Install c2pa-python for benchmarking
run: pip install c2pa-python
continue-on-error: true # Continue even if c2pa-python install fails
- name: Build package with maturin (development mode)
uses: PyO3/maturin-action@v1
with:
target: x86_64
command: develop
args: --release
sccache: 'true'
python-version: ${{ matrix.python-version }}
working-directory: .
- name: Run tests
run: python run_tests.py
continue-on-error: true # Continue even if tests fail to get wheels
- name: Build wheel
uses: PyO3/maturin-action@v1
with:
target: x86_64
command: build
args: --release
sccache: 'true'
python-version: ${{ matrix.python-version }}
working-directory: .
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-ubuntu-latest-py${{ matrix.python-version }}
path: target/wheels/
# Create a release job that collects all wheels
collect_wheels:
name: Collect all wheels
needs: build_and_test
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: wheels
- name: Display wheel files
run: find wheels -type f -name "*.whl" | sort
shell: bash
- name: Upload combined wheels
uses: actions/upload-artifact@v4
with:
name: all-wheels
path: wheels/*/*.whl