-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (66 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
68 lines (66 loc) · 2.14 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
name: CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
tester:
name: Testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, macos-14]
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
env:
MACOSX_DEPLOYMENT_TARGET: '15.0'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y libgl1-mesa-dev libeigen3-dev libcgal-dev
- if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install cgal
# Cache vcpkg on Windows
- name: Restore vcpkg cache
if: runner.os == 'Windows'
id: cache-vcpkg
uses: actions/cache@v4
with:
path: |
C:/vcpkg
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-
- name: Install vcpkg dependencies (Windows only)
if: runner.os == 'Windows'
shell: pwsh
run: |
$Env:VCPKG_ROOT = "C:/vcpkg"
if (!(Test-Path $Env:VCPKG_ROOT)) {
git clone https://github.com/microsoft/vcpkg $Env:VCPKG_ROOT
& "$Env:VCPKG_ROOT/bootstrap-vcpkg.bat"
}
# Only install if packages are missing
if (!(Test-Path "$Env:VCPKG_ROOT/installed/x64-windows/cgal")) {
& "$Env:VCPKG_ROOT/vcpkg.exe" install yasm-tool cgal
}
echo "VCPKG_ROOT=$Env:VCPKG_ROOT" >> $Env:GITHUB_ENV
# now inject your extra CMake flags:
$toolchain = "$Env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
echo "CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=${toolchain} -DVCPKG_ROOT=${Env:VCPKG_ROOT}" >> $Env:GITHUB_ENV
echo $CMAKE_ARGS
- name: Pip install
run: |
pip install .[test]
- name: Run tests
run: |
pytest