├── README.md └── .github └── workflows └── ci.yml /README.md: -------------------------------------------------------------------------------- 1 | Repository Moved 2 | ================ 3 | This repository is deprecated due to a merger with the upstream project Softbuffer. Please see [Softbuffer](https://github.com/rust-windowing/softbuffer). 4 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: [main] 7 | 8 | jobs: 9 | Check_Formatting: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - uses: hecrj/setup-rust-action@v1 14 | with: 15 | rust-version: stable 16 | components: rustfmt 17 | - name: Check Formatting 18 | run: cargo +stable fmt --all -- --check 19 | 20 | tests: 21 | name: Tests 22 | strategy: 23 | fail-fast: false 24 | matrix: 25 | rust_version: ['1.60.0', stable, nightly] 26 | platform: 27 | - { target: x86_64-pc-windows-msvc, os: windows-latest, } 28 | - { target: i686-pc-windows-msvc, os: windows-latest, } 29 | - { target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu } 30 | - { target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu } 31 | - { target: i686-unknown-linux-gnu, os: ubuntu-latest, } 32 | - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, } 33 | - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: x11 } 34 | - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "wayland,wayland-dlopen" } 35 | - { target: x86_64-unknown-redox, os: ubuntu-latest, } 36 | - { target: x86_64-apple-darwin, os: macos-latest, } 37 | # We're using Windows rather than Ubuntu to run the wasm tests because caching cargo-web 38 | # doesn't currently work on Linux. 39 | - { target: wasm32-unknown-unknown, os: windows-latest, } 40 | 41 | env: 42 | RUST_BACKTRACE: 1 43 | CARGO_INCREMENTAL: 0 44 | RUSTFLAGS: "-C debuginfo=0 --deny warnings" 45 | OPTIONS: ${{ matrix.platform.options }} 46 | FEATURES: ${{ format(',{0}', matrix.platform.features ) }} 47 | CMD: ${{ matrix.platform.cmd }} 48 | RUSTDOCFLAGS: -Dwarnings 49 | 50 | runs-on: ${{ matrix.platform.os }} 51 | steps: 52 | - uses: actions/checkout@v2 53 | 54 | # Used to cache cargo-web 55 | - name: Cache cargo folder 56 | uses: actions/cache@v1 57 | with: 58 | path: ~/.cargo 59 | key: ${{ matrix.platform.target }}-cargo-${{ matrix.rust_version }} 60 | 61 | - uses: hecrj/setup-rust-action@v1 62 | with: 63 | rust-version: ${{ matrix.rust_version }}${{ matrix.platform.host }} 64 | targets: ${{ matrix.platform.target }} 65 | components: clippy 66 | 67 | - name: Install GCC Multilib 68 | if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686') 69 | run: sudo apt-get update && sudo apt-get install gcc-multilib 70 | 71 | - name: Build crate 72 | shell: bash 73 | run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES 74 | 75 | - name: Build tests 76 | shell: bash 77 | if: > 78 | !((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && 79 | !contains(matrix.platform.target, 'redox') && 80 | matrix.rust_version != '1.60.0' 81 | run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES 82 | 83 | - name: Run tests 84 | shell: bash 85 | if: > 86 | !((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && 87 | !contains(matrix.platform.target, 'wasm32') && 88 | !contains(matrix.platform.target, 'redox') 89 | run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES 90 | 91 | - name: Lint with clippy 92 | shell: bash 93 | if: > 94 | (matrix.rust_version == 'stable') && 95 | !contains(matrix.platform.options, '--no-default-features') && 96 | !((matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')) && 97 | !contains(matrix.platform.target, 'redox') 98 | run: cargo clippy --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings 99 | --------------------------------------------------------------------------------