File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build MARS
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ strategy :
12+ matrix :
13+ include :
14+ - os : ubuntu-latest
15+ name : Debian-Bookworm
16+ container : debian:bookworm
17+ - os : ubuntu-latest
18+ name : Linux
19+ - os : macos-latest
20+ name : macOS Intel
21+ - os : macos-14
22+ name : macOS ARM
23+
24+ runs-on : ${{ matrix.os }}
25+ container : ${{ matrix.container }}
26+
27+ steps :
28+ - uses : actions/checkout@v4
29+
30+ - name : Install Dependencies (Linux - Container)
31+ if : matrix.container == 'debian:bookworm'
32+ run : |
33+ apt-get update
34+ apt-get install -y build-essential cmake unzip
35+ ./pre-install.sh
36+
37+ - name : Install Dependencies (Linux - Native)
38+ if : matrix.os == 'ubuntu-latest' && matrix.container == ''
39+ run : |
40+ sudo apt-get update
41+ sudo apt-get install -y build-essential cmake
42+ ./pre-install.sh
43+
44+ - name : Install Dependencies (macOS)
45+ if : startsWith(matrix.os, 'macos')
46+ run : |
47+ brew install cmake libomp
48+ ./pre-install.sh
49+
50+ - name : Build
51+ run : |
52+ make -f Makefile
53+
54+ - name : Test Binary
55+ run : |
56+ ./mars -h | grep "Usage: mars <options>"
57+
58+ - name : Upload Artifact
59+ uses : actions/upload-artifact@v4
60+ with :
61+ name : mars-${{ matrix.name }}
62+ path : mars
63+ retention-days : 7
Original file line number Diff line number Diff line change 1+ * .o
2+ libsdsl /
3+ sdsl-lite /
4+ seqan /
5+ mars
Original file line number Diff line number Diff line change @@ -17,3 +17,12 @@ After compilation the binary `mars' will be created in the working
1717directory, e.g. you may call it from this directory via
1818
1919 S ./mars -h
20+
21+ Compiling in M3 Mac
22+ ===================
23+
24+ It can be compiled with clang.
25+
26+ You will have to install libomp to allow the flag -fopenmp to work with.
27+
28+ brew install libomp
Original file line number Diff line number Diff line change @@ -2,9 +2,30 @@ MF= Makefile
22
33CC = g++
44
5- CFLAGS = -g -fopenmp -D_USE_OMP -msse4.2 -O3 -fomit-frame-pointer -funroll-loops
5+ CFLAGS = -g -D_USE_OMP -O3 -fomit-frame-pointer -funroll-loops -pthread
6+
7+ # Detect OS for platform-specific settings
8+ UNAME_S := $(shell uname -s)
9+ ifeq ($(UNAME_S ) ,Darwin)
10+ # macOS
11+ RPATH_FLAG := -Wl,-rpath,$(PWD ) /libsdsl/lib
12+ # Dynamically get Homebrew prefix (libomp path)
13+ BREW_PREFIX := $(shell brew --prefix libomp)
14+ # OpenMP flags for macOS
15+ OPENMP_FLAGS := -Xpreprocessor -fopenmp -I$(BREW_PREFIX ) /include
16+ OPENMP_LIBS := -L$(BREW_PREFIX ) /lib -lomp
17+ CFLAGS += $(OPENMP_FLAGS )
18+ LFLAGS += $(OPENMP_LIBS )
19+ else
20+ # Linux and others
21+ RPATH_FLAG := -Wl,-rpath=$(PWD ) /libsdsl/lib
22+ CFLAGS += -fopenmp
23+ LFLAGS += -fopenmp
24+ endif
25+
26+
627
7- LFLAGS = -std=c++11 -I ./ -I ./libsdsl/include/ -L ./libsdsl/lib/ -lsdsl -ldivsufsort -ldivsufsort64 -Wl,-rpath= $( PWD ) /libsdsl/lib
28+ LFLAGS = -std=c++11 -I ./ -I ./libsdsl/include/ -L ./libsdsl/lib/ -lsdsl -ldivsufsort -ldivsufsort64 $( RPATH_FLAG ) $( OPENMP_LIBS )
829
930EXE = mars
1031
@@ -22,7 +43,7 @@ HD= EBLOSUM62.h EDNAFULL.h mars.h sacsc.h ced.h nj.h RestrictedLevenshtein.h
2243OBJ = $(SRC:.cc=.o )
2344
2445.cc.o :
25- $(CC ) $(CFLAGS ) -c $(LFLAGS ) $<
46+ $(CC ) $(CFLAGS ) -c $(LFLAGS ) $<
2647
2748all : $(EXE )
2849
You can’t perform that action at this time.
0 commit comments