Skip to content

Commit 0df2c87

Browse files
Add Basic CI to the project (#3)
1 parent c8739a5 commit 0df2c87

File tree

4 files changed

+57
-6
lines changed

4 files changed

+57
-6
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
build-and-test:
11+
name: Build and Test
12+
runs-on: ubuntu-24.04
13+
14+
steps:
15+
- uses: actions/checkout@v5
16+
17+
- name: Install ROOT
18+
run: |
19+
ROOT_URL="https://root.cern/download/root_v6.34.06.Linux-ubuntu24.04-x86_64-gcc13.3.tar.gz"
20+
wget -O root.tar.gz $ROOT_URL
21+
tar -xzf root.tar.gz -C /opt/
22+
echo "/opt/root/bin" >> $GITHUB_PATH
23+
24+
- name: Install build dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y libvdt-dev libtbb-dev
28+
29+
- name: Configure CMake
30+
run: |
31+
source thisroot.sh
32+
mkdir build
33+
cd build
34+
cmake .. \
35+
-DCMAKE_BUILD_TYPE=Release \
36+
-DRAMTOOLS_BUILD_TESTS=ON \
37+
-DRAMTOOLS_BUILD_TOOLS=ON \
38+
-DRAMTOOLS_BUILD_BENCHMARKS=OFF
39+
40+
- name: Build
41+
run: |
42+
source thisroot.sh
43+
cd build
44+
cmake --build . --config Release -j $(nproc)
45+
46+
- name: Run tests
47+
run: |
48+
source thisroot.sh
49+
cd build
50+
ctest --output-on-failure --build-config Release
51+

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ tmp/
1616
*.fq
1717
*.bk
1818
*.rootix
19-
*.sam
2019
build/
2120
cmake-build-*/
2221
Build/
@@ -25,4 +24,5 @@ Testing/
2524
.vscode/
2625
docs/html/
2726
docs/latex/
28-
html/
27+
html/
28+

src/ramcore/SamToNTuple.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void samtoramntuple(const char *datafile,
2929

3030
auto model = RAMNTupleRecord::MakeModel();
3131

32-
ROOT::RNTupleWriteOptions writeOptions;
32+
ROOT::Experimental::RNTupleWriteOptions writeOptions;
3333
writeOptions.SetCompression(compression_algorithm);
3434
writeOptions.SetMaxUnzippedPageSize(64000);
3535

src/rntuple/RAMNTupleRecord.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void RAMNTupleRecord::WriteAllRefs(TFile &file)
199199
auto rnameField = metaModel->MakeField<std::vector<std::string>>("rname_refs");
200200
auto rnextField = metaModel->MakeField<std::vector<std::string>>("rnext_refs");
201201

202-
ROOT::RNTupleWriteOptions writeOptions;
202+
RNTupleWriteOptions writeOptions;
203203
writeOptions.SetCompression(505);
204204

205205
auto metaWriter = RNTupleWriter::Append(std::move(metaModel), "METADATA", file, writeOptions);
@@ -256,7 +256,7 @@ void RAMNTupleRecord::WriteIndex(TFile &file)
256256
auto indexModel = RNTupleModel::Create();
257257
auto indexField = indexModel->MakeField<std::vector<RAMNTupleIndex::IndexEntry>>("index_entries");
258258

259-
ROOT::RNTupleWriteOptions writeOptions;
259+
RNTupleWriteOptions writeOptions;
260260
writeOptions.SetCompression(505);
261261

262262
auto indexWriter = RNTupleWriter::Append(std::move(indexModel), "INDEX", file, writeOptions);
@@ -530,7 +530,7 @@ void RAMNTupleConverter::ConvertSAMToRAMNTuple(const std::string &sam_file, cons
530530

531531
auto model = RAMNTupleRecord::MakeModel();
532532

533-
ROOT::RNTupleWriteOptions writeOptions;
533+
RNTupleWriteOptions writeOptions;
534534
writeOptions.SetCompression(505); // ZSTD level 5
535535

536536
auto writer = RNTupleWriter::Append(std::move(model), "RAM", *file, writeOptions);

0 commit comments

Comments
 (0)