[cmake] Simplify creation of tests #119
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test library | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Build and test | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
compiler: | |
- gcc | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: sudo apt-get install csh clang | |
- name: Build | |
run: | | |
cp MAKE_INC/make.linux make.inc | |
# We use ~ instead of / as a separator in sed, since $(pwd) | |
# also includes / | |
sed -i "s~^SuperLUroot\s*=.*~SuperLUroot = $(pwd)~g" make.inc | |
sed -i "s/^CC\s*=.*/CC = ${CC_CI}/g" make.inc | |
mkdir lib | |
make install lib | |
env: | |
CC_CI: ${{ matrix.compiler }} | |
- name: Test | |
run: | | |
make testing |