Skip to content

Commit a044607

Browse files
authored
Merge pull request #8 from chinwobble/remove-windows
Remove windows from CI
2 parents a27164a + 9c02ccc commit a044607

File tree

5 files changed

+63
-50
lines changed

5 files changed

+63
-50
lines changed

.github/workflows/ci-cmake.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
os: [ubuntu-24.04, macos-13, macos-14, windows-2022]
28+
os: [ubuntu-24.04, macos-13, macos-14]
2929
env:
3030
# Indicates the location of the vcpkg as a Git submodule of the project repository.
3131
# Not using "VCPKG_ROOT" because a variable with the same name is defined in the VS's
@@ -105,7 +105,6 @@ jobs:
105105
- name: run benchmarks
106106
run: |
107107
./builds/ninja-multi-vcpkg/Release/fastplong_benchmarks
108-
if: runner.os != 'Windows'
109108
110109
- name: run tests
111110
run: |

CMakeLists.txt

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ find_package(benchmark CONFIG REQUIRED)
1010
find_package(libdeflate CONFIG REQUIRED)
1111

1212
if (MSVC)
13-
find_package(unofficial-isal CONFIG REQUIRED)
14-
set(
15-
FASTPLONG_LIBS
16-
hwy::hwy
17-
unofficial::isal::isal
18-
$<IF:$<TARGET_EXISTS:libdeflate::libdeflate_shared>,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>
19-
)
13+
find_package(unofficial-isal CONFIG REQUIRED)
14+
set(
15+
FASTPLONG_LIBS
16+
hwy::hwy
17+
unofficial::isal::isal
18+
$<IF:$<TARGET_EXISTS:libdeflate::libdeflate_shared>,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>
19+
)
2020
else()
21-
set(
22-
FASTPLONG_LIBS
23-
hwy::hwy
24-
$<IF:$<TARGET_EXISTS:libdeflate::libdeflate_shared>,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>
25-
-lisal
26-
)
21+
set(
22+
FASTPLONG_LIBS
23+
hwy::hwy
24+
$<IF:$<TARGET_EXISTS:libdeflate::libdeflate_shared>,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>
25+
-lisal
26+
-lpthread
27+
)
2728
endif()
2829

2930
if (CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "x86_64")
@@ -74,48 +75,60 @@ set(
7475
test/sequence_test.cpp
7576
)
7677
include_directories(
78+
# intel mac install location
7779
/usr/local/include
7880
# arm64 mac install location
7981
/opt/homebrew/include
8082
)
8183
link_directories(
84+
# intel mac install location
8285
/usr/local/lib
8386
# arm64 mac install location
8487
/opt/homebrew/lib
8588
)
8689

90+
add_library(fastplong_core ${FASTPLONG_SOURCES})
91+
target_link_libraries(
92+
fastplong_core PRIVATE
93+
${FASTPLONG_LIBS}
94+
)
8795

8896
if (NOT MSVC)
8997
# benchmark target
90-
add_executable(fastplong_benchmarks)
91-
target_sources(
92-
fastplong_benchmarks PRIVATE
98+
add_executable(fastplong_benchmarks
9399
benchmarks/sequence_benchmark.cpp
94100
test/globals.cpp
95-
${FASTPLONG_SOURCES}
96101
)
97102
target_link_libraries(
98103
fastplong_benchmarks PRIVATE
99104
${FASTPLONG_LIBS}
105+
fastplong_core
100106
benchmark::benchmark
101107
benchmark::benchmark_main
102108
)
103109
endif()
104110
# main target
105-
add_executable(fastplong src/main.cpp ${FASTPLONG_SOURCES})
111+
add_executable(fastplong src/main.cpp)
106112
target_link_libraries(
107113
fastplong PUBLIC
114+
fastplong_core
108115
${FASTPLONG_LIBS}
109116
)
110117
# tests target
111118
enable_testing()
112119
find_package(GTest CONFIG REQUIRED)
113-
add_executable(fastplong_tests ${FASTPLONG_SOURCES} ${FASTPLONG_TEST_SOURCES})
120+
add_executable(fastplong_tests ${FASTPLONG_TEST_SOURCES})
114121
target_link_libraries(
115122
fastplong_tests PRIVATE
116123
${FASTPLONG_LIBS}
124+
fastplong_core
117125
GTest::gtest
118126
GTest::gtest_main
119-
-lpthread
120127
)
121-
add_test(fastplong_tests fastplong_tests)
128+
add_test(fastplong_tests fastplong_tests)
129+
130+
install(TARGETS fastplong
131+
CONFIGURATIONS Release
132+
RUNTIME
133+
DESTINATION bin
134+
)

CMakePresets.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
"displayName": "Build (Release)",
3030
"description": "Build with Ninja/vcpkg (Release)",
3131
"configuration": "Release"
32-
},
33-
{
34-
"name": "ninja-vcpkg",
35-
"configurePreset": "ninja-multi-vcpkg",
36-
"displayName": "Build",
37-
"description": "Build with Ninja/vcpkg"
3832
}
3933
],
4034
"testPresets": [

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ else
1818
endef
1919
endif
2020

21-
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
22-
# Extra CMake flags which extend the default set
23-
CMAKE_EXTRA_FLAGS := -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
21+
build: builds/ninja-multi-vcpkg/build.ninja
22+
cmake --build --preset ninja-vcpkg-release
2423

25-
all: build
24+
clean:
25+
cmake --build --preset ninja-vcpkg-release --target clean
2626

27-
build: builds/.ran-cmake
28-
cmake --build --preset ninja-vcpkg-release
27+
install: build
28+
cmake --install builds/ninja-multi-vcpkg
29+
@echo "Installed."
2930

3031
test: build
3132
./builds/ninja-multi-vcpkg/Release/fastplong_tests
@@ -38,13 +39,12 @@ format:
3839
find src -name "*.h" | xargs clang-format -i
3940

4041
lint: builds/.ran-cmake
41-
python3 scripts/run-clang-tidy.py -p builds/ninja-multi-vcpkg
42+
run-clang-tidy -p builds/ninja-multi-vcpkg
4243

4344
vcpkg/.vcpkg-root:
4445
git submodule update --init --recursive
4546

46-
builds/.ran-cmake: vcpkg/.vcpkg-root
47-
$(CMAKE) -B builds/ninja-multi-vcpkg -G "Ninja Multi-Config" $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) -S .
48-
$(TOUCH) $@
47+
builds/ninja-multi-vcpkg/build.ninja: vcpkg/.vcpkg-root CMakeLists.txt CMakePresets.json
48+
$(CMAKE) --preset "ninja-multi-vcpkg"
4949

