remove llvm installation as it is already #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Run | |
on: | |
push: | |
branches: [ carlos-ci ] | |
pull_request: | |
branches: [ carlos-ci ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-13, windows-latest] # macos-14, | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Install openCL on Ubuntu | |
if: runner.os == 'Linux' | |
run: sudo apt install ocl-icd-opencl-dev | |
- name: Set up MSVC compiler environment on Windows | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
# - name: Install openCL runtime on Windows | |
# if: runner.os == 'Windows' | |
# run: | | |
# curl -L -o opencl_runtime_installer.exe "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0e6849e6-2c56-480b-afcf-be8331d5c4f6-opencl/w_opencl_runtime_p_2024.1.0.968.exe" | |
# Start-Process -FilePath ".\opencl_runtime_installer.exe" -ArgumentList '/S', '/norestart' -NoNewWindow -Wait | |
- name: Install Oclgrind | |
if: runner.os == 'Windows' | |
uses: actions/checkout@v3 | |
with: | |
repository: jrprice/Oclgrind | |
ref: 'master' | |
- name: Install LLVM and Clang | |
if: runner.os == 'Windows' | |
run: | | |
echo "LLVM_DIR=C:/ProgramData/chocolatey/lib/llvm/tools/llvm/lib/cmake/llvm" >> $GITHUB_ENV | |
mkdir build | |
cmake -S . -B build -G "Ninja" -DLLVM_DIR=${LLVM_DIR} | |
cmake --build build | |
- name: Increase swapfile on Ubuntu | |
if: runner.os == 'Linux' | |
run: | | |
sudo swapoff -a | |
sudo fallocate -l 15G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon --show | |
- name: Build with Maven | |
run: mvn clean install | |
shell: bash | |
- name: Run Java class (only possible on MacOS) | |
if: contains(matrix.os, 'macos') | |
run: | | |
mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt | |
java -cp target/classes:$(cat classpath.txt) net.clesperanto.ClesperantoJ |