diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index aaae336..8b5c863 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,42 +9,30 @@ on: env: CARGO_TERM_COLOR: always -jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update stable - - name: Unit test - run: cargo check - - build: - name: Build - runs-on: ubuntu-latest + # Tests "runs-on:" a GPU hosted runner which requires an enterprise subscription... + # test: + # name: Tests + # runs-on: ubuntu-latest - steps: - - name: Load OpenCL - run: | - wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | - sudo apt-key add - - sudo add-apt-repository \ - 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' - sudo apt-get update - sudo apt-get install \ - intel-opencl-icd \ - intel-level-zero-gpu level-zero \ - intel-media-va-driver-non-free libmfx1 - sudo apt-get install ocl-icd-opencl-dev + # steps: + # - name: Load OpenCL + # run: | + # wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | + # sudo apt-key add - + # sudo add-apt-repository \ + # 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' + # sudo apt-get update + # sudo apt-get install \ + # intel-opencl-icd \ + # intel-level-zero-gpu level-zero \ + # intel-media-va-driver-non-free libmfx1 + # sudo apt-get install ocl-icd-opencl-dev - - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update stable - - name: Build - run: cargo build --verbose - # - name: Run tests - # run: cargo test -- --test-threads=1 + # - uses: actions/checkout@v4 + # - name: Install Rust + # run: rustup update stable + # - name: Unit test + # run: cargo test --verbose -- --test-threads=1 clippy: name: Clippy diff --git a/Cargo.toml b/Cargo.toml index 81ef4a7..0b264ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ edition = "2021" [features] static = ["opencl-sys/static"] -dynamic = ["opencl-sys/dynamic"] CL_VERSION_1_1 = ["opencl-sys/CL_VERSION_1_1"] CL_VERSION_1_2 = ["opencl-sys/CL_VERSION_1_2"] @@ -67,17 +66,19 @@ cl_loader_info = ["opencl-sys/cl_loader_info"] cl_pocl_content_size = ["opencl-sys/cl_pocl_content_size"] cl_loader_layers = ["opencl-sys/cl_loader_layers"] -# Default features: -default = ["static", "CL_VERSION_1_1", "CL_VERSION_1_2"] -# default = ["dynamic"] +# Use dynamic linking instead of static linking +dynamic = [] [dependencies] dlopen2 = "0.7" libc = "0.2" -# opencl-sys = "0.3" opencl-sys = { git = "https://github.com/kenba/opencl-sys-rs", branch = "develop" } thiserror = "2.0" +[dev-dependencies] +cl3 = { path = ".", features = ["static", "CL_VERSION_1_1", "CL_VERSION_1_2", "CL_VERSION_2_0"] } +# cl3 = { path = ".", features = ["dynamic"] } + [[example]] name = "clinfo" path = "examples/clinfo.rs"