5050
.PHONY: lint build test format benchmark

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[![install with conda](
22
https://anaconda.org/bioconda/fastplong/badges/version.svg)](https://anaconda.org/bioconda/fastplong)
33
# fastplong
4-
Ultrafast preprocessing and quality control for long reads (Nanopore, PacBio, Cyclone, etc.).
5-
If you're searching for tools to preprocess short reads (Illumina, MGI, etc.), please use [fastp](https://github.com/OpenGene/fastp)
4+
Ultrafast preprocessing and quality control for long reads (Nanopore, PacBio, Cyclone, etc.).
5+
If you're searching for tools to preprocess short reads (Illumina, MGI, etc.), please use [fastp](https://github.com/OpenGene/fastp)
66

77
- [simple usage](#simple-usage)
88
- [examples of report](#examples-of-report)
99
- [get fastplong](#get-fastplong)
1010
- [install with Bioconda](#install-with-bioconda)
1111
- [download the latest prebuilt binary for Linux users](#download-the-latest-prebuilt-binary-for-linux-users)
1212
- [or compile from source](#or-compile-from-source)
13-
- [Step 1: install isa-l](#step-1-install-isa-l)
14-
- [step 2: install libdeflate](#step-2-install-libdeflate)
13+
- [Step 1: install build tools](#step-1-install-build-tools)
14+
- [Step 2: install isa-l](#step-2-install-isa-l)
1515
- [Step 3: download and build fastplong](#step-3-download-and-build-fastplong)
1616
- [input and output](#input-and-output)
1717
- [output to STDOUT](#output-to-stdout)
@@ -37,7 +37,7 @@ If you're searching for tools to preprocess short reads (Illumina, MGI, etc.), p
3737
```
3838
fastplong -i in.fq -o out.fq
3939
```
40-
Both input and output can be gzip compressed. By default, the HTML report is saved to `fastplong.html` (can be specified with `-h` option), and the JSON report is saved to `fastplong.json` (can be specified with `-j` option).
40+
Both input and output can be gzip compressed. By default, the HTML report is saved to `fastplong.html` (can be specified with `-h` option), and the JSON report is saved to `fastplong.json` (can be specified with `-j` option).
4141

4242
# examples of report
4343
`fastplong` creates reports in both HTML and JSON format.
@@ -64,15 +64,22 @@ mv fastplong.0.2.2 fastplong
6464
chmod a+x ./fastplong
6565
```
6666
## or compile from source
67-
`fastplong` depends on `libdeflate` and `isa-l` for fast decompression and compression of zipped data.
67+
`fastplong` depends on `ninja-build` and `cmake` for building, and `isa-l` for fast decompression and compression of zipped data.
6868

69-
### Step 1: install isa-l
69+
### Step 1: install build tools
70+
To build `fastplong` you will need some build tools.
71+
```bash
72+
sudo apt update && sudo apt install cmake make g++ gdb ninja-build curl zip unzip tar pkg-config
73+
```
74+
On Mac OSX
75+
```bash
76+
brew install ninja cmake make gdb zip unzip pkg-config
77+
```
78+
79+
### Step 2: install isa-l
7080
It's recommended that to install it using your package manager, for example `apt install libisal-dev` on ubuntu, or `brew install isa-l` on Mac. Otherwise you can compile it from source. Please be noted that `isa-l` is not compatible with gcc 4.8 or older versions. See https://github.com/intel/isa-l
7181
`autoconf`, `automake`, `libtools`, `nasm (>=2.11.01)` and `yasm (>=1.2.0)` are required to build isa-l.
7282

73-
### step 2: install libdeflate
74-
It's recommended that to install it using your package manager, for example `apt install libdeflate-dev` on ubuntu, or `brew install libdeflate` on Mac. Otherwise you can compile it from source. See https://github.com/ebiggers/libdeflate
75-
7683
### Step 3: download and build fastplong
7784
```shell
7885
# get source (you can also use browser to download from master or releases)
@@ -186,7 +193,7 @@ Specify `--split_by_lines` to limit the lines of each file. The last files may h
186193
usage: fastplong -i <in> -o <out> [options...]
187194
fastplong: ultra-fast FASTQ preprocessing and quality control for long reads
188195
version 0.0.1
189-
usage: ./fastplong [options] ...
196+
usage: ./fastplong [options] ...
190197
options:
191198
-i, --in read input file name (string [=])
192199
-o, --out read output file name (string [=])

0 commit comments

Comments
 (0)