Skip to content

Commit

Permalink
Merge pull request #219 from gmaillet/master
Browse files Browse the repository at this point in the history
add github action (work in progress)
  • Loading branch information
erupnik authored Mar 15, 2023
2 parents 5ce32e5 + 755260a commit 7db0ec5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 11 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CMake

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
multi_os:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/[email protected]

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

# - name: Test
# working-directory: ${{github.workspace}}/build
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}

2 changes: 1 addition & 1 deletion MMVII/include/TreeDist.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "SymbDer/SymbDer_Common.h"

#define TREEDIST_cMemCheck MMVII::cMemCheck
#define TREEDIST_FakeUseIt MMVII::FakeUseIt
template <class Type> void TREEDIST_FakeUseIt MMVII::FakeUseIt
#else //========================================================== WITH_MMVI
class TREEDIST_cMemCheck
{
Expand Down
2 changes: 1 addition & 1 deletion src/uti_phgrm/GraphCut/QPBO-v1.4/QPBO_extra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ template <typename REAL>
Node* j = a->head;
Node* _j[2];
Arc* _a[2] = { a, GetMate(a) };
int x; // 0 if current edge is submodular, 1 otherwise
int x; GccUse(x);// 0 if current edge is submodular, 1 otherwise

_j[0] = j;
if (IsNode0(j)) { _j[1] = GetMate0(j); x = 0; }
Expand Down
18 changes: 9 additions & 9 deletions src/uti_phgrm/TiePHistorical/cnpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void cnpy::parse_npy_header(unsigned char* buffer,size_t& word_size, std::vector
//byte order code | stands for not applicable.
//not sure when this applies except for byte array
loc1 = header.find("descr")+9;
bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false);
bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false); GccUse(littleEndian);
assert(littleEndian);

//char type = header[loc1+1];
Expand Down Expand Up @@ -141,7 +141,7 @@ void cnpy::parse_npy_header(FILE* fp, size_t& word_size, std::vector<size_t>& sh
if (loc1 == std::string::npos)
throw std::runtime_error("parse_npy_header: failed to find header keyword: 'descr'");
loc1 += 9;
bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false);
bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false); GccUse(littleEndian);
assert(littleEndian);

//char type = header[loc1+1];
Expand All @@ -161,13 +161,13 @@ void cnpy::parse_zip_footer(FILE* fp, uint16_t& nrecs, size_t& global_header_siz
throw std::runtime_error("parse_zip_footer: failed fread");

uint16_t disk_no, disk_start, nrecs_on_disk, comment_len;
disk_no = *(uint16_t*) &footer[4];
disk_start = *(uint16_t*) &footer[6];
nrecs_on_disk = *(uint16_t*) &footer[8];
nrecs = *(uint16_t*) &footer[10];
global_header_size = *(uint32_t*) &footer[12];
global_header_offset = *(uint32_t*) &footer[16];
comment_len = *(uint16_t*) &footer[20];
disk_no = *(uint16_t*) &footer[4]; GccUse(disk_no);
disk_start = *(uint16_t*) &footer[6]; GccUse(disk_start);
nrecs_on_disk = *(uint16_t*) &footer[8]; GccUse(nrecs_on_disk);
nrecs = *(uint16_t*) &footer[10]; GccUse(nrecs);
global_header_size = *(uint32_t*) &footer[12]; GccUse(global_header_size);
global_header_offset = *(uint32_t*) &footer[16]; GccUse(global_header_offset);
comment_len = *(uint16_t*) &footer[20]; GccUse(comment_len);

assert(disk_no == 0);
assert(disk_start == 0);
Expand Down

0 comments on commit 7db0ec5

Please sign in to comment.