Skip to content

Try to fix build again #1782

Try to fix build again

Try to fix build again #1782

Workflow file for this run

name: windows-x64-Release
on: [push, pull_request, workflow_dispatch]
env:
VCPKG_BINARY_SOURCES : 'clear;nuget,GitHub,readwrite'
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
VCPKG_VERSION: 'master'
CESIUM_NATIVE_VERSION: 'v0.37.0'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-2022']
include:
- os: 'windows-2022'
triplet: 'x64-windows'
mono: ''
VCPKG_WORKSPACE: 'c:/vcpkg_own'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Installing vcpkg (windows)
shell: 'bash'
run: |
cmake -E make_directory ${{ matrix.VCPKG_WORKSPACE }}
cd ${{ matrix.VCPKG_WORKSPACE }}
# git clone --depth 1 --branch ${{env.VCPKG_VERSION}} https://github.com/microsoft/vcpkg
git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout ${{env.VCPKG_VERSION}}
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
- uses: actions/cache@v4
id: cache_cesium_native
with:
path: c:/cesium-native-install
key: cesium-native-${{ env.CESIUM_NATIVE_VERSION }}-${{ runner.os }}-${{ env.BUILD_TYPE }}
- name: Download and build cesium-native
shell: 'bash'
if: steps.cache_cesium_native.outputs.cache-hit != 'true'
run: |
git clone --branch ${{env.CESIUM_NATIVE_VERSION}} https://github.com/CesiumGS/cesium-native.git c:/cesium-native --recurse-submodules
cd c:/cesium-native
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=c:/cesium-native-install -DCESIUM_TESTS_ENABLED=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE
cmake --build build --config $BUILD_TYPE
cmake --install build --config $BUILD_TYPE
- 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 -DOSGEARTH_BUILD_CESIUM_NODEKIT=ON -DCESIUM_NATIVE_DIR=C:/cesium-native-install -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
if: ${{ failure() }}
with:
name: cmake-log
path: |
${{ runner.workspace }}/build/CMakeCache.txt
retention-days: 1
- name: Build
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE