Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gwaldron/osgearth
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Nov 11, 2024
2 parents 8d01cf6 + 31ef244 commit 8652b79
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 53 deletions.
42 changes: 12 additions & 30 deletions .github/workflows/external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: windows-external-project
on: [push, workflow_dispatch]

env:
VCPKG_BINARY_SOURCES : 'clear;nuget,GitHub,readwrite'
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VCPKG_BINARY_SOURCES : "clear;x-gha,readwrite"
VCPKG_VERSION: 'master'

jobs:
Expand All @@ -27,29 +25,22 @@ jobs:
with:
submodules: recursive

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Cloning vcpkg main branch (windows)
shell: 'bash'
run: |
cmake -E make_directory ${{ matrix.VCPKG_WORKSPACE }}
cd ${{ matrix.VCPKG_WORKSPACE }}
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.bat -disableMetrics
${{ matrix.VCPKG_WORKSPACE }}/vcpkg/vcpkg version
- name: 'Setup NuGet Credentials'
working-directory: ${{ matrix.VCPKG_WORKSPACE }}
shell: 'bash'
run: |
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.actor }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.actor }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.actor }}/index.json"
echo "set(VCPKG_BUILD_TYPE release)" >> ./vcpkg/triplets/x64-windows.cmake
${{ matrix.VCPKG_WORKSPACE }}/vcpkg/vcpkg version
- name: Create Build Environment
run: |
Expand All @@ -59,18 +50,9 @@ jobs:
shell: bash
working-directory: ${{ runner.workspace }}/build
run: |
cmake $GITHUB_WORKSPACE/share/ExternalProject -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{ matrix.VCPKG_WORKSPACE }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_MANIFEST_DIR=$GITHUB_WORKSPACE/share/ExternalProject
- name: 'Upload cmake configure log artifact'
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: cmake-log
path: |
${{ runner.workspace }}/build/CMakeCache.txt
retention-days: 1
cmake $GITHUB_WORKSPACE/share/ExternalProject -DCMAKE_BUILD_TYPE=release -DCMAKE_TOOLCHAIN_FILE=${{ matrix.VCPKG_WORKSPACE }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_MANIFEST_DIR=$GITHUB_WORKSPACE/share/ExternalProject
- name: Build
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: cmake --build . --config release
34 changes: 16 additions & 18 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: windows-x64-Release
on: [push, pull_request, workflow_dispatch]

env:
VCPKG_BINARY_SOURCES : 'clear;nuget,GitHub,readwrite'
VCPKG_BINARY_SOURCES : 'clear;x-gha,readwrite'
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VCPKG_VERSION: 'master'
Expand All @@ -27,6 +27,13 @@ jobs:
with:
submodules: recursive

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Installing vcpkg (windows)
shell: 'bash'
run: |
Expand All @@ -39,32 +46,23 @@ jobs:
cd ..
./vcpkg/bootstrap-vcpkg.bat -disableMetrics
${{ matrix.VCPKG_WORKSPACE }}/vcpkg/vcpkg version
- name: 'Setup NuGet Credentials'
working-directory: ${{ matrix.VCPKG_WORKSPACE }}
shell: 'bash'
run: |
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.actor }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.actor }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.actor }}/index.json"
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: Download cesium-native
shell: powershell
run: |
Invoke-WebRequest -Uri "https://pelican-public.s3.us-east-1.amazonaws.com/cesium-native-v0.37.0-vs2019.zip" -OutFile "C:\cesium-native.zip"
Expand-Archive -Path "C:\cesium-native.zip" -DestinationPath "C:\cesium-native"
- name: Configure CMake
shell: bash
working-directory: ${{ runner.workspace }}/build
# Add the following for vcpkg install debugging: -DVCPKG_INSTALL_OPTIONS=--debug
run: |
cmake $GITHUB_WORKSPACE -DWIN32_USE_MP=ON -DOSGEARTH_BUILD_LEGACY_SPLAT_NODEKIT=OFF -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{ matrix.VCPKG_WORKSPACE }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_MANIFEST_DIR=$GITHUB_WORKSPACE/vcpkg
cmake $GITHUB_WORKSPACE -DWIN32_USE_MP=ON -DOSGEARTH_BUILD_LEGACY_SPLAT_NODEKIT=OFF -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=ON -DOSGEARTH_BUILD_CESIUM_NODEKIT=ON -DCESIUM_NATIVE_DIR=C:/cesium-native -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=${{ matrix.VCPKG_WORKSPACE }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_MANIFEST_DIR=$GITHUB_WORKSPACE/vcpkg
- name: 'Upload cmake configure log artifact'
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ int main(int argc, char** argv)
## Resources
* [Documentation](http://docs.osgearth.org/en/latest/)
* [Gallery](https://www.pelicanmapping.com/home-1/opensource)
* [Documentation](http://docs.osgearth.org/en/latest/)
* [Gallery](https://www.pelicanmapping.com/home-1/opensource)
* [Custom Software Development](https://www.pelicanmapping.com/software)
---
Expand Down
7 changes: 4 additions & 3 deletions docs/source/cesium_native.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ cesium-native is a library developed by the Cesium team that provides support fo
### Building cesium-native
First, you need to build cesium-native. The official instructions for building cesium-native are [here](https://github.com/CesiumGS/cesium-native) but this is what it would generally look like
```
# Clone the cesium-native repo
git clone [email protected]:CesiumGS/cesium-native.git --recurse-submodules
# Clone the cesium-native repo.
git clone --branch v0.37.0 [email protected]:CesiumGS/cesium-native.git --recurse-submodules
# Configure cesium-native and disable tests
cmake -B build -S . -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX=install -DCESIUM_TESTS_ENABLED=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
cd cesium-native
cmake -B build -S . -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=install -DCESIUM_TESTS_ENABLED=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
# Build and install cesium-native. We generally use RelWithDebInfo on Windows but you can also build Release and Debug if you'd like.
cmake --build build --config RelWithDebInfo
cmake --install build --config RelWithDebInfo
Expand Down

0 comments on commit 8652b79

Please sign in to comment.