File tree 2 files changed +49
-4
lines changed
2 files changed +49
-4
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : Seqfu-Make-Build
3
+
4
+ # Controls when the action will run.
5
+ on :
6
+ # Triggers the workflow on push or pull request events but only for the "main" branch
7
+ push :
8
+ branches : [ "main" ]
9
+ pull_request :
10
+ branches : [ "main" ]
11
+
12
+ # Allows you to run this workflow manually from the Actions tab
13
+ workflow_dispatch :
14
+
15
+ jobs :
16
+ build :
17
+ runs-on : ubuntu-latest
18
+ strategy :
19
+ fail-fast : false
20
+ matrix :
21
+ gcc-version : [10, 12]
22
+ name : Build with make
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ - name : Setup nim
26
+ uses : jiro4989/setup-nim-action@v1
27
+ with :
28
+ nim-version : 2.0.x
29
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
30
+
31
+ - name : Install dependencies
32
+ run : sudo apt install -y zlib1g-dev gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version }}
33
+
34
+ # Build and demo overwriting some variables
35
+ - name : Build
36
+ run : make CC=gcc-${{ matrix.gcc-version }} CXX=g++-${{ matrix.gcc-version }} CFLAGS="-O2 -Wall" CXXFLAGS="-std=c++11 -O2 -Wall"
37
+
38
+ - name : Test
39
+ run : make test
40
+
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ BIN=./bin
6
6
SCRIPTS =./scripts
7
7
SOURCE =./src
8
8
DATA =./data
9
+ CC =gcc
10
+ CFLAGS =-O3
11
+ CXX =g++
12
+ CXXFLAGS=-std =c++11 -O3
13
+ LDLIBS =-lz
9
14
VERSION := $(shell grep version seqfu.nimble | grep -o "[0-9]\\+\.[0-9]\\+\.[0-9]\\+")
10
15
NIMPARAM := --gc:orc -d:NimblePkgVersion=$(VERSION ) -d:release --opt:speed
11
16
TARGETS =$(BIN ) /seqfu $(BIN ) /fu-msa $(BIN ) /fu-primers $(BIN ) /dadaist2-mergeseqs $(BIN ) /fu-shred $(BIN ) /fu-homocomp $(BIN ) /fu-multirelabel $(BIN ) /fu-index $(BIN ) /fu-cov $(BIN ) /fu-16Sregion $(BIN ) /fu-nanotags $(BIN ) /fu-orf $(BIN ) /fu-sw $(BIN ) /fu-virfilter $(BIN ) /fu-tabcheck $(BIN ) /byteshift $(BIN ) /SeqCountHelper $(BIN ) /fu-secheck
@@ -15,7 +20,7 @@ all: $(TARGETS) $(PYTARGETS)
15
20
16
21
sources/ : src/sfu.nim s
17
22
mkdir -p sources
18
- nim c --cc:gcc $(NIMPARAM ) --nimcache:sources/ --genScript ./src/sfu.nim
23
+ nim c --cc:$( CC ) $(NIMPARAM ) --nimcache:sources/ --genScript ./src/sfu.nim
19
24
bash test/convert.sh sources/compile_sfu.sh
20
25
21
26
src/deps.txt :
@@ -26,13 +31,13 @@ src/sfu.nim: ./src/fast*.nim ./src/*utils*.nim src/deps.txt seqfu.nimble
26
31
touch $@
27
32
28
33
$(BIN ) /byteshift : test/byte/shifter.c
29
- gcc -O3 -o $@ $<
34
+ $( CC ) $( CFLAGS ) $( LDFLAGS ) -o $@ $<
30
35
31
36
$(BIN ) /fu-secheck : test/byte/validate.c
32
- gcc -O3 -o $@ $< -lz
37
+ $( CC ) $( CFLAGS ) $( LDFLAGS ) -o $@ $< $( LDLIBS )
33
38
34
39
$(BIN ) /SeqCountHelper : test/byte/count.cpp
35
- g++ -std=c++11 -O3 -o $@ $< -lz
40
+ $( CXX ) $( CXXFLAGS ) $( LDFLAGS ) -o $@ $< $( LDLIBS )
36
41
37
42
$(BIN ) /fu-split : $(SCRIPTS ) /fu-split
38
43
chmod +x $(SCRIPTS ) /fu-split
You can’t perform that action at this time.
0 commit comments