-
Notifications
You must be signed in to change notification settings - Fork 227
139 lines (118 loc) · 3.83 KB
/
Copy pathlarge.yaml
File metadata and controls
139 lines (118 loc) · 3.83 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
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
name: Run large tests
permissions: {}
on:
push:
branches: [segyio-1.x]
pull_request:
branches: [segyio-1.x]
workflow_dispatch:
jobs:
large:
name: Run large tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# only 64-bit windows
- os: windows-2022
cmake_generator: '-G "Visual Studio 17 2022"'
- os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build/test dependencies
working-directory: python
run: |
python -m pip install -r requirements-dev.txt
- name: Configure
shell: bash
run: |
cmake -S . -B build \
-DBUILD_PYTHON=ON \
-DBUILD_TESTING=OFF \
-DBUILD_BIN=OFF \
-DCMAKE_BUILD_TYPE=Release \
${{ matrix.cmake_generator }} \
- name: Build
shell: bash
run: |
cmake \
--build build \
--config Release \
- name: Test
shell: bash
run: |
cd python
pytest test/large.py -rPV
large-32-bit-linux:
name: Run large tests on 32-bit linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: .github/images/large32-bit.Dockerfile
platforms: linux/386
# The only true way to test 32-bit library is to run it on 32-bit machine, but
# there are no 32-bit runner in Github Actions.
#
# Running compiled 32-bit library on 64-bit machine is a substitute. It is not
# clear how well it represents true 32-bit system, but it is our only option.
#
# Building python code directly, without cbuildwheel, with 32-bit MSVC compiler
# fails. Seems like skbuild forces native platform internally, even if we supply
# 32-bit one directly. Build works in cbuildwheel as they seem to hack the
# environment to make it look like 32-bit system.
large_win32:
name: Run large tests on windows-2022, 32-bit wheel
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
architecture: "x86"
- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel
- name: Install build/test dependencies
working-directory: python
run: |
python -m pip install -r requirements-dev.txt
- name: Build wheel
shell: bash
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT_WINDOWS: >
CMAKE_GENERATOR="Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM="Win32"
run: |
python -m cibuildwheel --only cp312-win32 --output-dir ./wheelhouse python/
- name: Install local wheel
shell: bash
run: |
pip install ./wheelhouse/*.whl
rm -f ./wheelhouse/*.whl
# assure that local segyio doesn't take priority (one installed to pip is used)
- name: Remove local segyio
shell: bash
working-directory: python
run: |
python -c "import segyio; import inspect; print('before: segyio loaded from ' + inspect.getfile(segyio))"
rm -rf $(pwd)/segyio
python -c "import segyio; import inspect; print('after: segyio loaded from ' + inspect.getfile(segyio))"
- name: Test
shell: bash
run: |
cd python
pytest test/large.py -rPV