Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: draft action yaml #366

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/ghactions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

name: Draft Action

# Controls when the action will run.
# Triggers the workflow on push or pull request
# for the master and develop branch
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

jobs:
build:

strategy:
matrix:
config:
- { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8"}
- { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8"}

runs-on: ${{ matrix.config.os }}

steps:
- uses: actions/checkout@v1

- name: Update OS environnement
run: |
sudo apt-get update

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python }}

- name: get-cmake
uses: lukka/[email protected]

- name: Setup env vars
run: |
echo "SRC_DIR=$(pwd)" >> $GITHUB_ENV
echo "BUILD_DIR=$(pwd)/../build" >> $GITHUB_ENV
${{ matrix.config.requirements }}

- name: Configure
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
FC: ${{ matrix.config.fc }}

run: |
echo ${{ env.BUILD_DIR }}
echo "Compilers:"
$CC --version

mkdir ${{ env.BUILD_DIR }}
cd ${{ env.BUILD_DIR }}
cmake \
-D TPL_ENABLE_MPI=OFF \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_FC_COMPILER=gfortran \
-D TriBITS_ENABLE_Fortran=ON \
-D TriBITS_ENABLE_TESTS=ON \
${{ env.SRC_DIR }}

- name: Build
run: |
cd ${{ env.BUILD_DIR }}
make -j4

- name: Run CTest
run: |
cd ${{ env.BUILD_DIR }}
ctest -j4
33 changes: 0 additions & 33 deletions .github/workflows/hellow_world.yml

This file was deleted.