Skip to content

Commit 121e535

Browse files
committed
add gh actions
1 parent d0e404d commit 121e535

File tree

5 files changed

+244
-10
lines changed

5 files changed

+244
-10
lines changed

.github/workflows/cmake.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: build
2+
3+
on: [push]
4+
5+
env:
6+
BUILD_TYPE: Release
7+
8+
jobs:
9+
build-linux:
10+
runs-on: ubuntu-20.04
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- name: GCC 10 & Artifacts
16+
CC: gcc-10
17+
CXX: g++-10
18+
artifacts: true
19+
- name: Clang 10 & ODR
20+
CC: clang-10
21+
CXX: clang++-10
22+
use-odr: true
23+
24+
env:
25+
CC: ${{matrix.CC}}
26+
CXX: ${{matrix.CXX}}
27+
ODR_TEST: ${{matrix.odr-test == true}}
28+
29+
defaults:
30+
run:
31+
shell: bash
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
with:
36+
submodules: recursive
37+
38+
- name: Configure stuff
39+
run: |
40+
sudo apt install zstd
41+
mkdir ${{github.workspace}}/build
42+
cd ${{github.workspace}}/build
43+
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DODR_TEST=$ODR_TEST -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/tmp ..
44+
45+
- name: Build
46+
working-directory: ${{github.workspace}}/build
47+
run: cmake --build . -j 6
48+
49+
- name: Install
50+
if: ${{matrix.artifacts == true}}
51+
working-directory: ${{github.workspace}}/build
52+
run: |
53+
cmake --build . --target install
54+
cd ../tmp
55+
install -D ../LICENSE share/doc/xenoblade-toolset/LICENSE.md
56+
install -D ../toolset/README.md share/doc/xenoblade-toolset/README.md
57+
58+
- name: Test
59+
working-directory: ${{github.workspace}}/build
60+
run: ctest --output-on-failure
61+
62+
- name: Upload Artifacts
63+
if: ${{matrix.artifacts == true}}
64+
uses: actions/upload-artifact@v2
65+
with:
66+
name: XenobladeToolset-linux-amd64
67+
path: ${{github.workspace}}/tmp
68+
retention-days: 5
69+
70+
build-widle:
71+
runs-on: windows-2019
72+
steps:
73+
- uses: actions/checkout@v2
74+
with:
75+
submodules: recursive
76+
77+
- name: Configure stuff
78+
run: |
79+
choco install ninja
80+
mkdir ${{github.workspace}}/build
81+
cd ${{github.workspace}}/build
82+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}} ..
83+
env:
84+
CC: clang
85+
CXX: clang++
86+
- name: Build
87+
working-directory: ${{github.workspace}}/build
88+
run: cmake --build . -j 6
89+
90+
- name: Test
91+
working-directory: ${{github.workspace}}/build
92+
run: ctest --output-on-failure
93+
94+
- name: Install
95+
run: |
96+
cmake --build build --target install
97+
copy LICENSE bin/LICENSE.md
98+
copy toolset/README.md bin/README.md
99+
100+
- name: Upload Artifacts
101+
uses: actions/upload-artifact@v2
102+
with:
103+
name: XenobladeToolset-win64
104+
path: ${{github.workspace}}/bin
105+
retention-days: 5

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Download artifacts
12+
uses: dawidd6/action-download-artifact@v2
13+
with:
14+
workflow: cmake.yml
15+
branch: ${{ github.event.release.target_commitish }}
16+
workflow_conclusion: success
17+
18+
- name: Repack them
19+
run: |
20+
for file in *; do
21+
if [ -d $file ]; then
22+
pushd $file
23+
7z a ../$file.7z .
24+
popd
25+
fi
26+
done
27+
- name: Release them
28+
uses: softprops/action-gh-release@v1
29+
with:
30+
files: '*.7z'

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
# XenoLib
2-
[![Build Status](https://travis-ci.org/PredatorCZ/XenoLib.svg?branch=master)](https://travis-ci.org/PredatorCZ/XenoLib)
2+
3+
[![build](https://github.com/PredatorCZ/XenoLib/actions/workflows/cmake.yml/badge.svg)](https://github.com/PredatorCZ/XenoLib/actions/workflows/cmake.yml)
34
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
4-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca0b675a83e4448cb90ddb858607b9f5)](https://app.codacy.com/app/PredatorCZ/XenoLib?utm_source=github.com&utm_medium=referral&utm_content=PredatorCZ/XenoLib&utm_campaign=Badge_Grade_Dashboard)
55

66
XenoLib is independent serialize library for various formats used by Xenoblade Engine.\
7-
Library is compilable under VS 2015, 2017, 2019 and GCC 7, 8.
7+
Library is compilable under Clang 10, Windowns Clang 13.0.1 and G++10.
8+
9+
## Toolset
10+
11+
Toolset can be found in [Toolset folder](https://github.com/PredatorCZ/XenoLib/tree/master/toolset)
12+
13+
[Toolset releases](https://github.com/PredatorCZ/XenoLib/releases)
814

915
## Supported formats
10-
* Loading for MXMD (camdo, wimdo) and their stream files.
11-
* DRSM
12-
* MTXT/LBIM conversion into dds/png format
16+
17+
* MXMD models (camdo, wimdo)
18+
* DRSM/MXMD streams (casmt, wismt)
19+
* MTXT/LBIM textures (witex, catex)
1320
* XBC1 desompressor
14-
* SAR archive
21+
* SAR archives
22+
* BDAT data files
23+
* MTHS shaders
1524
* BC (SKEL, ANIM)
1625

1726
## License
27+
1828
This library is available under GPL v3 license. (See LICENSE.md)
1929

2030
This library uses following libraries:
2131

22-
* libpng, more in libpng/LISENCE
23-
* PreCore, Copyright (c) 2016-2019 Lukas Cone
24-
* zlib, Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
32+
* Decaf
33+
* PreCore, Copyright (c) 2016-2022 Lukas Cone
34+
* zlib, Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler

toolset/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# XenobladeToolset
2+
3+
Xenoblade Toolset is a collection of conversion tools under XenoLib.
4+
5+
This toolset runs on Spike foundation.
6+
7+
Head to this **[Wiki](https://github.com/PredatorCZ/PreCore/wiki/Spike)** for more information on how to effectively use it.
8+
9+
## BDAT2JSON
10+
11+
### Module command: bdat_to_json
12+
13+
Converts BDAT data file or BDAT collection to JSON.
14+
15+
### Settings
16+
17+
- **extract**
18+
19+
**CLI Long:** ***--extract***\
20+
**CLI Short:** ***-E***
21+
22+
**Default value:** true
23+
24+
Extract by data entry if possible.
25+
26+
## SHDExtract
27+
28+
### Module command: extract_shaders
29+
30+
Extract shaders from models, shader bundles or shaders. Converts them into GLSL code and/or shader assembly.
31+
32+
## SARCreate
33+
34+
### Module command: make_sar
35+
36+
Create SAR archives from files.
37+
38+
### Settings
39+
40+
- **extension**
41+
42+
**CLI Long:** ***--extension***\
43+
**CLI Short:** ***-e***
44+
45+
**Default value:** sar
46+
47+
Set output file extension. (common: sar, chr, mot)
48+
49+
- **big-endian**
50+
51+
**CLI Long:** ***--big-endian***\
52+
**CLI Short:** ***-e***
53+
54+
**Default value:** false
55+
56+
Output platform is big endian.
57+
58+
## SARExtract
59+
60+
### Module command: sar_extract
61+
62+
Exctract files from SAR archives.
63+
64+
## SMTExtract
65+
66+
### Module command: smt_extract
67+
68+
Extract and convert textures from stream files into DDS.
69+
70+
## TEX2DDS
71+
72+
### Module command: tex_to_dds
73+
74+
Convert textures or streamed textures into DDS format.
75+

toolset/doc_template.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
<?xml version="1.0"?>
3+
<toolset_name>XenobladeToolset</toolset_name>
4+
<toolset_description>Xenoblade Toolset is a collection of conversion tools under XenoLib.
5+
6+
This toolset runs on Spike foundation.
7+
8+
Head to this **[Wiki](https://github.com/PredatorCZ/PreCore/wiki/Spike)** for more information on how to effectively use it.</toolset_description>
9+
<smt_extract name="SMTExtract">Extract and convert textures from stream files into DDS.</smt_extract>
10+
<tex_to_dds name="TEX2DDS">Convert textures or streamed textures into DDS format.</tex_to_dds>
11+
<sar_extract name="SARExtract">Exctract files from SAR archives.</sar_extract>
12+
<make_sar>Create SAR archives from files.</make_sar>
13+
<extract_shaders name="SHDExtract">Extract shaders from models, shader bundles or shaders. Converts them into GLSL code and/or shader assembly.</extract_shaders>
14+
<bdat_to_json>Converts BDAT data file or BDAT collection to JSON.</bdat_to_json>

0 commit comments

Comments
 (0)