forked from sinbad/FbxUdimUnpack
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (115 loc) · 4.16 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: "Build fbx-udim-unpack"
on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- "v*"
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-build
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022] # , ubuntu-20.04, macos-14]
include:
- os: windows-2022
sdk_url: "https://github.com/V-Sekai/FBXSDK-Windows/archive/refs/tags/2020.2.zip"
sdk_license: "sdk/Windows/2020.2/License.rtf"
build_command: |
find sdk -type f -name '*.zst' -exec sh -c 'zstd -d "{}" -o "${0%.zst}"' {} \;
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
run_command: ./build/Debug/fbx-udim-unpack.exe
artifact_name: fbx-udim-unpack-windows-x86_64
artifact_path: build/Debug/fbx-udim-unpack.exe
# - os: ubuntu-20.04
# sdk_url: "https://github.com/V-Sekai/FBXSDK-Linux/archive/refs/tags/2020.2.zip"
# sdk_license: "sdk/Linux/2020.2/License.txt"
# build_command: |
# find sdk -type f -name '*.zst' -exec sh -c 'zstd -d "{}" -o "${0%.zst}"' {} \;
# cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# cmake --build build
# run_command: ./build/fbx-udim-unpack
# artifact_name: fbx-udim-unpack-linux-x86_64
# artifact_path: build/fbx-udim-unpack
# - os: macos-14
# sdk_url: "https://github.com/V-Sekai/FBXSDK-Darwin/archive/refs/tags/2020.2.zip"
# sdk_license: "sdk/Darwin/2020.2/License.rtf"
# build_command: |
# find sdk -type f -name '*.zst' -exec sh -c 'zstd -d "{}" -o "${0%.zst}"' {} \;
# cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# cmake --build build
# run_command: ./build/fbx-udim-unpack
# artifact_name: fbx-udim-unpack-macos-x86_64
# artifact_path: build/fbx-udim-unpack
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install 7z
run: |
if [[ $RUNNER_OS == "Windows" ]]; then
choco install 7zip
elif [[ $RUNNER_OS == "Linux" ]]; then
sudo apt-get install p7zip-full
else
brew install p7zip
fi
shell: bash
- name: Setup filter.lfs.required
run: |
git config --global filter.lfs.required false
shell: bash
- name: Setup filter.lfs.smudge
run: |
git config --global filter.lfs.smudge "git-lfs smudge --skip %f"
shell: bash
- name: Setup filter.lfs.process
run: |
git config --global filter.lfs.process "git-lfs filter-process --skip"
shell: bash
- name: Fetch sdk
run: |
curl -O -L "${{ matrix.sdk_url }}"
shell: bash
- name: Install 7z extract
run: |
7z x 2020.2.zip
shell: bash
- name: Extract and move SDK
run: |
mkdir -p sdk
7z x 2020.2.zip -osdk_temp
mv sdk_temp/*/* .
shell: bash
- name: CMake configure and build
run: ${{ matrix.build_command }}
shell: bash
- name: Run fbx-udim-unpack help
run: ${{ matrix.run_command }}
shell: bash
- name: Prepare artifacts
run: |
export TARGET=${{ matrix.artifact_name }}
mkdir $TARGET
cp ${{ matrix.sdk_license }} $TARGET/FBX-SDK-License.txt
cp LICENSE $TARGET/fbx-udim-unpack-License.txt
cp ${{ matrix.artifact_path }} $TARGET/${{ matrix.artifact_name }}
7z a -r $TARGET.zip $TARGET
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.artifact_name }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}/*