diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d0bb03d36..8dd07bbc5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,7 +17,13 @@ jobs: strategy: fail-fast: false matrix: - os: ["windows-latest", "ubuntu-latest", "macos-latest"] + os: ["ubuntu-latest", "macos-latest"] + cargo-options: [""] + include: + - os: "windows-latest" + cargo-options: '--features "egl"' + - os: "windows-latest" + cargo-options: '--features "build_dlls"' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -26,12 +32,7 @@ jobs: if: contains(matrix.os, 'ubuntu') run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV - name: Run tests - if: contains(matrix.os, 'windows') - run: cargo test --verbose --features "egl build_dlls" - - name: Run test (POSIX) - if: ${{ !contains(matrix.os, 'windows') }} - run: | - cargo test --verbose + run: cargo test --verbose ${{ matrix.cargo-options }} linux-cross-compile: name: linux (${{ matrix.target }}) diff --git a/Cargo.toml b/Cargo.toml index 90e6e0529..418037426 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,5 +23,5 @@ gl_generator = { version = "0.14", optional = true } walkdir = "2" [features] -egl = ["gl_generator"] # Only does anything on Windows -build_dlls = ["egl", "gl_generator"] +egl = ["gl_generator"] # Only does anything on Windows +build_dlls = ["egl"] diff --git a/src/tests.rs b/src/tests.rs index 815be2061..92c61a8c9 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -12,7 +12,7 @@ fn test_linkage() { init(); } -#[cfg(all(windows, feature = "egl"))] +#[cfg(all(windows, feature = "build_dlls"))] #[test] fn test_egl_dll_linkage() { use dlopen::symbor::Library;