generated from pybind/scikit_build_example
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (66 loc) · 2.03 KB
/
ci.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
name: CI
on:
workflow_dispatch:
# Uncomment to build when pushing to main
# push:
# branches:
# - "main"
jobs:
cpp:
name: ${{ github.workflow }} C++ library on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-18.04, macos-latest, windows-latest]
include:
- os: windows-latest
triplet: x64-windows
- os: ubuntu-latest
triplet: x64-linux
- os: macos-latest
triplet: x64-osx
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Restore artifacts, or setup vcpkg for building artifacts
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: "a7b6122f6b6504d16d96117336a0562693579933"
- name: Create a build directory
run: mkdir build
- name: Configure cmake
run: cmake -B build
- name: Build with cmake
run: cmake --build build --config Release
- name: Test
run: ctest --test-dir build
python:
name: ${{ github.workflow }} Python package on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-18.04, macos-latest, windows-latest]
python-version: ["3.7"]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Restore artifacts, or setup vcpkg for building artifacts
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: "a7b6122f6b6504d16d96117336a0562693579933"
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install scikit-build
run: pip install scikit-build
- name: Build and install with pip
run: pip install ${{ github.workspace }}[test]
- name: Test
run: pytest tests