-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (115 loc) · 4.73 KB
/
wheels.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
# SPDX-FileCopyrightText: 2024 Howetuft
#
# SPDX-License-Identifier: Apache-2.0
name: LuxCore Python wheels
on: [push, pull_request]
#permissions:
# id-token: write # Important for at least docker gha cache
# contents: write
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-minor: ['8', '9', '10', '11', '12']
# os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [windows-latest]
env:
BOOST_VERSION: 1.85.0
SPDLOG_VERSION: 1.14.1
GH_TOKEN: ${{ github.token }}
SCCACHE_GHA_ENABLED: on
SCCACHE_DIRECT: on
CMAKE_MESSAGE_LOG_LEVEL: VERBOSE
steps:
- name: Checkout repository and submodule(s)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.${{ matrix.python-minor }}'
- name: Windows - Prepare Python deps
if: ${{ runner.os }} == "Windows"
uses: ./.github/actions/windows-python-deps
with:
job-id: ${{ matrix.os }}-${{ matrix.python-minor }}
- name: Windows - Set up build system
if: ${{ runner.os }} == "Windows"
uses: ./.github/actions/windows-build-system
- name: Windows - Clean source tree
if: ${{ runner.os }} == "Windows"
uses: ./.github/actions/windows-clean-tree
# - name: Windows - Build boost-python and boost-numpy
# if: ${{ runner.os }} == "Windows"
# uses: ./.github/actions/windows-boost-python
# with:
# job-id: ${{ matrix.os }}-${{ matrix.python-minor }}
# - name: Windows - Build oidn
# if: ${{ runner.os }} == "Windows"
# uses: ./.github/actions/windows-oidn
# with:
# job-id: ${{ matrix.os }}-${{ matrix.python-minor }}
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.19.2
# Build wheel
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
SCCACHE_GHA_ENABLED: "true"
CIBW_BUILD_FRONTEND: build
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: cp3${{ matrix.python-minor }}-*
CIBW_SKIP: "*musllinux*"
#CIBW_ARCHS: auto64
CIBW_ENVIRONMENT_PASS_LINUX: |
SCCACHE_GHA_ENABLED
SCCACHE_DIRECT
ACTIONS_CACHE_URL
ACTIONS_RUNTIME_TOKEN
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_ALL_LINUX: source /project/scripts/before_all_linux.sh
CIBW_ENVIRONMENT_WINDOWS: >-
CMAKE_INCLUDE_PATH='${{ env.WINDOWS_DEPS }}\include'
CMAKE_LIBRARY_PATH='${{ env.WINDOWS_DEPS }}\x64\Release\lib;${{ steps.boost.outputs.librarydir }}'
CMAKE_PREFIX_PATH='${{ env.WINDOWS_DEPS }}'
CMAKE_BUILD_TYPE='Release'
CMAKE_BUILD_PARALLEL_LEVEL='4'
BOOST_ROOT='${{ steps.boost.outputs.root }}'
BOOST_LIBRARYDIR='${{ steps.boost.outputs.librarydir }}'
CXXFLAGS='-DBOOST_NO_CXX11_SCOPED_ENUMS -DBOOST_FILESYSTEM_VERSION=3'
CFLAGS='-DXML_STATIC'
CMAKE_CXX_COMPILER_LAUNCHER=sccache
CMAKE_C_COMPILER_LAUNCHER=sccache
CMAKE_CXX_STANDARD=17
SCCACHE_C_CUSTOM_CACHE_BUSTER='3.${{ matrix.python-minor }}'
SCCACHE_LOG='debug'
SCCACHE_ERROR_LOG='${{ github.workspace }}\sccache.log'
SCCACHE_CONF='${{ github.workspace }}\sccache_config'
SCCACHE_DIRECT='true'
SKBUILD_CMAKE_ARGS='--preset=conan-release;-G Ninja;--log-level=VERBOSE'
PYTHON_V=''
CIBW_BEFORE_BUILD_WINDOWS: dir ${{ steps.boost.outputs.root }} && echo %SCCACHE_GHA_ENABLED% && dir D:\a\LuxCoreWheel\LuxCoreWheel
# Upload sccache log (debug)
#- uses: actions/upload-artifact@v4
# if: always()
# with:
# name: sccache_${{ matrix.python-minor }}
# path: '${{ github.workspace }}\sccache.log'
- name: boost python log
run: |
cat D:\a\LuxCoreWheel\LuxCoreWheel\vcpkg\buildtrees\boost-python\config-x64-windows-release-out.log
cat D:\a\LuxCoreWheel\LuxCoreWheel\vcpkg\buildtrees\boost-python\install-x64-windows-release-rel-out.log
cat D:\a\LuxCoreWheel\LuxCoreWheel\vcpkg\buildtrees\boost-python\install-x64-windows-release-rel-err.log
shell: cmd
if: always()
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl