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 Base Toolkit using the web installer $url = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d91caaa0-7306-46ea-a519-79a0423e1903/w_BaseKit_p_2024.2.1.101_offline.exe" $installer = "oneapi_installer.exe" Write-Host "Downloading Intel oneAPI Base Toolkit..." Invoke-WebRequest -Uri $url -OutFile $installer -UseBasicParsing if (Test-Path $installer) { Write-Host "Installer downloaded successfully" Write-Host "Installing Intel oneAPI Base Toolkit..." Start-Process -FilePath $installer -ArgumentList "--eula", "accept" -Wait Write-Host "Installation completed" } else { Write-Error "Failed to download installer" exit 1 } # Verify installation if (Test-Path "C:\Program Files (x86)\Intel\oneAPI") { Write-Host "oneAPI installation verified" Get-ChildItem "C:\Program Files (x86)\Intel\oneAPI" | Format-Table Name } else { Write-Error "oneAPI installation failed" exit 1 } - name: Build and Run Tests shell: cmd run: | "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" "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