File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Basic
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+
7+ pull_request :
8+ branches : [ "main" ]
9+
10+ env :
11+ CARGO_TERM_COLOR : always
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Check if oneAPI is already installed
21+ id : check-oneapi
22+ run : |
23+ if [ -f /opt/intel/oneapi/setvars.sh ]; then
24+ echo "installed=true" >> $GITHUB_OUTPUT
25+ else
26+ echo "installed=false" >> $GITHUB_OUTPUT
27+ fi
28+
29+ - name : Setup oneAPI
30+ if : steps.check-oneapi.outputs.installed != 'true'
31+ run : |
32+ # download and install oneAPI
33+ wget --no-verbose https://registrationcenter-download.intel.com/akdlm/IRC_NAS/33cb2a22-ddf1-4aa9-8d68-1f5a118acaf2/intel-oneapi-toolkit-2026.1.0.192_offline.sh
34+ sudo sh ./intel-oneapi-toolkit-2026.1.0.192_offline.sh -a --silent --cli --eula accept
35+
36+ - name : Configure oneAPI environment
37+ run : |
38+ source /opt/intel/oneapi/setvars.sh
39+ # copy envs to github
40+ printenv | grep -E '^(PATH|LD_LIBRARY_PATH|LIBRARY_PATH|CPATH|C_INCLUDE_PATH|CPLUS_INCLUDE_PATH)=' >> $GITHUB_ENV
41+ icx --version
42+ sycl-ls --verbose
43+
44+ - name : Build
45+ run : cargo build --verbose
46+
47+ - name : Run tests
48+ run : cargo test --verbose
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ fn main() {
4444 . compile ( "oneapi-shim" ) ;
4545
4646 println ! ( "cargo::rustc-link-lib=sycl" ) ;
47- println ! ( "cargo::rustc-link-lib=ze_loader" ) ;
4847 println ! ( "cargo::rustc-link-lib=intlc" ) ;
4948
5049 for source in cpp_sources {
@@ -66,7 +65,7 @@ fn get_compiler_path() -> Result<PathBuf, Error> {
6665 if let Ok ( path) = std:: env:: var ( "CMPLR_ROOT" ) {
6766 let path = PathBuf :: from ( path) . join ( "bin/icpx" ) ;
6867 if path. exists ( ) {
69- return Ok ( path)
68+ return Ok ( path) ;
7069 }
7170 }
7271 if let Ok ( path) = which ( "icpx" ) {
@@ -79,5 +78,8 @@ fn get_compiler_path() -> Result<PathBuf, Error> {
7978 return Ok ( path) ;
8079 }
8180
82- Err ( Error :: new ( std:: io:: ErrorKind :: NotFound , "No DPC++ compiler found" ) )
81+ Err ( Error :: new (
82+ std:: io:: ErrorKind :: NotFound ,
83+ "No DPC++ compiler found" ,
84+ ) )
8385}
You can’t perform that action at this time.
0 commit comments