From c33aea9717befde84ca591599fd86c9d73410a17 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 17 Dec 2021 08:17:51 -0500 Subject: [PATCH] Add Advapi64 dependency to examples --- .github/workflows/ci.yml | 61 ++++++++++++++++---------------- examples/capture/CMakeLists.txt | 2 +- examples/compute/CMakeLists.txt | 2 +- examples/triangle/CMakeLists.txt | 2 +- 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a017c599..921139f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,9 @@ name: CI on: push: - branches: [ master, staging ] + branches: [ master ] pull_request: - branches-ignore: [ staging.tmp ] + branches-ignore: [] jobs: @@ -51,26 +51,25 @@ jobs: channel: stable build_command: cargo clippy install_deps_command: | - sudo apt-get update - sudo apt-get install -f -y libegl1-mesa-dev - sudo apt-get install -f -y mesa-vulkan-drivers + sudo apt-get update + sudo apt-get install -f -y libegl1-mesa-dev + sudo apt-get install -f -y mesa-vulkan-drivers make_command: make lib-native - os: ubuntu-18.04 name: Ubuntu Nightly channel: nightly build_command: cargo check install_deps_command: | - sudo apt-get update - sudo apt install -f -y cmake - sudo apt-get install -f -y libegl1-mesa-dev - sudo apt-get install -f -y mesa-vulkan-drivers - GLFW_DIR="$GITHUB_WORKSPACE/libglfw3" - mkdir $GLFW_DIR - curl -o $GLFW_DIR/libglfw3-dev_3.3.2-1_amd64.deb http://security.ubuntu.com/ubuntu/pool/universe/g/glfw3/libglfw3-dev_3.3.2-1_amd64.deb - curl -o $GLFW_DIR/libglfw3_3.3.2-1_amd64.deb http://security.ubuntu.com/ubuntu/pool/universe/g/glfw3/libglfw3_3.3.2-1_amd64.deb - sudo apt install -f -y $GLFW_DIR/libglfw3_3.3.2-1_amd64.deb - sudo apt install -f -y $GLFW_DIR/libglfw3-dev_3.3.2-1_amd64.deb - rm -rf $GLFW_DIR + sudo apt-get update + sudo apt install -f -y cmake + sudo apt-get install -f -y libegl1-mesa-dev + sudo apt-get install -f -y mesa-vulkan-drivers + GLFW_DIR="$GITHUB_WORKSPACE/libglfw3" + mkdir $GLFW_DIR + curl -o $GLFW_DIR/libglfw3-dev_3.3.2-1_amd64.deb http://security.ubuntu.com/ubuntu/pool/universe/g/glfw3/libglfw3-dev_3.3.2-1_amd64.deb + curl -o $GLFW_DIR/libglfw3_3.3.2-1_amd64.deb http://security.ubuntu.com/ubuntu/pool/universe/g/glfw3/libglfw3_3.3.2-1_amd64.deb + sudo apt install -f -y $GLFW_DIR/libglfw3_3.3.2-1_amd64.deb $GLFW_DIR/libglfw3-dev_3.3.2-1_amd64.deb + rm -rf $GLFW_DIR make_command: make VERBOSE=1 - os: windows-2019 name: Windows Stable @@ -78,24 +77,26 @@ jobs: build_command: rustup default stable-msvc; cargo clippy make_command: make lib-native install_deps_command: | - # choco exit with code 1 after successful install - choco install -y --force llvm | exit 0 - echo "LIBCLANG_PATH=C:\Program Files\LLVM\lib" >> $GITHUB_ENV + # choco exit with code 1 after successful install + choco install -y --force llvm | exit 0 + echo "LIBCLANG_PATH=C:\Program Files\LLVM\lib" >> $GITHUB_ENV - os: windows-2019 name: Windows Nightly channel: nightly - build_command: rustup default nightly-msvc; cargo check + #build_command: rustup default nightly-msvc; cargo check + # speed up this build a little + build_command: install_deps_command: | - # choco exit with code 1 after successful install ¯\_(ツ)_/¯ - choco install -y --force cmake make llvm | exit 0 - echo "LIBCLANG_PATH=C:\Program Files\LLVM\lib" >> $GITHUB_ENV - curl -sL -o glfw.zip https://github.com/glfw/glfw/archive/3.3.zip - unzip -qq glfw.zip -d $GITHUB_WORKSPACE - cd $GITHUB_WORKSPACE/glfw-3.3/ - export GLFW3_INCLUDE_DIR=`pwd`/include - export GLFW3_INSTALL_DIR=`pwd`/install - cmake . -DCMAKE_INSTALL_PREFIX=$GLFW3_INSTALL_DIR -DCMAKE_GENERATOR_PLATFORM=x64 - cmake --build . --target install + # choco exit with code 1 after successful install ¯\_(ツ)_/¯ + choco install -y --force cmake make llvm | exit 0 + echo "LIBCLANG_PATH=C:\Program Files\LLVM\lib" >> $GITHUB_ENV + curl -sL -o glfw.zip https://github.com/glfw/glfw/archive/3.3.zip + unzip -qq glfw.zip -d $GITHUB_WORKSPACE + cd $GITHUB_WORKSPACE/glfw-3.3/ + export GLFW3_INCLUDE_DIR=`pwd`/include + export GLFW3_INSTALL_DIR=`pwd`/install + cmake . -DCMAKE_INSTALL_PREFIX=$GLFW3_INSTALL_DIR -DCMAKE_GENERATOR_PLATFORM=x64 + cmake --build . --target install make_command: CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/glfw-3.3/install make VERBOSE=1 make_shell: cmd steps: diff --git a/examples/capture/CMakeLists.txt b/examples/capture/CMakeLists.txt index fd24cb3d..beec5161 100644 --- a/examples/capture/CMakeLists.txt +++ b/examples/capture/CMakeLists.txt @@ -9,7 +9,7 @@ add_executable(${TARGET_NAME} main.c ../framework.c) if(MSVC) add_definitions(-DWGPU_TARGET=WGPU_TARGET_WINDOWS) target_compile_options(${TARGET_NAME} PRIVATE /W4) - set(OS_LIBRARIES "userenv" "ws2_32" "Dwmapi" "dbghelp" "d3dcompiler" "D3D12" "D3D11" "DXGI" "setupapi") + set(OS_LIBRARIES "userenv" "ws2_32" "Dwmapi" "dbghelp" "d3dcompiler" "D3D12" "D3D11" "DXGI" "setupapi" "advapi64") elseif(APPLE) add_definitions(-DWGPU_TARGET=WGPU_TARGET_MACOS) set(OS_LIBRARIES "-framework Cocoa" "-framework CoreVideo" "-framework IOKit" "-framework QuartzCore") diff --git a/examples/compute/CMakeLists.txt b/examples/compute/CMakeLists.txt index d9fbfc75..94dd8727 100644 --- a/examples/compute/CMakeLists.txt +++ b/examples/compute/CMakeLists.txt @@ -9,7 +9,7 @@ add_executable(compute main.c ../framework.c) if(MSVC) add_definitions(-DWGPU_TARGET=WGPU_TARGET_WINDOWS) target_compile_options(${TARGET_NAME} PRIVATE /W4) - set(OS_LIBRARIES "userenv" "ws2_32" "Dwmapi" "dbghelp" "d3dcompiler" "D3D12" "D3D11" "DXGI" "setupapi") + set(OS_LIBRARIES "userenv" "ws2_32" "Dwmapi" "dbghelp" "d3dcompiler" "D3D12" "D3D11" "DXGI" "setupapi" "advapi64") elseif(APPLE) add_definitions(-DWGPU_TARGET=WGPU_TARGET_MACOS) set(OS_LIBRARIES "-framework Cocoa" "-framework CoreVideo" "-framework IOKit" "-framework QuartzCore") diff --git a/examples/triangle/CMakeLists.txt b/examples/triangle/CMakeLists.txt index 56a44db9..8ede0f92 100644 --- a/examples/triangle/CMakeLists.txt +++ b/examples/triangle/CMakeLists.txt @@ -9,7 +9,7 @@ add_executable(triangle main.c ../framework.c) if(MSVC) add_definitions(-DWGPU_TARGET=WGPU_TARGET_WINDOWS) target_compile_options(${TARGET_NAME} PRIVATE /W4) - set(OS_LIBRARIES "userenv" "ws2_32" "Dwmapi" "dbghelp" "d3dcompiler" "D3D12" "D3D11" "DXGI" "setupapi") + set(OS_LIBRARIES "userenv" "ws2_32" "Dwmapi" "dbghelp" "d3dcompiler" "D3D12" "D3D11" "DXGI" "setupapi" "advapi64") elseif(APPLE) add_definitions(-DWGPU_TARGET=WGPU_TARGET_MACOS) set(OS_LIBRARIES "-framework Cocoa" "-framework CoreVideo" "-framework IOKit" "-framework QuartzCore")