Skip to content

Commit

Permalink
Test EGL and build_dlls
Browse files Browse the repository at this point in the history
test_egl_dll_linkage needs build_dlls
  • Loading branch information
sagudev committed Oct 16, 2023
1 parent e535efa commit da74082
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }})
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit da74082

Please sign in to comment.