Skip to content

Commit a689d4f

Browse files
committed
Added linux workflow
1 parent 5887b55 commit a689d4f

File tree

4 files changed

+98
-7
lines changed

4 files changed

+98
-7
lines changed

.github/workflows/linux.yml

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Linux
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: ubuntu-20.04
16+
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.blas }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
sys:
21+
- {compiler: gcc, version: '8', blas: OpenBLAS}
22+
- {compiler: gcc, version: '8', blas: mkl}
23+
- {compiler: gcc, version: '9', blas: OpenBLAS}
24+
- {compiler: gcc, version: '9', blas: mkl}
25+
- {compiler: gcc, version: '10', blas: OpenBLAS}
26+
- {compiler: gcc, version: '10', blas: mkl}
27+
- {compiler: gcc, version: '11', blas: OpenBLAS}
28+
- {compiler: gcc, version: '11', blas: mkl}
29+
- {compiler: clang, version: '15', blas: OpenBLAS}
30+
- {compiler: clang, version: '15', blas: mkl}
31+
- {compiler: clang, version: '16', blas: OpenBLAS}
32+
- {compiler: clang, version: '16', blas: mkl}
33+
34+
steps:
35+
36+
- name: Setup GCC
37+
if: ${{ matrix.sys.compiler == 'gcc' }}
38+
run: |
39+
GCC_VERSION=${{ matrix.sys.version }}
40+
sudo apt-get update
41+
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
42+
CC=gcc-$GCC_VERSION
43+
echo "CC=$CC" >> $GITHUB_ENV
44+
CXX=g++-$GCC_VERSION
45+
echo "CXX=$CXX" >> $GITHUB_ENV
46+
47+
- name: Setup clang
48+
if: ${{ matrix.sys.compiler == 'clang' }}
49+
run: |
50+
LLVM_VERSION=${{ matrix.sys.version }}
51+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
52+
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" || exit 1
53+
fi || exit 1
54+
sudo apt-get update || exit 1
55+
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
56+
sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
57+
sudo ln -s /usr/include/asm-generic /usr/include/asm
58+
CC=clang-$LLVM_VERSION
59+
echo "CC=$CC" >> $GITHUB_ENV
60+
CXX=clang++-$LLVM_VERSION
61+
echo "CXX=$CXX" >> $GITHUB_ENV
62+
63+
- name: Checkout code
64+
uses: actions/checkout@v3
65+
66+
- name: Set conda environment
67+
uses: mamba-org/setup-micromamba@main
68+
with:
69+
environment-name: myenv
70+
environment-file: environment-dev.yml
71+
init-shell: bash
72+
cache-downloads: true
73+
74+
- name: Install mkl
75+
if: ${{ matrix.sys.blas == 'mkl' }}
76+
run: micromamba install mkl
77+
78+
- name: Install OpenBLAS
79+
if: ${{ matrix.sys.blas == 'OpenBLAS' }}
80+
run: micromamba install openblas==0.3 blas-devel
81+
82+
- name: Configure using CMake
83+
run: cmake -Bbuild -DDOWNLOAD_GTEST=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib
84+
85+
- name: Build
86+
working-directory: build
87+
run: cmake --build . --target test_xtensor_blas --parallel 8
88+
89+
- name: Run tests
90+
working-directory: build/test
91+
run: ./test_xtensor_blas

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION 3.1)
10+
cmake_minimum_required(VERSION 3.8)
1111
project(xtensor-blas)
1212

1313
set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

azure-pipelines.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ trigger:
22
- master
33

44
jobs:
5-
- template: ./.azure-pipelines/azure-pipelines-win.yml
6-
- template: ./.azure-pipelines/azure-pipelines-linux-clang.yml
7-
- template: ./.azure-pipelines/azure-pipelines-linux-gcc.yml
8-
- template: ./.azure-pipelines/azure-pipelines-osx.yml
5+
#- template: ./.azure-pipelines/azure-pipelines-win.yml
6+
#- template: ./.azure-pipelines/azure-pipelines-linux-clang.yml
7+
#- template: ./.azure-pipelines/azure-pipelines-linux-gcc.yml
8+
#- template: ./.azure-pipelines/azure-pipelines-osx.yml

readthedocs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

33
build:
4-
os: "ubuntu-22.04"
4+
os: ubuntu-22.04
55
tools:
6-
python: "mambaforge-22.9"
6+
python: mambaforge-22.9
77

88
conda:
99
environment: docs/environment.yml

0 commit comments

Comments
 (0)