Conan #696
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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;--trace-expand' | |
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 |