Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test EGL and build_dlls #70

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because because no build_dlls code directly depends on gl_generator and it gets included anyway because build_dlls depends on egl.

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