Skip to content

Commit

Permalink
Fix for build failure
Browse files Browse the repository at this point in the history
Don't use lukka/run-vcpkg or lukka/run-cmake, just use shell commands.
Pin cmake at v3.27.6, newer versions break openxr
  • Loading branch information
hyperlogic committed Apr 11, 2024
1 parent c7ea429 commit 463f377
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 89 deletions.
42 changes: 20 additions & 22 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ jobs:
- name: Install System Packages
uses: ConorMacBride/install-package@v1
with:
apt: libgl-dev libxcb-glx0-dev libglu1-mesa-dev libxxf86vm-dev libxrandr-dev
apt: libxmu-dev libxi-dev libgl-dev libxcb-glx0-dev libglu1-mesa-dev libxxf86vm-dev libxrandr-dev
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Install Vcpkg Packages
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'
- name: Configure and Build
uses: lukka/run-cmake@v10
with:
configurePreset: 'make-vcpkg'
buildPreset: 'make-vcpkg-release'
uses: lukka/get-cmake@v3.27.6
- name: Create Build Dir
run: mkdir build
- name: CMake Configure
working-directory: build
run: cmake -DSHIPPING=ON -DCMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" ..
- name: CMake Build
working-directory: build
run: cmake --build . config=Release
build-windows:
runs-on: windows-latest
steps:
Expand All @@ -34,18 +33,17 @@ jobs:
- name: Get Microsoft Visual Studio for C++
uses: ilammy/msvc-dev-cmd@v1
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Install Vcpkg Packages
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'
- name: Configure and Build
uses: lukka/run-cmake@v10
with:
configurePreset: 'msvc-vcpkg'
buildPreset: 'msvc-vcpkg-release'
uses: lukka/get-cmake@v3.27.6
- name: Create Build Dir
run: mkdir build
- name: CMake Configure
working-directory: build
run: cmake -DSHIPPING=ON -DCMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" ..
- name: CMake Build
working-directory: build
run: cmake --build . config=Release
- name: Upload Artifiacts
uses: actions/upload-artifact@v4
with:
name: windows-build
path: builds/msvc-vcpkg/Release
path: build/Release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ meta-quest/ovr_openxr_mobile_sdk_59.0.zip
data/*
!data/test.ply
!data/test_vr.json
vcpkg_installed/

# ignore archived release zip
splatapult*.zip
49 changes: 0 additions & 49 deletions CMakePresets.json

This file was deleted.

26 changes: 9 additions & 17 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,31 @@


RELEASE_NAME = "splatapult-0.1-x64"
VCPKG_DIR = os.getenv("VCPKG_DIR")


@task
def clean(c):
c.run("rm -rf vcpkg_installed")
c.run("rm -rf build")


@task
def build(c):
def build_with_config(c, config):
c.run("mkdir build")

with c.cd("build"):
c.run(
f'cmake -DSHIPPING=ON -DCMAKE_TOOLCHAIN_FILE="{VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake" ..'
)
c.run(f"cmake --build . --config Release")
c.run('cmake -DSHIPPING=ON -DCMAKE_TOOLCHAIN_FILE="../vcpkg/scripts/buildsystems/vcpkg.cmake" ..')
c.run(f"cmake --build . --config={config}")

@task
def build(c):
build_with_config(c, "Release")

@task
def build_debug(c):
c.run("mkdir build")
with c.cd("build"):
c.run(
f'cmake -DSHIPPING=OFF -DCMAKE_TOOLCHAIN_FILE="{VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake" ..'
)
c.run(f"cmake --build . --config Debug")

build_with_config(c, "Debug")

@task
def archive(c):
shutil.make_archive(RELEASE_NAME, "zip", "build/Release")


@task
def deploy(c):
c.run(f"cp {RELEASE_NAME}.zip ../hyperlogic.github.io/files")
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 1367 files

0 comments on commit 463f377

Please sign in to comment.