Skip to content

Allow comparing Version by deriving PartialOrd and Ord, add constant with the version the bindings were compiled with #489

Allow comparing Version by deriving PartialOrd and Ord, add constant with the version the bindings were compiled with

Allow comparing Version by deriving PartialOrd and Ord, add constant with the version the bindings were compiled with #489

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
build-vcpkg:
name: build vcpkg
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install cargo-vcpkg
run: cargo install cargo-vcpkg
- name: Install dependencies
run: cargo vcpkg -v build
- name: Build SDL2
shell: bash
env:
CI_BUILD_FEATURES: "use-vcpkg static-link gfx image ttf mixer"
RUST_TEST_THREADS: 1
run: |
set -xeuo pipefail
rustc --version
cargo --version
cargo build --features "${CI_BUILD_FEATURES}"
cargo build --examples --features "${CI_BUILD_FEATURES}"
cargo test --features "${CI_BUILD_FEATURES}"
build-bundled:
name: build bundled
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
feature: ["", "static-link"]
build_mode: ["", "--release"]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Build SDL2
shell: bash
env:
# Bundled doesn't yet support gfx, image, ttf, mixer.
CI_BUILD_FEATURES: "bundled"
RUST_TEST_THREADS: 1
run: |
set -xeuo pipefail
rustc --version
cargo --version
cargo build --features "${CI_BUILD_FEATURES} ${{matrix.feature}}" ${{matrix.build_mode}}
cargo build --examples --features "${CI_BUILD_FEATURES} ${{matrix.feature}}" ${{matrix.build_mode}}
cargo test --features "${CI_BUILD_FEATURES} ${{matrix.feature}}" ${{matrix.build_mode}}
build-linux:
name: build linux pkg-config
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-ttf-dev
- name: Build SDL2
shell: bash
env:
CI_BUILD_FEATURES: "gfx image ttf mixer"
RUST_TEST_THREADS: 1
run: |
set -xeuo pipefail
rustc --version
cargo --version
# SDL 2.0.10 so no hidapi
cargo build --no-default-features --features "${CI_BUILD_FEATURES}"
cargo test --no-default-features --features "${CI_BUILD_FEATURES}"