Skip to content

Commit af16e52

Browse files
ci: test
1 parent 048f6b2 commit af16e52

File tree

4 files changed

+46
-13
lines changed

4 files changed

+46
-13
lines changed

.github/workflows/nuget-release.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,38 @@ 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
1833

1934
- name: Build bindings
35+
env:
36+
RUSTFLAGS: "-L output"
37+
LD_LIBRARY_PATH: "${{ github.workspace }}/output"
2038
run: cargo build --release -p bindings
2139

2240
- name: Copy artifacts
2341
shell: bash
2442
run: |
25-
mkdir output
2643
if [[ "${{ runner.os }}" == "Windows" ]]; then
2744
cp target/release/unityscenerepacker.dll output/unityscenerepacker.dll
2845
elif [[ "${{ runner.os }}" == "macOS" ]]; then

.github/workflows/release.yml

Lines changed: 22 additions & 10 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+
rid: linux-x64
23+
manylinux: manylinux_2_34
2224
- runner: ubuntu-22.04
2325
target: aarch64
24-
manylinux: auto
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,16 @@ 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
5668

5769
- name: Build wheels
5870
env:
5971
RUSTFLAGS: "-L tt-api-lib"
6072
LD_LIBRARY_PATH: "${{ github.workspace }}/tt-api-lib"
61-
uses: PyO3/maturin-action@v1
73+
uses: jakobhellermann/maturin-action@allow-ld-env
6274
with:
6375
target: ${{ matrix.target }}
6476
args: --release --out dist

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>

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)