8000 Added Windows and OSX workflows · xtensor-stack/xtensor-python@522fbdb · GitHub
[go: up one dir, main page]

Skip to content

Commit 522fbdb

Browse files
committed
Added Windows and OSX workflows
1 parent d212bc3 commit 522fbdb

File tree

3 files changed

+129
-1
lines changed

3 files changed

+129
-1
lines changed

.github/workflows/linux.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defaults:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-20.04
16-
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.name }}
16+
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}
1717
strategy:
1818
fail-fast: false
1919
matrix:
@@ -22,6 +22,8 @@ jobs:
2222
- {compiler: gcc, version: '9'}
2323
- {compiler: gcc, version: '10'}
2424
- {compiler: gcc, version: '11'}
25+
- {compiler: clang, version: '15'}
26+
- {compiler: clang, version: '16'}
2527

2628
steps:
2729

.github/workflows/osx.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: OSX
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
defaults:
11+
run:
12+
shell: bash -e -l {0}
13+
jobs:
14+
build:
15+
runs-on: macos-${{ matrix.os }}
16+
name: macos-${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os:
21+
- 11
22+
- 12
23+
24+
steps:
25+
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
29+
- name: Set conda environment
30+
uses: mamba-org/setup-micromamba@v1
31+
with:
32+
environment-file: environment-dev.yml
33+
cache-environment: true
34+
35+
- name: Configure using CMake
36+
run: cmake -G Ninja -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DPYTHON_EXECUTABLE=`which python` -DDOWNLOAD_GTEST=ON $(Build.SourcesDirectory)
37+
38+
- name: Install
39+
working-directory: build
40+
run: cmake --install .
41+
42+
- name: Build
43+
working-directory: build
44+
run: cmake --build . --target test_xtensor_python --parallel 8
45+
46+
- name: Run tests (C++)
47+
working-directory: build/test
48+
run: ./test_xtensor_python
49+
50+
- name: Run tests (Python)
51+
run: pytest -s
52+
53+
- name: Example - readme 1
54+
working-directory: docs/source/examples/readme_example_1
55+
run: |
56+
cmake -Bbuild -DPython_EXECUTABLE=`which python`
57+
cd build
58+
cmake --build .
59+
cp ../example.py .
60+
python example.py
61+
62+
- name: Example - copy \'cast\'
63+
working-directory: docs/source/examples/copy_cast
64+
run: |
65+
cmake -Bbuild -DPython_EXECUTABLE=`which python`
66+
cd build
67+
cmake --build .
68+
cp ../example.py .
69+
python example.py
70+
71+
- name: Example - SFINAE
72+
working-directory: docs/source/examples/sfinae
73+
run: |
74+
cmake -Bbuild -DPython_EXECUTABLE=`which python`
75+
cd build
76+
cmake --build .
77+
cp ../example.py .
78+
python example.py

.github/workflows/windows.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Windows
2+
on:
3+
#workflow_dispatch:
4+
#pull_request:
5+
#push:
6+
# branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
defaults:
11+
run:
12+
shell: bash -e -l {0}
13+
jobs:
14+
build:
15+
runs-on: [windows-latest]
16+
name: Windows
17+
18+
steps:
19+
20+
- name: Setup MSVC
21+
uses: ilammy/msvc-dev-cmd@v1
22+
23+
- name: Checkout code
24+
uses: actions/checkout@v3
25+
26+
- name: Set conda environment
27+
uses: mamba-org/setup-micromamba@v1
28+
with:
29+
environment-file: environment-dev.yml
30+
cache-environment: true
31+
32+
- name: Configure using CMake
33+
run: cmake -G Ninja -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DPYTHON_EXECUTABLE=`which python` -DDOWNLOAD_GTEST=ON $(Build.SourcesDirectory)
34+
35+
- name: Install
36+
working-directory: build
37+
run: cmake --install .
38+
39+
- name: Build
40+
working-directory: build
41+
run: cmake --build . --target test_xtensor_python --parallel 8
42+
43+
- name: Run tests (C++)
44+
working-directory: build/test
45+
run: ./test_xtensor_python
46+
47+
- name: Run tests (Python)
48+
run: pytest -s

0 commit comments

Comments
 (0)
0