1
0
mirror of https://github.com/fumiama/base16384-sycl.git synced 2026-06-05 00:32:49 +08:00
Files
base16384-sycl/.github/workflows/test.yml
2025-10-13 15:49:18 +08:00

60 lines
2.2 KiB
YAML

name: test
on: [push, pull_request]
jobs:
test_ubuntu:
name: Run CMake Test on Ubuntu 🧪
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Build Tools
run: |
# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
# add signed entry to apt sources and configure the APT client to use Intel repository:
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
sudo apt-get update
sudo apt-get install -y intel-basekit cmake
- name: Build and Run Tests
run: |
source /opt/intel/oneapi/setvars.sh
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD=test ..
cmake --build . && ctest --output-on-failure
test_windows:
name: Run CMake Test on Windows 🧪
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Build Tools
run: |
# Verify Chocolatey is available
choco --version
# Install Visual Studio Build Tools and CMake
choco install cmake visualstudio2022buildtools visualstudio2022-workload-vctools -y
# Download and install Intel oneAPI
Invoke-WebRequest -Uri "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/f5881e61-dcdc-40f1-9bd9-717081ac623c/intel-oneapi-base-toolkit-2025.2.1.46_offline.exe" -OutFile "install.exe"
./install.exe -s -a --silent --eula accept
- name: Build and Run Tests
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD=test ..
cmake --build . && ctest --output-on-failure