Skip to content

Commit ce878d0

Browse files
committed
WIP: testing basic github action
1 parent efab6bd commit ce878d0

File tree

6 files changed

+63
-8
lines changed

6 files changed

+63
-8
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "build"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
10+
jobs:
11+
build-container:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Log in to Docker Hub
16+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Build container
22+
run: docker build -t ghcr.io/diffCheckOrg/diffCheck-windows:latest ${{ github.workspace }}/tests/dockerfiles/windows
23+
- name: Push
24+
run: docker push ghcr.io/diffCheckOrg/diffCheck-windows:latest
25+
26+
configure-and-build:
27+
needs: build-container
28+
runs-on: ubuntu-latest
29+
container:
30+
image: ghcr.io/diffCheckOrg/diffCheck-windows:latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
lfs: true
35+
submodules: true
36+
- name: Configure
37+
run: |
38+
git config --global --add safe.directory ${PWD}
39+
cmake -B build .
40+
- uses: actions/upload-artifact@v3
41+
if: ${{ failure() }}
42+
with:
43+
name: configure-artifacts
44+
path: build/
45+
retention-days: 1
46+
- name: Build
47+
run: cmake --build build

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,20 @@ dfMeshPtr->LoadFromPLY(pathMesh);
193193
```
194194
195195
### Visualizer
196+
![left](./assets/img/visualizer_diffCheck.gif) ![right](./assets/img/gif_meshvisual.gif)
197+
196198
Clouds and mesh can be visualized like this:
197199
```c++
198200
#include "diffCheck/visualizer/DFVisualizer.hh"
199201
200202
// clouds
201203
std::shared_ptr<diffCheck::visualizer::DFVisualizer> dfVisualizerPtr = std::make_shared<diffCheck::visualizer::DFVisualizer>();
202-
dfVisualizerPtr->LoadPointCloud(dfPointCloudPtr);
204+
dfVisualizerPtr->AddPointCloud(dfPointCloudPtr);
203205
dfVisualizerPtr->Run();
204206
205207
// mesh
206208
std::shared_ptr<diffCheck::visualizer::DFVisualizer> dfVisualizerPtr = std::make_shared<diffCheck::visualizer::DFVisualizer>();
207-
dfVisualizerPtr->LoadMesh(dfMeshPtr);
209+
dfVisualizerPtr->AddMesh(dfMeshPtr);
208210
dfVisualizerPtr->Run();
209211
```
210212

src/diffCheck/visualizer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace diffCheck::visualizer
55
{
6-
void Visualizer::LoadPointCloud(std::shared_ptr<diffCheck::geometry::DFPointCloud> &pointCloud)
6+
void Visualizer::AddPointCloud(std::shared_ptr<diffCheck::geometry::DFPointCloud> &pointCloud)
77
{
88
Eigen::MatrixXd V(pointCloud->Points.size(), 3);
99
for (int i = 0; i < pointCloud->Points.size(); i++)
@@ -23,7 +23,7 @@ namespace diffCheck::visualizer
2323
this->m_Viewer.data().point_size = 10;
2424
}
2525

26-
void Visualizer::LoadMesh(std::shared_ptr<diffCheck::geometry::DFMesh> &mesh)
26+
void Visualizer::AddMesh(std::shared_ptr<diffCheck::geometry::DFMesh> &mesh)
2727
{
2828
Eigen::MatrixXd V(mesh->Vertices.size(), 3);
2929
for (int i = 0; i < mesh->Vertices.size(); i++)

src/diffCheck/visualizer.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ namespace diffCheck::visualizer
2222
*
2323
* @param pointCloud the point cloud to visualize
2424
*/
25-
void LoadPointCloud(std::shared_ptr<diffCheck::geometry::DFPointCloud> &pointCloud);
25+
void AddPointCloud(std::shared_ptr<diffCheck::geometry::DFPointCloud> &pointCloud);
2626

2727
// TODO: need to implement color and normals for meshes
2828
/**
2929
* @brief Load a mesh to visualize
3030
*
3131
* @param std::shared_ptr<diffCheck::geometry::DFMesh> the mesh to visualize
3232
*/
33-
void LoadMesh(std::shared_ptr<diffCheck::geometry::DFMesh> &mesh);
33+
void AddMesh(std::shared_ptr<diffCheck::geometry::DFMesh> &mesh);
3434

3535
/// @brief Main function to start the visualizer
3636
void Run();

src/diffCheckApp.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ int main()
2323
std::cout << "Number of colors in the mesh: " << dfMeshPtr->ColorsVertex.size() << std::endl;
2424

2525
std::shared_ptr<diffCheck::visualizer::Visualizer> visualizerPtr = std::make_shared<diffCheck::visualizer::Visualizer>();
26-
// visualizerPtr->LoadPointCloud(dfPointCloudPtr);
27-
visualizerPtr->LoadMesh(dfMeshPtr);
26+
// visualizerPtr->AddPointCloud(dfPointCloudPtr);
27+
visualizerPtr->AddMesh(dfMeshPtr);
2828
visualizerPtr->Run();
2929

3030
return 0;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM mcr.microsoft.com/windows/servercore:ltsc2019
2+
3+
# Install g++ and make
4+
RUN powershell.exe -Command \
5+
choco install mingw -y ; \
6+
choco install make -y

0 commit comments

Comments
 (0)