Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix Windows CI #152

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -DGLFW_BUILD_EXAMPLES=NO -DGLFW_BUILD_TESTS=NO
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" "Bcrypt")
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" "Bcrypt")
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" "Bcrypt")
elseif(APPLE)
add_definitions(-DWGPU_TARGET=WGPU_TARGET_MACOS)
set(OS_LIBRARIES "-framework Cocoa" "-framework CoreVideo" "-framework IOKit" "-framework QuartzCore")
Expand Down