Skip to content

Commit 01fa038

Browse files
committed
Added CI workflow
1 parent aa10e7b commit 01fa038

2 files changed

Lines changed: 72 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: "Build DW1ModelConverter"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build-windows:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Setup MSVC
16+
uses: ilammy/msvc-dev-cmd@v1
17+
with:
18+
arch: x64
19+
vsversion: 2022
20+
21+
- name: Cache
22+
uses: actions/cache@v3
23+
with:
24+
path: ${{ github.workspace }}/_deps
25+
key: CPM Dependencies Win x64
26+
27+
- name: Build
28+
run: |
29+
cmake . -DCMAKE_BUILD_TYPE=Release
30+
cmake --build . --config Release
31+
32+
- name: Copy Binary
33+
run: copy ${{ github.workspace }}/Release/DW1ModelConverter.exe ${{ github.workspace }}/DW1ModelConverter.exe
34+
35+
- name: Upload a Build Artifact
36+
uses: actions/upload-artifact@v3
37+
with:
38+
name: win-x64
39+
path: |
40+
${{ github.workspace }}/DW1ModelConverter.exe
41+
${{ github.workspace }}/README.md
42+
${{ github.workspace }}/LICENSE
43+
${{ github.workspace }}/THIRD-PARTY-NOTICE
44+
45+
build-linux:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v3
50+
51+
- name: Cache
52+
uses: actions/cache@v3
53+
with:
54+
path: ${{ github.workspace }}/_deps
55+
key: CPM Dependencies Linux x64
56+
57+
- name: Build
58+
run: |
59+
cmake . -DCMAKE_BUILD_TYPE=Release
60+
cmake --build . --config Release
61+
62+
- name: Upload a Build Artifact
63+
uses: actions/upload-artifact@v3
64+
with:
65+
name: linux-x64
66+
path: |
67+
${{ github.workspace }}/DW1ModelConverter
68+
${{ github.workspace }}/README.md
69+
${{ github.workspace }}/LICENSE
70+
${{ github.workspace }}/THIRD-PARTY-NOTICE

src/GLTF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <iostream>
99
#include <numbers>
1010

11-
constexpr bool hasValidNormals(Mesh& mesh, Face& face)
11+
bool hasValidNormals(Mesh& mesh, Face& face)
1212
{
13-
const std::size_t size = mesh.normals.size();
13+
std::size_t size = mesh.normals.size();
1414

1515
if (face.n1 >= size) return false;
1616
if (face.n2 >= size) return false;

0 commit comments

Comments
 (0)