From cb5cabeeb866750f31e26c2803bb6d8ceb01cf94 Mon Sep 17 00:00:00 2001 From: Rafal Rudnicki Date: Thu, 16 Jul 2026 09:12:59 +0000 Subject: [PATCH 1/2] Temporary remove linking to ze_loader --- oneapi-rs-sys/build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/oneapi-rs-sys/build.rs b/oneapi-rs-sys/build.rs index 63ef79e..dae79ad 100644 --- a/oneapi-rs-sys/build.rs +++ b/oneapi-rs-sys/build.rs @@ -44,7 +44,6 @@ fn main() { .compile("oneapi-shim"); println!("cargo::rustc-link-lib=sycl"); - println!("cargo::rustc-link-lib=ze_loader"); println!("cargo::rustc-link-lib=intlc"); for source in cpp_sources { From 6cfa626b3dd6360676211f997059172012818c9d Mon Sep 17 00:00:00 2001 From: Rafal Rudnicki Date: Thu, 16 Jul 2026 09:14:18 +0000 Subject: [PATCH 2/2] Add basic CI with docs generation --- .github/workflows/basic.yml | 118 ++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/basic.yml diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml new file mode 100644 index 0000000..8e8bb10 --- /dev/null +++ b/.github/workflows/basic.yml @@ -0,0 +1,118 @@ +name: Basic + +on: + push: + branches: [ "main" ] + + pull_request: + branches: [ "main" ] + + workflow_dispatch: + inputs: + deploy_documentation: + description: Deploy documentation + required: false + type: boolean + default: false + +env: + CARGO_TERM_COLOR: always + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Check if oneAPI is already installed + id: check-oneapi + run: | + if [ -f /opt/intel/oneapi/setvars.sh ]; then + echo "installed=true" >> $GITHUB_OUTPUT + else + echo "installed=false" >> $GITHUB_OUTPUT + fi + + - name: Setup oneAPI + if: steps.check-oneapi.outputs.installed != 'true' + run: | + installer="intel-oneapi-toolkit-2026.1.0.192_offline.sh" + checksum="9d969de9cafbb698bf50f088c4b5174b50fc816f504049e685d6f6d198e10dbc17ef2cd4cfb0bc2b3d2179644a8d77d1" + curl --fail --location --retry 3 --silent --show-error --output "$installer" \ + "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/33cb2a22-ddf1-4aa9-8d68-1f5a118acaf2/intel-oneapi-toolkit-2026.1.0.192_offline.sh" + echo "$checksum $installer" | sha384sum --check + sudo sh "./$installer" -a --silent --cli --eula accept + + - name: Configure oneAPI environment + run: | + source /opt/intel/oneapi/setvars.sh + # copy envs to github + printenv | grep -E '^(PATH|LD_LIBRARY_PATH|LIBRARY_PATH|CPATH|C_INCLUDE_PATH|CPLUS_INCLUDE_PATH)=' >> $GITHUB_ENV + icx --version + sycl-ls --verbose + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose + + - name: Generate documentation + run: | + cargo doc -p oneapi-rs --no-deps --verbose + cat > target/doc/index.html <<'HTML' + + + + + + oneapi-rs documentation + + +

oneapi-rs documentation

+ + + HTML + + - name: Upload documentation artifact + uses: actions/upload-artifact@v4 + with: + name: documentation + path: target/doc + + deploy-documentation: + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && inputs.deploy_documentation == 'true') + needs: build + runs-on: ubuntu-latest + + permissions: + contents: read + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Download documentation artifact + uses: actions/download-artifact@v4 + with: + name: documentation + path: target/doc + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Upload documentation to GitHub Pages + uses: actions/upload-pages-artifact@v3 + with: + path: target/doc + + - name: Deploy documentation to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4