Skip to content

Commit

Permalink
Test linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
bindreams committed Apr 20, 2024
1 parent 343d523 commit 8e9851e
Showing 1 changed file with 47 additions and 12 deletions.
59 changes: 47 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
name: Build
name: Build package wheels

on: [workflow_dispatch]

jobs:
build-windows:
name: Build wheels on Windows
runs-on: windows-latest
# build-windows:
# name: Windows
# runs-on: windows-latest
# # strategy:
# # matrix:
# # os: [ubuntu-latest, windows-latest, macos-13, macos-14]

# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: "3.12"

# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: x64

# - name: Setup vcpkg package manager
# run: |
# mkdir .cache
# git clone https://github.com/microsoft/vcpkg --branch 2024.03.25 .cache/vcpkg
# .cache/vcpkg/bootstrap-vcpkg.bat

# - name: Install cibuildwheel
# run: pip install cibuildwheel==2.17.0

# - name: Build wheels
# run: python -m cibuildwheel --output-dir wheelhouse
# env:
# CIBW_SKIP: pp* *-win32
# CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.cache/vcpkg/scripts/buildsystems/vcpkg.cmake
# VCPKG_TARGET_TRIPLET: x64-windows-static
# CMAKE_GENERATOR: Ninja

# - uses: actions/upload-artifact@v4
# with:
# name: wheels-windows
# path: ./wheelhouse/*.whl

build-linux:
name: Linux
runs-on: ubuntu-latest
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macos-13, macos-14]
Expand All @@ -16,28 +55,24 @@ jobs:
with:
python-version: "3.12"

- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Setup vcpkg package manager
run: |
mkdir .cache
git clone https://github.com/microsoft/vcpkg --branch 2024.03.25 .cache/vcpkg
.cache/vcpkg/bootstrap-vcpkg.bat
.cache/vcpkg/bootstrap-vcpkg.sh
- name: Install cibuildwheel
run: pip install cibuildwheel==2.17.0

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: pp* *-win32
CIBW_SKIP: pp*
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/.cache/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: x64-windows-static
VCPKG_LIBRARY_LINKAGE: static
CMAKE_GENERATOR: Ninja

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
name: cibw-wheels-linux
path: ./wheelhouse/*.whl

0 comments on commit 8e9851e

Please sign in to comment.