Skip to content

Commit

Permalink
Merge pull request #6 from notgull/fix-ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
notgull authored Apr 25, 2023
2 parents 35ce557 + 4c84c37 commit 4e34629
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- { 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: x11 }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: wayland }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: --no-default-features, features: "wayland,wayland-dlopen" }
- { target: aarch64-linux-android, os: ubuntu-latest, cmd: 'apk --', features: "android-native-activity" }
- { target: x86_64-unknown-redox, os: ubuntu-latest, }
- { target: x86_64-apple-darwin, os: macos-latest, }
Expand Down Expand Up @@ -84,20 +84,28 @@ jobs:
shell: bash
if: >
!contains(matrix.platform.target, 'redox') &&
!contains(matrix.platform.target, 'ios') &&
!contains(matrix.platform.target, 'android') &&
matrix.rust_version != '1.64.0'
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

# TODO: Run tests on android/ios once rust-windowing/softbuffer#44 is resolved
- 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, 'redox') &&
!contains(matrix.platform.target, 'android') &&
matrix.rust_version != '1.64.0'
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

- name: Lint with clippy
shell: bash
if: (matrix.rust_version == 'stable') && !contains(matrix.platform.options, '--no-default-features')
if: >
(matrix.rust_version == 'stable') &&
!contains(matrix.platform.target, 'ios') &&
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.options, '--no-default-features')
run: cargo clippy --all-targets --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES -- -Dwarnings
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ softbuffer = { version = "0.2.0", default-features = false, features = ["x11"] }
winit = { version = "0.28.3", default-features = false, features = ["x11"] }

[features]
default = ["x11", "wayland"]
default = ["x11", "wayland", "wayland-dlopen"]
x11 = ["winit/x11"]
wayland = ["winit/wayland"]
wayland-dlopen = ["winit/wayland-dlopen"]
android-native-activity = ["winit/android-native-activity"]
android-game-activity = ["winit/android-game-activity"]

Expand Down

0 comments on commit 4e34629

Please sign in to comment.