Skip to content

Commit 28e441b

Browse files
committed
Added linux workflow
1 parent 5887b55 commit 28e441b

File tree

3 files changed

+76
-5
lines changed

3 files changed

+76
-5
lines changed

.github/workflows/linux.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
30+
steps:
31+
32+
- name: Setup GCC
33+
if: ${{ matrix.sys.compiler == 'gcc' }}
34+
run: |
35+
GCC_VERSION=${{ matrix.sys.version }}
36+
sudo apt-get update
37+
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
38+
CC=gcc-$GCC_VERSION
39+
echo "CC=$CC" >> $GITHUB_ENV
40+
CXX=g++-$GCC_VERSION
41+
echo "CXX=$CXX" >> $GITHUB_ENV
42+
43+
- name: Checkout code
44+
uses: actions/checkout@v3
45+
46+
- name: Set conda environment
47+
uses: mamba-org/setup-micromamba@main
48+
with:
49+
environment-name: myenv
50+
environment-file: environment-dev.yml
51+
init-shell: bash
52+
cache-downloads: true
53+
54+
- name: Install mkl
55+
if: ${{ matrix.sys.blas == 'mkl' }}
56+
run: micromamba install mkl
57+
58+
- name: Install OpenBLAS
59+
if: ${{ matrix.sys.blas == 'OpenBLAS' }}
60+
run: micromamba install openblas==0.3 blas-devel
61+
62+
- name: Configure using CMake
63+
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
64+
65+
- name: Build
66+
working-directory: build
67+
run: cmake --build . --target test_xtensor_blas --parallel 8
68+
69+
- name: Run tests
70+
working-directory: build/test
71+
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

0 commit comments

Comments
 (0)