Skip to content

Commit c19aa54

Browse files
authored
Merge pull request #586 from weslleyspereira/try-github-actions
Enable github actions mimicking Travis CI configuration
2 parents b937d8c + 2e4b3b4 commit c19aa54

File tree

3 files changed

+209
-0
lines changed

3 files changed

+209
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: CMake
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- try-github-actions
8+
paths:
9+
- .github/workflows/cmake.yml
10+
- '**CMakeLists.txt'
11+
- 'BLAS'
12+
- 'CBLAS'
13+
- 'CMAKE'
14+
- 'INSTALL'
15+
- 'LAPACKE'
16+
- 'SRC'
17+
- 'TESTING'
18+
- '!**README'
19+
- '!**Makefile'
20+
- '!**md'
21+
pull_request:
22+
paths:
23+
- .github/workflows/cmake.yml
24+
- '**CMakeLists.txt'
25+
- 'BLAS'
26+
- 'CBLAS'
27+
- 'CMAKE'
28+
- 'INSTALL'
29+
- 'LAPACKE'
30+
- 'SRC'
31+
- 'TESTING'
32+
- '!**README'
33+
- '!**Makefile'
34+
- '!**md'
35+
36+
env:
37+
CFLAGS: "-Wall -pedantic"
38+
FFLAGS: "-fimplicit-none -frecursive -fcheck=all"
39+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
40+
41+
defaults:
42+
run:
43+
shell: bash
44+
45+
jobs:
46+
47+
test-install-release:
48+
# Use GNU compilers
49+
50+
# The CMake configure and build commands are platform agnostic and should work equally
51+
# well on Windows or Mac. You can convert this to a matrix build if you need
52+
# cross-platform coverage.
53+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
54+
runs-on: ${{ matrix.os }}
55+
56+
env:
57+
BUILD_TYPE: Release
58+
59+
strategy:
60+
fail-fast: true
61+
matrix:
62+
os: [ macos-latest, ubuntu-latest ]
63+
64+
steps:
65+
66+
- name: Checkout LAPACK
67+
uses: actions/checkout@v2
68+
69+
- name: Use GCC-11 on MacOS
70+
if: ${{ matrix.os == 'macos-latest' }}
71+
run: >
72+
cmake -B build
73+
-D CMAKE_C_COMPILER="gcc-11"
74+
-D CMAKE_Fortran_COMPILER="gfortran-11"
75+
76+
# - name: Use Unix Makefiles on Windows
77+
# if: ${{ matrix.os == 'windows-latest' }}
78+
# run: >
79+
# cmake -B build
80+
# -G "Unix Makefiles"
81+
# -D CMAKE_C_FLAGS="${{env.CFLAGS}} -Wl,--stack=1000000000"
82+
83+
- name: Configure CMake
84+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
85+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
86+
run: >
87+
cmake -B build
88+
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
89+
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
90+
-D CBLAS:BOOL=ON
91+
-D LAPACKE:BOOL=ON
92+
-D BUILD_TESTING:BOOL=ON
93+
-D LAPACKE_WITH_TMG:BOOL=ON
94+
-D BUILD_SHARED_LIBS:BOOL=ON
95+
96+
- name: CTest
97+
working-directory: ${{github.workspace}}/build
98+
# Execute tests defined by the CMake configuration.
99+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
100+
run: |
101+
ctest -D ExperimentalStart
102+
ctest -D ExperimentalConfigure
103+
ctest -D ExperimentalBuild -j2
104+
ctest -D ExperimentalTest --schedule-random -j2 --output-on-failure --timeout 100
105+
ctest -D ExperimentalSubmit
106+
107+
- name: Install
108+
run: cmake --build build --target install -j2
109+
110+
coverage:
111+
runs-on: ubuntu-latest
112+
env:
113+
BUILD_TYPE: Coverage
114+
steps:
115+
116+
- name: Checkout LAPACK
117+
uses: actions/checkout@v2
118+
119+
- name: Configure CMake
120+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
121+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
122+
run: >
123+
cmake -B build
124+
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
125+
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
126+
-D CBLAS:BOOL=ON
127+
-D LAPACKE:BOOL=ON
128+
-D BUILD_TESTING:BOOL=ON
129+
-D LAPACKE_WITH_TMG:BOOL=ON
130+
-D BUILD_SHARED_LIBS:BOOL=ON
131+
132+
- name: Install
133+
run: cmake --build build --target install -j2
134+
135+
- name: Coverage
136+
run: |
137+
echo "Coverage"
138+
cmake --build build --target coverage
139+
bash <(curl -s https://codecov.io/bash) -X gcov

.github/workflows/makefile.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Makefile
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- try-github-actions
8+
paths:
9+
- .github/workflows/cmake.yml
10+
- '**Makefile'
11+
- 'BLAS'
12+
- 'CBLAS'
13+
- 'INSTALL'
14+
- 'LAPACKE'
15+
- 'SRC'
16+
- 'TESTING'
17+
- '!**README'
18+
- '!**CMakeLists.txt'
19+
- '!**md'
20+
pull_request:
21+
paths:
22+
- .github/workflows/cmake.yml
23+
- '**Makefile'
24+
- 'BLAS'
25+
- 'CBLAS'
26+
- 'INSTALL'
27+
- 'LAPACKE'
28+
- 'SRC'
29+
- 'TESTING'
30+
- '!**README'
31+
- '!**CMakeLists.txt'
32+
- '!**md'
33+
34+
env:
35+
CFLAGS: "-Wall -pedantic"
36+
FFLAGS: "-fimplicit-none -frecursive -fcheck=all"
37+
38+
defaults:
39+
run:
40+
shell: bash
41+
42+
jobs:
43+
44+
install-ubuntu:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout LAPACK
48+
uses: actions/checkout@v2
49+
- name: Install
50+
run: |
51+
cp make.inc.example make.inc
52+
make -s -j2 all
53+
make -j2 lapack_install
54+
55+
install-macos:
56+
runs-on: macos-latest
57+
steps:
58+
- name: Checkout LAPACK
59+
uses: actions/checkout@v2
60+
- name: Alias for GCC compilers
61+
run: |
62+
sudo ln -s $(which gcc-11) /usr/local/bin/gcc
63+
sudo ln -s $(which gfortran-11) /usr/local/bin/gfortran
64+
- name: Install
65+
run: |
66+
cp make.inc.example make.inc
67+
make -s -j2 all
68+
make -j2 lapack_install

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# LAPACK
22

33
[![Build Status](https://travis-ci.org/Reference-LAPACK/lapack.svg?branch=master)](https://travis-ci.org/Reference-LAPACK/lapack)
4+
![CMake](https://github.com/Reference-LAPACK/lapack/actions/workflows/cmake.yml/badge.svg)
5+
![Makefile](https://github.com/Reference-LAPACK/lapack/actions/workflows/makefile.yml/badge.svg)
46
[![Appveyor](https://ci.appveyor.com/api/projects/status/bh38iin398msrbtr?svg=true)](https://ci.appveyor.com/project/langou/lapack/)
57
[![codecov](https://codecov.io/gh/Reference-LAPACK/lapack/branch/master/graph/badge.svg)](https://codecov.io/gh/Reference-LAPACK/lapack)
68
[![Packaging status](https://repology.org/badge/tiny-repos/lapack.svg)](https://repology.org/metapackage/lapack/versions)

0 commit comments

Comments
 (0)