mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
890bbcfbed
416: Makefile package command and travis github releases r=kvark a=Korijn Closes #414 Approach mostly mimicked from [gfx-portability](https://github.com/gfx-rs/portability) as recommended to me by @kvark. I needed a number of commits to iron out some kinks for the Windows builds, so I would recommend using squash merge when accepting this PR. Note that the Windows rust=nightly build fails, but it's also broken on master, so it's unrelated to the changes in this PR. /cc @almarklein # Questions - [x] Would it make sense to also regenerate the `ffi/wgpu.h` and `wgpu-remote.h` header files and include them in the zip archive? # Todo for maintainers - [x] Configure encrypted `api_key` As in [gfx-portability](https://github.com/gfx-rs/portability/blob/master/.travis.yml#L61) you will need to create an API key and commit it to the `.travis.yml` file. I've checked "allow edits from maintainers" so you should be able to commit to this branch directly. You may want to reference the [Travis instructions](https://docs.travis-ci.com/user/deployment/releases/#authenticating-with-an-oauth-token) as well. - [ ] Tag revisions Previous versions (`v0.1` - `v0.4`) have not been tagged on the master branch, you will want to do so retroactively. Also, when releasing in the future, make sure to tag the commit before pushing. Alternatively, you can schedule a travis build manually after applying the tag retroactively. 420: Make Origin3d::{x,y,z} all have type u32 r=kvark a=fintelia Fixes #419 424: swapchain creation: check if selected present mode is supported r=kvark a=Veykril Implements a simple check as talked about in #350 to fallback to `FIFO` should the selected present mode not be available on the system. Co-authored-by: Korijn van Golen <k.vangolen@clinicalgraphics.com> Co-authored-by: Korijn van Golen <korijn@gmail.com> Co-authored-by: Jonathan Behrens <fintelia@gmail.com> Co-authored-by: Veykril <lukastw97@gmail.com>
94 lines
3.3 KiB
YAML
94 lines
3.3 KiB
YAML
language: rust
|
|
sudo: false
|
|
dist: xenial
|
|
|
|
matrix:
|
|
include:
|
|
# Linux 64bit
|
|
- os: linux
|
|
rust: stable
|
|
compiler: gcc
|
|
#TODO: unlock when libglfw3 on Ubuntu comes with Vulkan support
|
|
# or when we add a GL backend.
|
|
#- os: linux
|
|
# rust: nightly
|
|
# compiler: gcc
|
|
# Windows 64bit
|
|
- os: windows
|
|
rust: stable
|
|
- os: windows
|
|
rust: nightly
|
|
|
|
# macOS 64bit
|
|
- env: MACOSX_DEPLOYMENT_TARGET=10.9
|
|
os: osx
|
|
rust: stable
|
|
osx_image: xcode9.4
|
|
compiler: clang
|
|
- env: MACOSX_DEPLOYMENT_TARGET=10.9
|
|
os: osx
|
|
rust: nightly
|
|
osx_image: xcode9.4
|
|
compiler: clang
|
|
|
|
# iPhoneOS 64bit
|
|
- env: TARGET=aarch64-apple-ios
|
|
os: osx
|
|
osx_image: xcode11
|
|
rust: stable
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- cmake
|
|
- libglfw3-dev
|
|
homebrew:
|
|
update: true
|
|
packages:
|
|
- cmake
|
|
- glfw3
|
|
|
|
branches:
|
|
except:
|
|
- staging.tmp
|
|
|
|
before_install:
|
|
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install make; fi
|
|
- if [[ $TRAVIS_RUST_VERSION != "nightly" ]] && [[ $TRAVIS_OS_NAME == "windows" ]]; then rustup default stable-msvc; fi
|
|
- if [[ $TRAVIS_RUST_VERSION == "nightly" ]] && [[ $TRAVIS_OS_NAME == "windows" ]]; then rustup default nightly-msvc; fi
|
|
|
|
script:
|
|
- cargo test
|
|
# TODO: enable GL backend
|
|
- (cd wgpu-core && cargo check --all-features)
|
|
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then (cd wgpu-native && cargo check --features vulkan-portability); fi
|
|
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then cargo check --release; fi
|
|
- if [[ $TRAVIS_RUST_VERSION == "nightly" ]]; then cargo +nightly install cbindgen; fi
|
|
- if [[ $TRAVIS_RUST_VERSION == "nightly" ]] && [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
|
wget -nc -O glfw.zip https://github.com/glfw/glfw/archive/3.3.zip &&
|
|
7z x glfw.zip -oglfw &&
|
|
cd glfw/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 &&
|
|
cd ../.. &&
|
|
export CMAKE_PREFIX_PATH=$GLFW3_INSTALL_DIR &&
|
|
make example-compute example-triangle VERBOSE=1;
|
|
fi
|
|
- if [[ $TRAVIS_RUST_VERSION == "nightly" ]] && [[ $TRAVIS_OS_NAME != "windows" ]]; then make VERBOSE=1; fi
|
|
- if [[ $TRAVIS_RUST_VERSION == "stable" ]]; then make package; fi
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
secure: kS8vjHOnLEknb2qxf2dPxMW8S5KcpjSkSgoi23WXiX3DZ2v8DIJMxVLanJhD3mbr1oI1NGXQHrTeeA/HBEEJcOVzlQo38MgNo/Jyt1k4jLRyCEDL0LjO+M1zAQGoEDWlyyjeu+Alw3SFKqGoZeuYDZ/mxUpEapFMD++8w4IjON2fI6iNumcIMeAg3Ns6Y4wHYQPzfIQQf5svI9dh1lf7PhlFB/btONBPi6rXxU/UwCnHBoOPydl5OwjggaUAjCJSf8i/FDLWt5XpvA2UsML2AbcFNuwFhNGhf6ArwEsqgcMCGL6jACetvI/l3ZL96h5dsgzRLW0ruvnvpEm3y3aw9wCjEAcnQMZCBPlIfOpj5MH/guh526QWCVQ3rwRUJOhua9T2yvwda3ICYspyVShzlbwscA9yLwvsuO+6Hl+upuE2IPfLvS6QpnXVlIWHe/3HqOoQggDdsWvnZhhGNKASKsi9vNgTvec/1iX846/KGcV3nYeHIWFrvP0IgWtEqQrgcWj9w6X7LDdaTFmrkKwKnNn4ClLQYPnlWQS71iX0gwRhONGaSAEfFca6vwVTa8AGSQUEHphe5lT7LtAy6UhlbjZNuKvUR+pn+l0EoWlZzm+uxKMtGR+mG9h6My+GA3hCWWtX/Xc94TvuJ1cg+uRu48+rD21vv3cr2fEVDRq7pGg=
|
|
file_glob: true
|
|
file: dist/wgpu-*.zip
|
|
skip_cleanup: true
|
|
overwrite: true
|
|
on:
|
|
tags: true
|
|
condition: $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_BRANCH == $TRAVIS_TAG
|
|
skip_cleanup: true
|