diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 286c4eb..9843105 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,39 +10,30 @@ 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@v2 - - name: Build - run: cargo build --verbose -# - name: Run tests -# run: cargo test --verbose + # - 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 dd96bdf..c5cd5b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,9 +15,7 @@ edition = "2021" [features] static = ["cl3/static"] -dynamic = ["cl3/dynamic"] -# CL_VERSION_1_0 = ["cl3/CL_VERSION_1_0"] CL_VERSION_1_1 = ["cl3/CL_VERSION_1_1"] CL_VERSION_1_2 = ["cl3/CL_VERSION_1_2"] CL_VERSION_2_0 = ["cl3/CL_VERSION_2_0"] @@ -68,9 +66,8 @@ cl_loader_info = ["cl3/cl_loader_info"] cl_pocl_content_size = ["cl3/cl_pocl_content_size"] cl_loader_layers = ["cl3/cl_loader_layers"] -# Default features: -default = ["static", "CL_VERSION_1_1", "CL_VERSION_1_2", "CL_VERSION_2_0"] -# default = ["dynamic"] +# Use dynamic linking instead of static linking +dynamic = ["cl3/dynamic"] [dependencies] libc = "0.2" @@ -80,7 +77,8 @@ serde = { version = "1.0", optional = true } [dev-dependencies] serde_json = "1.0" -opencl3 = { path = ".", features = ["serde"] } +opencl3 = { path = ".", features = ["serde", "static", "CL_VERSION_1_1", "CL_VERSION_1_2", "CL_VERSION_2_0"] } +# opencl3 = { path = ".", features = ["serde", "dynamic"] } [lints.clippy] enum_glob_use = "deny"