Skip to content

Commit

Permalink
Add Advapi64 dependency to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Dec 17, 2021
1 parent 6eb7362 commit c33aea9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 33 deletions.
61 changes: 31 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: CI

on:
push:
branches: [ master, staging ]
branches: [ master ]
pull_request:
branches-ignore: [ staging.tmp ]
branches-ignore: []

jobs:

Expand Down Expand Up @@ -51,51 +51,52 @@ 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
channel: stable
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:
Expand Down
2 changes: 1 addition & 1 deletion examples/capture/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion examples/compute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion examples/triangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit c33aea9

Please sign in to comment.