Skip to content

Commit b8171a1

Browse files
committed
Add Github Actions CI
1 parent 43fccc8 commit b8171a1

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/ci-intel.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build onednnl safe bindings for Intel
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-24.04
14+
env:
15+
RUSTFLAGS: -D warnings
16+
strategy:
17+
matrix:
18+
rust:
19+
- stable
20+
- nightly
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Install Rust toolchain
27+
uses: dtolnay/rust-toolchain@master
28+
with:
29+
toolchain: ${{ matrix.rust }}
30+
31+
- name: Cache oneAPI installation
32+
id: cache-oneapi
33+
uses: actions/cache@v3
34+
with:
35+
path: /opt/intel/oneapi
36+
key: oneapi-${{ env.CACHE_NUMBER }}
37+
restore-keys: |
38+
oneapi-
39+
40+
- name: Set up Intel oneAPI APT repository
41+
if: steps.cache-oneapi.outputs.cache-hit != 'true'
42+
run: |
43+
wget -qO- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
44+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
45+
sudo apt update
46+
47+
- name: Install Intel oneAPI DNNL version 2025.0.1
48+
if: steps.cache-oneapi.outputs.cache-hit != 'true'
49+
run: sudo apt install -y intel-oneapi-dnnl-devel=2025.0.1-*
50+
51+
- name: Build
52+
run: |
53+
source /opt/intel/oneapi/setvars.sh
54+
cargo build
55+
56+
- name: Run tests
57+
run: |
58+
source /opt/intel/oneapi/setvars.sh
59+
cargo test
60+
61+
- name: Run docs
62+
run: |
63+
source /opt/intel/oneapi/setvars.sh
64+
cargo doc

0 commit comments

Comments
 (0)