Skip to content

Commit

Permalink
Merge pull request #1 from DominicOram/main
Browse files Browse the repository at this point in the history
Adds Dockerfile and Github action to build in CI
  • Loading branch information
CV-GPhL authored May 7, 2024
2 parents 5791acf + d1828b0 commit 9810b92
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag imginfo
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:22.04

ADD . /imginfo/

WORKDIR "/imginfo"

RUN apt-get update && apt-get -y install hdf5-helpers wget unzip build-essential libhdf5-dev libhdf5-serial-dev libbz2-dev
RUN wget -O bitshuffle-master.zip https://github.com/kiyo-masui/bitshuffle/archive/refs/heads/master.zip && unzip bitshuffle-master.zip
RUN wget -O HDF5Plugin-master.zip https://github.com/dectris/HDF5Plugin/archive/refs/heads/master.zip && unzip HDF5Plugin-master.zip
RUN wget -O HDF5-External-Filter-Plugins-master.zip https://github.com/nexusformat/HDF5-External-Filter-Plugins/archive/refs/heads/master.zip && unzip HDF5-External-Filter-Plugins-master.zip

RUN make
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ HXXFLAGS += -DUSE_HDF5
LDFLAGS += -L$(HDF5_LIB) -lhdf5 -lz -lbz2

COMPILE.hxx = $(HXX) $(HXXFLAGS) -c -o $(1) $(2)
COMPILE.hcc = $(HCC) $(HCCFLAGS) -c -o $(1) $(2)
COMPILE.hcc = $(HCC) $(HCCFLAGS) -c -o $(1) $(2) -I $(BITSHUFFLE_MASTER)/lz4
LINK.hxx = $(HXX) $(HXXFLAGS) -o $(1) $(2) $(LDFLAGS)
LINK.hcc = $(HCC) $(HCCFLAGS) -o $(1) $(2) $(LDFLAGS)

Expand Down
2 changes: 1 addition & 1 deletion imginfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ char *hdf5_read_group_attribute(hid_t fid, const char* item, const char* attribu
hid_t attribute_space = H5Aget_space(attribute_id);
size_t attribute_n = H5Tget_size(attribute_type);
r = (char *)malloc(sizeof(char)*(attribute_n+1));
status H5Aread(attribute_id, attribute_type, r);
status = H5Aread(attribute_id, attribute_type, r);
// safety net (assume H5T_STR_NULLPAD)
// see also: https://github.com/h5py/h5py/issues/727
// https://forum.hdfgroup.org/t/bug-writing-a-string-does-not-include-null-terminator/5281
Expand Down

0 comments on commit 9810b92

Please sign in to comment.