Skip to content

Commit 29438f0

Browse files
ci: test
1 parent 048f6b2 commit 29438f0

File tree

6 files changed

+56
-16
lines changed

6 files changed

+56
-16
lines changed

.github/workflows/nuget-release.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,40 @@ jobs:
88
name: Build on ${{ matrix.os }}
99
runs-on: ${{ matrix.os }}
1010
strategy:
11+
fail-fast: false
1112
matrix:
1213
os: [ubuntu-latest, windows-latest, macos-latest]
1314

1415
steps:
1516
- uses: actions/checkout@v4
16-
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: dotnet info
30+
run: dotnet --info
31+
- name: Publish TypeTreeGeneratorAPI with dotnet
32+
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o output --use-current-runtime -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
33+
- name: Copy importlib to output
34+
run: cp TypeTreeGeneratorAPI/TypeTreeGeneratorAPI/bin/Release/net9.0/win-x64/native/TypeTreeGeneratorAPI.lib ./tt-api-lib/
1835

1936
- name: Build bindings
37+
env:
38+
RUSTFLAGS: "-L output"
39+
LD_LIBRARY_PATH: "${{ github.workspace }}/output"
2040
run: cargo build --release -p bindings
2141

2242
- name: Copy artifacts
2343
shell: bash
2444
run: |
25-
mkdir output
2645
if [[ "${{ runner.os }}" == "Windows" ]]; then
2746
cp target/release/unityscenerepacker.dll output/unityscenerepacker.dll
2847
elif [[ "${{ runner.os }}" == "macOS" ]]; then

.github/workflows/release.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,46 @@ jobs:
1313
build:
1414
runs-on: ${{ matrix.runner }}
1515
strategy:
16+
fail-fast: false
1617
matrix:
1718
include:
1819
# Linux manylinux
1920
- runner: ubuntu-22.04
2021
target: x86_64
21-
manylinux: auto
22-
- runner: ubuntu-22.04
23-
target: aarch64
24-
manylinux: auto
22+
rid: linux-x64
23+
manylinux: manylinux_2_34
24+
# - runner: ubuntu-22.04
25+
# target: aarch64
26+
# rid: linux-x64
27+
# manylinux: manylinux_2_34
2528
# Linux musllinux
26-
- runner: ubuntu-22.04
27-
target: x86_64
28-
manylinux: musllinux_1_2
29-
- runner: ubuntu-22.04
30-
target: aarch64
31-
manylinux: musllinux_1_2
29+
# - runner: ubuntu-22.04
30+
# target: x86_64
31+
# rid: linux-musl-x64
32+
# manylinux: musllinux_1_2
33+
# - runner: ubuntu-22.04
34+
# target: aarch64
35+
# rid: linux-musl-arm64
36+
# manylinux: musllinux_1_2
3237
# Windows
3338
- runner: windows-latest
3439
target: x64
40+
rid: win-x64
3541
manylinux: ""
3642
# MacOS
3743
- runner: macos-13
3844
target: x86_64
45+
rid: osx-x64
3946
manylinux: ""
4047
- runner: macos-14
4148
target: aarch64
49+
rid: osx-arm64
4250
manylinux: ""
4351
steps:
4452
- uses: actions/checkout@v4
4553
- uses: actions/setup-dotnet@v4
54+
with:
55+
dotnet-version: "9.x"
4656

4757
- name: Clone TypeTreeGeneratorAPI
4858
uses: actions/checkout@v4
@@ -51,14 +61,18 @@ jobs:
5161
submodules: true
5262
ref: wip
5363
path: TypeTreeGeneratorAPI
64+
- name: dotnet info
65+
run: dotnet --info
5466
- name: Publish TypeTreeGeneratorAPI with dotnet
55-
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o tt-api-lib --use-current-runtime -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
67+
run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o tt-api-lib --runtime ${{ matrix.rid }} -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false -v:d
68+
- name: Copy importlib to output
69+
run: cp TypeTreeGeneratorAPI/TypeTreeGeneratorAPI/bin/Release/net9.0/win-x64/native/TypeTreeGeneratorAPI.lib ./tt-api-lib/
5670

5771
- name: Build wheels
5872
env:
5973
RUSTFLAGS: "-L tt-api-lib"
6074
LD_LIBRARY_PATH: "${{ github.workspace }}/tt-api-lib"
61-
uses: PyO3/maturin-action@v1
75+
uses: jakobhellermann/maturin-action@allow-ld-env
6276
with:
6377
target: ${{ matrix.target }}
6478
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/libTypeTreeGenerator.so" target="runtimes/linux-x64/native/libTypeTreeGenerator.so" />
24+
<file src="../../target/release/TypeTreeGenerator.dll" target="runtimes/win-x64/native/TypeTreeGenerator.dll" />
25+
<file src="../../target/release/libTypeTreeGenerator.dylib" target="runtimes/osx-x64/native/libTypeTreeGenerator.dylib" />
2226
</files>
2327
</package>
4.82 KB
Binary file not shown.

typetree-generator-api/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fn main() {
2-
println!("cargo:rustc-link-lib=dylib=TypeTreeGeneratorAPI");
2+
println!("cargo:rustc-link-lib=TypeTreeGeneratorAPI");
33
}

0 commit comments

Comments
 (0)