-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from debbiemarkslab/fix/12/compilation
Fix compilation on Linux and add a GitHub Action to test compilation
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
name: CI | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
# don't trigger on push | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
tests: | ||
name: "run_tests ${{ matrix.job.target }} (${{ matrix.job.os }})" | ||
runs-on: "${{ matrix.job.os }}" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- { target: x86_64-apple-darwin , os: macos-latest } | ||
- { target: x86_64-unknown-linux-gnu , os: ubuntu-latest, use-cross: true } | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install prerequisites | ||
run: | | ||
case ${{ matrix.job.target }} in | ||
*-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install libomp-dev ;; | ||
*-apple-darwin) brew update --preinstall ; env HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc libomp; brew link libomp --force ;; | ||
esac | ||
- name: Compile default | ||
run: | | ||
case ${{ matrix.job.target }} in | ||
*-unknown-linux-*) make all ;; | ||
*-apple-darwin) make all-mac ;; | ||
esac | ||
- name: Compile multicore | ||
run: | | ||
case ${{ matrix.job.target }} in | ||
*-unknown-linux-*) make all-openmp ;; | ||
*-apple-darwin) make all-mac-openmp ;; | ||
esac | ||
# - name: Run tests (skip as this takes too long) | ||
# run: | | ||
# pwd | ||
# cd tests | ||
# bash protein.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
#define PLM_H | ||
|
||
#include "lbfgs.h" | ||
#include <sys/time.h> | ||
|
||
#ifdef USE_FLOAT | ||
typedef float numeric_t; | ||
|