forked from arvidn/libtorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (111 loc) · 3.59 KB
/
Copy pathpython.yml
File metadata and controls
134 lines (111 loc) · 3.59 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
name: Python bindings
on:
push:
branches: [ RC_1_2 RC_2_0 master ]
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
test:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, windows-latest ]
steps:
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: dependencies (MacOS)
if: runner.os == 'macOS'
run: |
brew install boost-build boost boost-python3 python@3.14 openssl@3 python-setuptools
export PATH=$(brew --prefix)/opt/python@3.14/bin:$PATH
- name: update package lists (linux)
if: runner.os == 'Linux'
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
if: runner.os != 'Windows'
with:
update_packager_index: false
override_cache_key: ccache-python-${{ matrix.os }}-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: dependencies (linux)
if: runner.os == 'Linux'
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev python3 python3-setuptools libssl-dev
- name: dependencies (windows)
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade setuptools
- name: install openssl:x64-windows-static (windows)
if: runner.os == 'Windows'
uses: ./.github/actions/win_install_openssl
with:
architecture: x64
linking: static
- name: install boost (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.91.0 https://github.com/boostorg/boost.git
cd boost
bootstrap.bat
- name: boost headers (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd boost
.\b2 headers
- name: build/install (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
set BOOST_ROOT=%CD%\boost
set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build
set PATH=%BOOST_ROOT%;%PATH%
cd bindings\python
python setup.py build_ext --b2-args "asserts=on invariant-checks=full" install --user --prefix=
- name: tests (windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd bindings\python
python test.py
- name: build no-deprecated (Linux)
if: runner.os == 'Linux'
run: |
cd bindings/python
python3 setup.py build_ext --b2-args "deprecated-functions=off"
- name: build/install (Linux)
if: runner.os == 'Linux'
run: |
cd bindings/python
python3 setup.py build_ext install --user --prefix=
- name: build/install (MacOS)
if: runner.os == 'macOS'
run: |
# Install to Homebrew's python site-packages. no need for --user and --prefix
cd bindings/python
export PATH=$(brew --prefix)/opt/python@3.14/bin:$PATH
python3.14 setup.py build_ext install --install-lib $(brew --prefix)/lib/python3.14/site-packages
- name: tests (Linux)
if: runner.os == 'Linux'
run: |
cd bindings/python
python3 test.py
- name: tests (MacOS)
if: runner.os == 'macOS'
run: |
cd bindings/python
export PATH=$(brew --prefix)/opt/python@3.14/bin:$PATH
python3.14 test.py