diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d24ef46c1c..22cc7d02e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,29 +41,31 @@ jobs: strategy: fail-fast: false matrix: - rust_version: [1.70.0, stable, nightly] + rust_version: [1.78.0, stable, nightly] platform: - - { target: x86_64-pc-windows-msvc, os: windows-latest, } - - { target: i686-pc-windows-msvc, os: windows-latest, } - - { target: i686-pc-windows-msvc, os: windows-latest, options: --no-default-features, features: wgl } - - { target: i686-pc-windows-msvc, os: windows-latest, options: --no-default-features, features: egl } - - { target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu } - - { target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu } - - { target: i686-unknown-linux-gnu, os: ubuntu-latest, } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "egl,wayland,x11" } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "egl,wayland" } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "egl,x11" } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: glx } - - { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' } - - { target: x86_64-apple-darwin, os: macos-latest, } + - { target: x86_64-pc-windows-msvc, os: windows-latest, } + - { target: i686-pc-windows-msvc, os: windows-latest, } + - { target: i686-pc-windows-msvc, os: windows-latest, options: --no-default-features, features: wgl } + - { target: i686-pc-windows-msvc, os: windows-latest, options: --no-default-features, features: egl } + - { target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu } + - { target: i686-pc-windows-gnu, os: windows-latest, host: -i686-pc-windows-gnu } + - { target: i686-unknown-linux-gnu, os: ubuntu-latest, } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "egl,wayland,x11" } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "egl,wayland" } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "egl,x11" } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: glx } + - { target: aarch64-unknown-linux-ohos, os: ubuntu-latest, } + - { target: x86_64-unknown-linux-ohos, os: ubuntu-latest, } + - { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' } + - { target: x86_64-apple-darwin, os: macos-latest, } exclude: # Android is tested on stable-3 - - rust_version: '1.70.0' - platform: { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' } + - rust_version: '1.78.0' + platform: { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' } include: - - rust_version: '1.70.0' - platform: { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' } + - rust_version: '1.78.0' + platform: { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --' } env: @@ -100,15 +102,13 @@ jobs: if: contains(matrix.platform.target, 'android') run: cargo +stable install cargo-apk - - name: Build tests - shell: bash - run: cargo $CMD test -p glutin --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES - name: Run tests shell: bash if: ( !contains(matrix.platform.target, 'android') && !contains(matrix.platform.target, 'ios') && - !contains(matrix.platform.target, 'wasm32')) + !contains(matrix.platform.target, 'wasm32') && + !contains(matrix.platform.target, 'ohos')) run: cargo test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES - name: Check documentation @@ -117,6 +117,6 @@ jobs: - name: Lint with clippy shell: bash - if: (matrix.rust_version == '1.70.0') && !contains(matrix.platform.options, '--no-default-features') + if: matrix.rust_version == '1.78.0' && !contains(matrix.platform.options, '--no-default-features') run: cargo clippy --workspace --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings diff --git a/CHANGELOG.md b/CHANGELOG.md index f613522474..29344aefd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Properly set up OpenGL-specific stuff on the `NSView`, instead of relying on Winit to do it. - Added `OpenHarmony` platform support with EGL. - Added support for `Display::create_pbuffer_surface()` in WGL via `WGL_ARB_pbuffer`. +- Added `OpenHarmony` platform some logic for CI. # Version 0.32.0 diff --git a/glutin-winit/build.rs b/glutin-winit/build.rs index 32078de541..8c94c6d73f 100644 --- a/glutin-winit/build.rs +++ b/glutin-winit/build.rs @@ -7,11 +7,12 @@ fn main() { cfg_aliases! { // Systems. android_platform: { target_os = "android" }, + ohos_platform: { target_env = "ohos" }, wasm_platform: { target_family = "wasm" }, macos_platform: { target_os = "macos" }, ios_platform: { target_os = "ios" }, apple: { any(ios_platform, macos_platform) }, - free_unix: { all(unix, not(apple), not(android_platform)) }, + free_unix: { all(unix, not(apple), not(android_platform), not(ohos_platform)) }, // Native displays. x11_platform: { all(feature = "x11", free_unix, not(wasm_platform)) }, diff --git a/glutin_wgl_sys/src/lib.rs b/glutin_wgl_sys/src/lib.rs index c9d8048b77..3606fea6fb 100644 --- a/glutin_wgl_sys/src/lib.rs +++ b/glutin_wgl_sys/src/lib.rs @@ -3,6 +3,7 @@ #![allow(clippy::missing_safety_doc)] #![allow(clippy::manual_non_exhaustive)] #![allow(clippy::unnecessary_cast)] +#![allow(unused_imports)] /// WGL bindings pub mod wgl {