Skip to content

Commit e7ca43b

Browse files
committed
Merge branch 'develop' into main
2 parents 4bcb822 + f96ac01 commit e7ca43b

21 files changed

Lines changed: 201 additions & 171 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.png filter=lfs diff=lfs merge=lfs -text
22
*.vox filter=lfs diff=lfs merge=lfs -text
33
*.7z filter=lfs diff=lfs merge=lfs -text
4+
*.zip filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [GitHubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_build --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: build
18+
19+
on:
20+
push:
21+
branches:
22+
- main
23+
- develop
24+
25+
jobs:
26+
ubuntu-latest:
27+
name: ubuntu-latest
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
with:
32+
fetch-depth: 0
33+
lfs: true
34+
- name: Cache .nuke/temp, ~/.nuget/packages
35+
uses: actions/cache@v3
36+
with:
37+
path: |
38+
.nuke/temp
39+
~/.nuget/packages
40+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
41+
- name: Run './build.cmd Test'
42+
run: ./build.cmd Test
43+
env:
44+
NuGetApiKey: ${{ secrets.NUGET_API_KEY }}
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
- name: Test Report
47+
uses: dorny/test-reporter@v1
48+
if: always()
49+
with:
50+
name: Test Report
51+
path: '**/test-results.trx'
52+
reporter: dotnet-trx

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,3 +580,5 @@ fabric.properties
580580

581581
# End of https://www.gitignore.io/api/rider,csharp,visualstudio
582582
.idea/
583+
584+
test-results.trx

.gitlab-ci.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.nuke/build.schema.json

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
"build": {
77
"type": "object",
88
"properties": {
9-
"CI_COMMIT_REF_NAME": {
10-
"type": "string",
11-
"description": "The branch or tag name on which the build is executed (GitLab)"
12-
},
139
"Configuration": {
1410
"type": "string",
1511
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
@@ -22,9 +18,6 @@
2218
"type": "boolean",
2319
"description": "Indicates to continue a previously failed build attempt"
2420
},
25-
"GitHubAccessToken": {
26-
"type": "string"
27-
},
2821
"Help": {
2922
"type": "boolean",
3023
"description": "Shows the help text for this build assembly"
@@ -36,6 +29,7 @@
3629
"AppVeyor",
3730
"AzurePipelines",
3831
"Bamboo",
32+
"Bitbucket",
3933
"Bitrise",
4034
"GitHubActions",
4135
"GitLab",
@@ -53,6 +47,11 @@
5347
"type": "boolean",
5448
"description": "Disables displaying the NUKE logo"
5549
},
50+
"NuGetApiKey": {
51+
"type": "string",
52+
"description": "NuGet API Key",
53+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
54+
},
5655
"Partition": {
5756
"type": "string",
5857
"description": "Partition to use on CI"
@@ -80,10 +79,6 @@
8079
"enum": [
8180
"Clean",
8281
"Compile",
83-
"ExtractVersionFromTag",
84-
"GitHubRelease",
85-
"Pack",
86-
"PublishNuGetPackage",
8782
"Test"
8883
]
8984
}
@@ -100,10 +95,6 @@
10095
"enum": [
10196
"Clean",
10297
"Compile",
103-
"ExtractVersionFromTag",
104-
"GitHubRelease",
105-
"Pack",
106-
"PublishNuGetPackage",
10798
"Test"
10899
]
109100
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![latest](https://img.shields.io/nuget/v/VoxReader)](https://www.nuget.org/packages/VoxReader/)
44
[![downloads](https://img.shields.io/nuget/dt/VoxReader?color=blue)](https://www.nuget.org/packages/VoxReader/)
5-
[![pipeline status](https://gitlab.com/sandrofigo/VoxReader/badges/develop/pipeline.svg)](https://gitlab.com/sandrofigo/VoxReader/-/commits/develop)
5+
[![build](https://github.com/sandrofigo/VoxReader/actions/workflows/build.yml/badge.svg)](https://github.com/sandrofigo/VoxReader/actions/workflows/build.yml)
66

77
A C# library to read .vox files created with [MagicaVoxel](https://ephtracy.github.io/index.html?page=mv_main)
88

VoxReader.UnitTests/UnitTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ namespace VoxReader.UnitTests
77
{
88
public class UnitTests
99
{
10-
private const string TestFile_3x3 = "data/3x3.7z";
11-
private const string TestFile_3x3_2 = "data/3x3_2.7z";
12-
private const string TestFile_3x3_3 = "data/3x3_3.7z";
13-
private const string TestFile_1x1 = "data/1x1.7z";
14-
private const string TestFile_256x256 = "data/256x256.7z";
10+
private const string TestFile_3x3 = "data/3x3.zip";
11+
private const string TestFile_3x3_2 = "data/3x3_2.zip";
12+
private const string TestFile_3x3_3 = "data/3x3_3.zip";
13+
private const string TestFile_1x1 = "data/1x1.zip";
14+
private const string TestFile_256x256 = "data/256x256.zip";
1515

1616
[Theory]
1717
[InlineData(TestFile_3x3, 1)]

VoxReader.UnitTests/VoxReader.UnitTests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
@@ -30,19 +30,19 @@
3030
</ItemGroup>
3131

3232
<ItemGroup>
33-
<None Update="data\1x1.7z">
33+
<None Update="data\1x1.zip">
3434
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3535
</None>
36-
<None Update="data\256x256.7z">
36+
<None Update="data\256x256.zip">
3737
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3838
</None>
39-
<None Update="data\3x3.7z">
39+
<None Update="data\3x3.zip">
4040
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4141
</None>
42-
<None Update="data\3x3_2.7z">
42+
<None Update="data\3x3_2.zip">
4343
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4444
</None>
45-
<None Update="data\3x3_3.7z">
45+
<None Update="data\3x3_3.zip">
4646
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4747
</None>
4848
</ItemGroup>

VoxReader.UnitTests/Zip.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
using System;
12
using System.Collections.Generic;
23
using System.IO;
34
using System.Linq;
45
using SharpCompress.Archives;
5-
using SharpCompress.Archives.SevenZip;
6+
using SharpCompress.Archives.Zip;
67
using SharpCompress.Common;
78

89
namespace VoxReader.UnitTests
@@ -11,11 +12,13 @@ public static class Zip
1112
{
1213
public static IEnumerable<string> UnzipFilesFromSevenZipArchive(string archivePath)
1314
{
14-
string tempPath = Path.Combine(Path.GetTempPath(), nameof(VoxReader));
15+
string tempPath = Path.Combine(Path.GetTempPath(), nameof(VoxReader), Guid.NewGuid().ToString());
16+
17+
Directory.CreateDirectory(tempPath);
18+
19+
using ZipArchive archive = ZipArchive.Open(archivePath);
1520

16-
using SevenZipArchive archive = SevenZipArchive.Open(archivePath);
17-
18-
foreach (SevenZipArchiveEntry entry in archive.Entries.Where(entry => !entry.IsDirectory))
21+
foreach (ZipArchiveEntry entry in archive.Entries.Where(entry => !entry.IsDirectory))
1922
{
2023
entry.WriteToDirectory(tempPath, new ExtractionOptions
2124
{

VoxReader.UnitTests/data/1x1.7z

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)