Skip to content

Commit 4b0b40a

Browse files
Update Build.yml
1 parent 3e6dce1 commit 4b0b40a

1 file changed

Lines changed: 16 additions & 21 deletions

File tree

.github/workflows/Build.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,28 @@ jobs:
4747
lfs: true
4848
submodules: true
4949

50-
- name: Setup .NET SDK
51-
uses: actions/setup-dotnet@v4
52-
with:
53-
dotnet-version: '6.0.x'
54-
55-
- name: Install Native Build Dependencies
50+
# Use pre-built Cesium package approach
51+
- name: Download and setup Cesium for Unity
5652
run: |
57-
sudo apt-get update
58-
sudo apt-get install -y cmake ninja-build clang g++ zip unzip
59-
60-
- name: Build Cesium native plugin
61-
run: |
62-
mkdir -p Assets/Plugins/CesiumForUnity/native~/build
63-
cd Assets/Plugins/CesiumForUnity/native~/build
64-
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
65-
cmake --build . --config Release
66-
67-
# This is the new step to generate the C# bindings for Cesium.
68-
- name: Build Cesium C# bindings (Reinterop)
69-
run: dotnet publish Assets/Plugins/CesiumForUnity/Reinterop~ -o Assets/Plugins/CesiumForUnity
53+
# Download latest release from Cesium Unity releases
54+
wget -O cesium-unity.tgz https://github.com/CesiumGS/cesium-unity/releases/latest/download/cesium-unity.tgz
55+
56+
# Extract to Packages directory
57+
mkdir -p Packages
58+
cd Packages
59+
tar -xzf ../cesium-unity.tgz
60+
61+
# Ensure proper permissions
62+
chmod -R 755 .
7063
7164
- name: Cache Library folder
7265
uses: actions/cache@v3
7366
with:
7467
path: Library
75-
key: Library-${{ matrix.targetPlatform }}
76-
restore-keys: Library-
68+
key: Library-${{ matrix.targetPlatform }}-cesium
69+
restore-keys: |
70+
Library-${{ matrix.targetPlatform }}
71+
Library-
7772
7873
- name: Free up disk space for Android (if needed)
7974
if: matrix.targetPlatform == 'Android'

0 commit comments

Comments
 (0)