diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000000..e154a59849e --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,96 @@ +name: CI + +on: + push: + branches-ignore: [staging.tmp] + pull_request: + branches-ignore: [staging.tmp] + +jobs: + ios_build: + name: iOS Stable + runs-on: macos-10.15 + env: + TARGET: aarch64-apple-ios + steps: + - uses: actions/checkout@v2 + - run: rustup target add ${{ env.TARGET }} + - name: Check + run: cargo check --manifest-path src/backend/metal/Cargo.toml --target ${{ env.TARGET }} + + android_build: + name: Android Stable + runs-on: ubuntu-18.04 + env: + TARGET: aarch64-linux-android + steps: + - uses: actions/checkout@v2 + - name: Install NDK + run: | + curl -LO https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip + unzip -qq android-ndk-r21b-linux-x86_64.zip -d $GITHUB_WORKSPACE + export NDK_HOME_BIN=$GITHUB_WORKSPACE/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin + ln -s $NDK_HOME_BIN/aarch64-linux-android21-clang $NDK_HOME_BIN/aarch64-linux-android-clang + echo "::add-path::$NDK_HOME_BIN" + - run: rustup target add ${{ env.TARGET }} + - name: Check + run: cargo check --manifest-path src/backend/vulkan/Cargo.toml --target ${{ env.TARGET }} + + build: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + name: + [ + MacOS Stable, + MacOS Nightly, + Ubuntu Stable, + Ubuntu Nightly, + Windows Stable, + Windows Nightly, + ] + include: + - os: macos-10.15 + name: MacOS Stable + channel: stable + additional_command: cd src/backend/metal && cargo check --all-features + - os: macos-10.15 + name: MacOS Nightly + channel: nightly + additional_command: + - os: ubuntu-18.04 + name: Ubuntu Stable + channel: stable + additional_command: + - os: ubuntu-18.04 + name: Ubuntu Nightly + channel: nightly + additional_command: + - os: windows-2019 + name: Windows Stable + channel: stable + additional_command: + - os: windows-2019 + name: Windows Nightly + channel: nightly + additional_command: + steps: + - uses: actions/checkout@v2 + - if: matrix.channel == 'nightly' + name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - if: matrix.os == 'windows-2019' + name: Install make + run: choco install make + #- if: matrix.channel == 'stable' + # run: rustup component add clippy + # build with no features first + - run: make all + - if: matrix.additional_command != '' + name: Check extra features + run: ${{ matrix.additional_command }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6a9971feab8..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,115 +0,0 @@ -sudo: false -language: rust -cache: - directories: - - $HOME/.cargo -before-cache: - - rm -rf $HOME/.cargo/registry - -matrix: - include: - # Linux 64bit - - os: linux - rust: stable - compiler: gcc - - os: linux - rust: nightly - compiler: gcc - - # Android - - env: TARGET=aarch64-linux-android - os: linux - rust: stable - - # 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: xcode9.4 - rust: nightly - - # Windows 64bit - - os: windows - rust: stable - - # WebAssembly - - env: WASM=1 - os: linux - rust: nightly - compiler: gcc - - allow_failures: # temp - - env: WASM=1 - -branches: - except: - - staging.tmp - -before_install: - # Do not run bors builds against the nightly compiler. - # We want to find out about nightly bugs, so they're done in master, but we don't block on them. - - if [[ $TRAVIS_RUST_VERSION == "nightly" && $TRAVIS_BRANCH == "staging" ]]; then exit; fi - - rustup self update - - if [[ $TARGET != "" ]]; then rustup target add $TARGET; fi - - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-5; fi - - if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew update; fi - - if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install make; fi - - | # install NDK - if [ $TARGET == "aarch64-linux-android" ]; then - wget https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip - unzip -qq android-ndk-r21b-linux-x86_64.zip - export ANDROID_NDK_HOME=`pwd`/android-ndk-r21b - export LOCAL_ANDROID_NDK_HOME="$ANDROID_NDK_HOME" - export LOCAL_ANDROID_NDK_HOST_PLATFORM="linux-x86_64" - export PATH=$PATH:${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin - fi - - | # install wasm-bindgen - if [[ -n "$WASM" ]]; then - rustup target add wasm32-unknown-unknown --toolchain nightly; - cargo install -f wasm-bindgen-cli; - fi - -addons: - apt: - sources: - # install a newer cmake since at this time Travis only has version 2.8.7 - - george-edison55-precise-backports - - llvm-toolchain-precise-3.8 - - ubuntu-toolchain-r-test - #- ppa:xorg-edgers/ppa # for libosmesa6-dev - packages: - - xdotool - - cmake - - cmake-data - - libxxf86vm-dev - - libxinerama-dev - - libxinerama1 - - libxcursor-dev - - libxcursor1 - - libglfw-dev - - libosmesa6-dev - - libxi-dev - - libxrandr-dev - - g++-5 - - gcc - -script: - - if [[ $TRAVIS_RUST_VERSION == "nightly" && $TRAVIS_BRANCH == "staging" ]]; then exit; fi - - export PATH=$PATH:$HOME/deps/bin - - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export LIBRARY_PATH=$HOME/deps/usr/lib/x86_64-linux-gnu; fi - - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export LD_LIBRARY_PATH=$LIBRARY_PATH; fi - - if [[ $TARGET != "aarch64-apple-ios" ]]; then make all; else make check-backends; fi - - if [[ -n "$WASM" ]]; then make check-wasm quad-wasm; fi - #- if [[ $TRAVIS_OS_NAME == "linux" ]]; then make reftests-ci; fi - - if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "osx" ]]; then cd src/backend/metal && cargo check --all-features; fi diff --git a/Makefile b/Makefile index 3a46869c7f1..8b5427e79a1 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,6 @@ check: check-backends cd src/warden && cargo check $(CHECK_TARGET_FLAG) --features "env_logger $(FEATURES_GL) $(FEATURES_HAL) $(FEATURES_HAL2)" check-backends: - @echo "Note: excluding \`warden\` here, since it depends on serialization" cargo check --all $(CHECK_TARGET_FLAG) $(EXCLUDES) --exclude gfx-warden check-wasm: diff --git a/README.md b/README.md index be4e0c43689..e6547796e0a 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ gfx-hal on crates.io - - Travis Build Status + + Build Status
Getting Started | Documentation | Blog diff --git a/bors.toml b/bors.toml index 40bba161ea4..f83b5282ad2 100644 --- a/bors.toml +++ b/bors.toml @@ -1,5 +1,12 @@ status = [ - "continuous-integration/travis-ci/push" + "iOS Stable", + "MacOS Stable", + "MacOS Nightly", + "Android Stable", + "Ubuntu Stable", + "Ubuntu Nightly", + "Windows Stable", + "Windows Nightly", ] timeout_sec = 18000 # 5 hours