File tree Expand file tree Collapse file tree 2 files changed +49
-4
lines changed
Expand file tree Collapse file tree 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
66SCRIPTS =./scripts
77SOURCE =./src
88DATA =./data
9+ CC =gcc
10+ CFLAGS =-O3
11+ CXX =g++
12+ CXXFLAGS=-std =c++11 -O3
13+ LDLIBS =-lz
914VERSION := $(shell grep version seqfu.nimble | grep -o "[0-9]\\+\.[0-9]\\+\.[0-9]\\+")
1015NIMPARAM := --gc:orc -d:NimblePkgVersion=$(VERSION ) -d:release --opt:speed
1116TARGETS =$(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)
1520
1621sources/ : src/sfu.nim s
1722 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
1924 bash test/convert.sh sources/compile_sfu.sh
2025
2126src/deps.txt :
@@ -26,13 +31,13 @@ src/sfu.nim: ./src/fast*.nim ./src/*utils*.nim src/deps.txt seqfu.nimble
2631 touch $@
2732
2833$(BIN ) /byteshift : test/byte/shifter.c
29- gcc -O3 -o $@ $<
34+ $( CC ) $( CFLAGS ) $( LDFLAGS ) -o $@ $<
3035
3136$(BIN ) /fu-secheck : test/byte/validate.c
32- gcc -O3 -o $@ $< -lz
37+ $( CC ) $( CFLAGS ) $( LDFLAGS ) -o $@ $< $( LDLIBS )
3338
3439$(BIN ) /SeqCountHelper : test/byte/count.cpp
35- g++ -std=c++11 -O3 -o $@ $< -lz
40+ $( CXX ) $( CXXFLAGS ) $( LDFLAGS ) -o $@ $< $( LDLIBS )
3641
3742$(BIN ) /fu-split : $(SCRIPTS ) /fu-split
3843 chmod +x $(SCRIPTS ) /fu-split
You can’t perform that action at this time.
0 commit comments