Skip to content

Add pocl upstream as a CI #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 74 additions & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,94 @@ concurrency:

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - POCL ${{ matrix.pocl }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ['1.10', '1.11']
os: ['ubuntu-latest', 'macOS-latest']
arch: [x64]
pocl: [jll]
include:
- version: '1.10'
os: ubuntu-latest
arch: x64
pocl: local
- version: '1.11'
os: ubuntu-latest
arch: x64
pocl: local
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- name: Checkout pocl
if: ${{ matrix.pocl == 'local' }}
uses: actions/checkout@v4
with:
repository: pjaaskel/pocl
ref: UnreachableToReturns-fixes
path: pocl
- name: Install system dependencies
if: ${{ matrix.pocl == 'local' }}
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config
- name: Install Julia dependencies
if: ${{ matrix.pocl == 'local' }}
run: |
touch pocl/Project.toml
julia --project=pocl --color=yes -e '
using Pkg
# unversioned
Pkg.add([
"SPIRV_Tools_jll",
"OpenCL_jll",
"OpenCL_Headers_jll",
"Hwloc_jll",
"CMake_jll",
])
# versioned
Pkg.add(name="LLVM_full_jll", version="19")
Pkg.add(name="SPIRV_LLVM_Translator_jll", version="19")'
- name: Build PoCL
if: ${{ matrix.pocl == 'local' }}
run: |
julia --project=pocl --color=yes -e '
using LLVM_full_jll,
SPIRV_Tools_jll, SPIRV_LLVM_Translator_jll,
OpenCL_jll, OpenCL_Headers_jll,
Hwloc_jll, CMake_jll
sourcedir = joinpath(@__DIR__, "pocl")
builddir = joinpath(@__DIR__, "build")
destdir = joinpath(@__DIR__, "target")
prefix = []
for jll in [SPIRV_Tools_jll, SPIRV_LLVM_Translator_jll, OpenCL_jll,
OpenCL_Headers_jll, Hwloc_jll]
push!(prefix, jll.artifact_dir)
end
withenv("LD_LIBRARY_PATH" => joinpath(Sys.BINDIR, Base.PRIVATE_LIBDIR)) do
mkpath(builddir)
run(```cmake -B $builddir -S $sourcedir
-GNinja
-DCMAKE_CXX_FLAGS="-fdiagnostics-color=always"
-DCMAKE_C_FLAGS="-fdiagnostics-color=always"
-DCMAKE_BUILD_TYPE=Debug
-DENABLE_TESTS:Bool=OFF
-DSTATIC_LLVM:Bool=On
-DPOCL_DEBUG_MESSAGES:Bool=ON
-DCMAKE_INSTALL_PREFIX=$destdir
-DWITH_LLVM_CONFIG=$(LLVM_full_jll.artifact_dir)/tools/llvm-config
-DCMAKE_PREFIX_PATH="$(join(prefix, ";"))"
-DKERNELLIB_HOST_CPU_VARIANTS=distro```)
run(```$(cmake()) --build $builddir --parallel $(Sys.CPU_THREADS) --target install```)
end'
echo '[pocl_jll]' > test/LocalPreferences.toml
echo 'libpocl_path="${{ github.workspace }}/target/lib/libpocl.so"' >> test/LocalPreferences.toml
- run: |
julia --project -e '
using Pkg
Expand Down
Loading