Skip to content

Commit 77fd1a8

Browse files
ci: build TypeTreeGeneratorAPI in CI
1 parent 8a4fead commit 77fd1a8

File tree

5 files changed

+64
-33
lines changed

5 files changed

+64
-33
lines changed

.github/workflows/nuget-release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,32 @@ jobs:
1515
- uses: actions/checkout@v4
1616

1717
- uses: dtolnay/rust-toolchain@stable
18+
- uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: "9.x"
21+
22+
- name: Clone TypeTreeGeneratorAPI
23+
uses: actions/checkout@v4
24+
with:
25+
repository: jakobhellermann/TypeTreeGeneratorAPI
26+
submodules: true
27+
ref: wip
28+
path: TypeTreeGeneratorAPI
29+
- name: Publish TypeTreeGeneratorAPI with dotnet
30+
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o output --use-current-runtime -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
31+
- name: Copy importlib to output
32+
if: runner.os == 'windows'
33+
run: cp TypeTreeGeneratorAPI/TypeTreeGeneratorAPI/bin/Release/net9.0/win-x64/native/TypeTreeGeneratorAPI.lib ./output
1834

1935
- name: Build bindings
36+
env:
37+
RUSTFLAGS: "-L output"
38+
LD_LIBRARY_PATH: "${{ github.workspace }}/output"
2039
run: cargo build --release -p bindings
2140

2241
- name: Copy artifacts
2342
shell: bash
2443
run: |
25-
mkdir output
2644
if [[ "${{ runner.os }}" == "Windows" ]]; then
2745
cp target/release/unityscenerepacker.dll output/unityscenerepacker.dll
2846
elif [[ "${{ runner.os }}" == "macOS" ]]; then

.github/workflows/release.yml

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,59 @@ jobs:
1818
# Linux manylinux
1919
- runner: ubuntu-22.04
2020
target: x86_64
21+
rid: linux-x64
2122
manylinux: auto
22-
- runner: ubuntu-22.04
23-
target: x86
24-
manylinux: auto
25-
- runner: ubuntu-22.04
26-
target: aarch64
27-
manylinux: auto
28-
- runner: ubuntu-22.04
29-
target: armv7
30-
manylinux: auto
31-
- runner: ubuntu-22.04
32-
target: s390x
33-
manylinux: auto
34-
- runner: ubuntu-22.04
35-
target: ppc64le
36-
manylinux: auto
23+
# - runner: ubuntu-22.04
24+
# target: aarch64
25+
# rid: linux-arm64
26+
# manylinux: auto
3727
# Linux musllinux
38-
- runner: ubuntu-22.04
39-
target: x86_64
40-
manylinux: musllinux_1_2
41-
- runner: ubuntu-22.04
42-
target: x86
43-
manylinux: musllinux_1_2
44-
- runner: ubuntu-22.04
45-
target: aarch64
46-
manylinux: musllinux_1_2
47-
- runner: ubuntu-22.04
48-
target: armv7
49-
manylinux: musllinux_1_2
28+
# - runner: ubuntu-22.04
29+
# target: x86_64
30+
# rid: linux-musl-x64
31+
# manylinux: musllinux_1_2
32+
# - runner: ubuntu-22.04
33+
# target: aarch64
34+
# rid: linux-musl-arm64
35+
# manylinux: musllinux_1_2
5036
# Windows
5137
- runner: windows-latest
5238
target: x64
53-
manylinux: ""
54-
- runner: windows-latest
55-
target: x86
39+
rid: win-x64
5640
manylinux: ""
5741
# MacOS
5842
- runner: macos-13
5943
target: x86_64
44+
rid: osx-x64
6045
manylinux: ""
6146
- runner: macos-14
6247
target: aarch64
48+
rid: osx-arm64
6349
manylinux: ""
6450
steps:
6551
- uses: actions/checkout@v4
52+
- uses: actions/setup-dotnet@v4
53+
with:
54+
dotnet-version: "9.x"
55+
56+
- name: Clone TypeTreeGeneratorAPI
57+
uses: actions/checkout@v4
58+
with:
59+
repository: jakobhellermann/TypeTreeGeneratorAPI
60+
submodules: true
61+
ref: wip
62+
path: TypeTreeGeneratorAPI
63+
- name: Publish TypeTreeGeneratorAPI with dotnet
64+
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o tt-api-lib --runtime ${{ matrix.rid }} -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
65+
- name: Copy importlib to output
66+
if: runner.os == 'windows'
67+
run: cp TypeTreeGeneratorAPI/TypeTreeGeneratorAPI/bin/Release/net9.0/win-x64/native/TypeTreeGeneratorAPI.lib ./tt-api-lib/
68+
6669
- name: Build wheels
67-
uses: PyO3/maturin-action@v1
70+
env:
71+
RUSTFLAGS: "-L tt-api-lib"
72+
LD_LIBRARY_PATH: "${{ github.workspace }}/tt-api-lib"
73+
uses: jakobhellermann/maturin-action@allow-ld-env
6874
with:
6975
target: ${{ matrix.target }}
7076
args: --release --out dist

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
*.nupkg
66
/*.unity3d
77
/*.bundle
8+
89
*.so
910
*.a
10-
/*.dll
11+
*.dll
12+
*.lib
13+
*.pdb
1114

1215
__pycache__
1316
*.pyc

bindings/nuget/unityscenerepacker.nuspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@
1919
<file src="../../target/release/libunityscenerepacker.so" target="runtimes/linux-x64/native/libunityscenerepacker.so" />
2020
<file src="../../target/release/unityscenerepacker.dll" target="runtimes/win-x64/native/unityscenerepacker.dll" />
2121
<file src="../../target/release/libunityscenerepacker.dylib" target="runtimes/osx-x64/native/libunityscenerepacker.dylib" />
22+
23+
<file src="../../target/release/libTypeTreeGeneratorAPI.so" target="runtimes/linux-x64/native/libTypeTreeGeneratorAPI.so" />
24+
<file src="../../target/release/TypeTreeGeneratorAPI.dll" target="runtimes/win-x64/native/TypeTreeGeneratorAPI.dll" />
25+
<file src="../../target/release/libTypeTreeGeneratorAPI.dylib" target="runtimes/osx-x64/native/libTypeTreeGeneratorAPI.dylib" />
2226
</files>
2327
</package>
4.82 KB
Binary file not shown.

0 commit comments

Comments
 (0)