Skip to content

Add files via upload #16

Add files via upload

Add files via upload #16

Workflow file for this run

name: LICHEM-Build
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz",
os: ubuntu-latest,
build_type: "Release", cc: "gcc", cxx: "g++"
}
- {
name: "Ubuntu Latest Clang", artifact: "Linux.tar.xz",
os: ubuntu-latest,
build_type: "Release", cc: "clang", cxx: "clang++"
}
- {
name: "macOS Latest Clang", artifact: "macOS.tar.xz",
os: macos-latest,
build_type: "Release", cc: "clang", cxx: "clang++"
}
steps:
- uses: actions/checkout@v2
- name: Fix install script
shell: bash
## Clang has issues with the -static flag, so it needs to be removed.
## Makefile also needs to be modified, since base uses g++.
## Make sure that Linux has the omp libraries it needs.
run: |
if [ ${{ runner.os }} == Linux ]; then if [ ${{ matrix.config.cxx }} == clang++ ]; then sed -i 's/CXX= /CXX=clan/g' Makefile; fi; fi
if [ ${{ runner.os }} == Linux ]; then if [ ${{ matrix.config.cc }} == clang ]; then sed -i 's/CC=/CC=clan/g' Makefile; fi; fi
if [ ${{ runner.os }} == Linux ]; then if [ ${{ matrix.config.cc }} == clang ] || [ ${{ matrix.config.cxx }} == clang++ ]; then sed -i 's:-static::g' Makefile; fi; fi
if [ ${{ runner.os }} == macOS ]; then if [ {{ matrix.config.cxx }} == clang++ ]; then sed -i "" 's/CXX= /CXX=clan/g' Makefile; fi; fi
if [ ${{ runner.os }} == macOS ]; then if [ {{ matrix.config.cc }} == clang ]; then sed -i "" 's/CC=/CC=clan/g' Makefile; fi; fi
if [ ${{ runner.os }} == macOS ]; then sed -i "" 's/-static//g' Makefile; fi
if [ ${{ runner.os }} == macOS ]; then sed -i "" 's/-fopenmp//g' Makefile; fi
if [ ${{ runner.os }} == macOS ]; then sed -i "" 's/SEDI=-i/SEDI=-i \"\"/g' Makefile; fi
if [ ${{ runner.os }} == Linux ]; then if [ ${{ matrix.config.cc }} == clang ]; then sudo apt install libomp5 libomp-dev libiomp-dev; fi; fi
if [ ${{ runner.os }} == Linux ]; then apt-get moo; fi
- name: Install
shell: bash {0}
## Do this separately so errors cause the job to fail
run: |
make install
- name: Clean
shell: bash {0}
run: |
make clean