FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
xtensor-python/.github/workflows/linux.yml at master · NKI-AI/xtensor-python · GitHub
NKI-AI
xtensor-python
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
xtensor-python
/
.github
/
workflows
/
linux.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
112 lines (99 loc) · 3.46 KB
Breadcrumbs
xtensor-python
/
.github
/
workflows
/
linux.yml
Copy path
File metadata and controls
112 lines (99 loc) · 3.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name
:
Linux
on
:
workflow_dispatch
:
pull_request
:
push
:
branches
:
[master]
concurrency
:
group
:
${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress
:
true
defaults
:
run
:
shell
:
bash -e -l {0}
jobs
:
build
:
runs-on
:
ubuntu-latest
name
:
${{ matrix.sys.compiler }} ${{ matrix.sys.version }}
strategy
:
fail-fast
:
false
matrix
:
sys
:
-
{compiler: gcc, version: '9'}
-
{compiler: gcc, version: '10'}
-
{compiler: gcc, version: '11'}
-
{compiler: gcc, version: '12'}
-
{compiler: clang, version: '15'}
-
{compiler: clang, version: '16'}
steps
:
-
name
:
Setup GCC
if
:
${{ matrix.sys.compiler == 'gcc' }}
run
:
|
GCC_VERSION=${{ matrix.sys.version }}
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
-
name
:
Setup clang
if
:
${{ matrix.sys.compiler == 'clang' }}
run
:
|
LLVM_VERSION=${{ matrix.sys.version }}
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
if [[ $LLVM_VERSION -ge 13 ]]; then
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" || exit 1
else
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" || exit 1
fi || exit 1
sudo apt-get update || exit 1
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
sudo ln -s /usr/include/asm-generic /usr/include/asm
CC=clang-$LLVM_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=clang++-$LLVM_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
-
name
:
Checkout code
uses
:
actions/checkout@v3
-
name
:
Set conda environment
uses
:
mamba-org/setup-micromamba@v1
with
:
environment-file
:
environment-dev.yml
cache-environment
:
true
-
name
:
Configure using CMake
run
:
cmake -G Ninja -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DPYTHON_EXECUTABLE=`which python` -DDOWNLOAD_GTEST=ON $(Build.SourcesDirectory)
-
name
:
Install
working-directory
:
build
run
:
cmake --install .
-
name
:
Build
working-directory
:
build
run
:
cmake --build . --target test_xtensor_python --parallel 8
-
name
:
Run tests (C++)
working-directory
:
build/test
run
:
./test_xtensor_python
-
name
:
Run tests (Python)
run
:
pytest -s
-
name
:
Example - readme 1
working-directory
:
docs/source/examples/readme_example_1
run
:
|
cmake -Bbuild -DPython_EXECUTABLE=`which python`
cd build
cmake --build .
cp ../example.py .
python example.py
-
name
:
Example - copy \'cast\'
working-directory
:
docs/source/examples/copy_cast
run
:
|
cmake -Bbuild -DPython_EXECUTABLE=`which python`
cd build
cmake --build .
cp ../example.py .
python example.py
-
name
:
Example - SFINAE
working-directory
:
docs/source/examples/sfinae
run
:
|
cmake -Bbuild -DPython_EXECUTABLE=`which python`
cd build
cmake --build .
cp ../example.py .
python example.py
Back
|
FazBrowse Home
|
New Git URL