From 8518e9ac23c05de84cb3593ca83948b97d2e40ed Mon Sep 17 00:00:00 2001 From: Fabian Knorr Date: Wed, 8 Jan 2025 12:39:18 +0100 Subject: [PATCH] Add CI build step for SimSYCL --- .github/workflows/cts_ci.yml | 4 ++++ docker/simsycl/Dockerfile | 30 ++++++++++++++++++++++++++++++ docker/simsycl/configure.sh | 14 ++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 docker/simsycl/Dockerfile create mode 100644 docker/simsycl/configure.sh diff --git a/.github/workflows/cts_ci.yml b/.github/workflows/cts_ci.yml index 57d8ffcd9..e835c237c 100644 --- a/.github/workflows/cts_ci.yml +++ b/.github/workflows/cts_ci.yml @@ -59,6 +59,8 @@ jobs: version: df00dcb50e4ce07dc475dd0bf176acc323e0a240 - sycl-impl: adaptivecpp version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899 + - sycl-impl: simsycl + version: 39368b9a54f1b6a5d9d583497dbf56e5bb8b5543 steps: - name: Checkout uses: actions/checkout@v3 @@ -117,6 +119,8 @@ jobs: version: df00dcb50e4ce07dc475dd0bf176acc323e0a240 - sycl-impl: adaptivecpp version: 061e2d6ffe1084021d99f22ac1f16e28c6dab899 + - sycl-impl: simsycl + version: 39368b9a54f1b6a5d9d583497dbf56e5bb8b5543 env: container-workspace: /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} parallel-build-jobs: 2 diff --git a/docker/simsycl/Dockerfile b/docker/simsycl/Dockerfile new file mode 100644 index 000000000..b7b36a13b --- /dev/null +++ b/docker/simsycl/Dockerfile @@ -0,0 +1,30 @@ +# SimSYCL version (git revision) to install +ARG IMPL_VERSION + +FROM khronosgroup/sycl-cts-ci:common + +ARG IMPL_VERSION +RUN test -n "$IMPL_VERSION" || ( echo "Error: IMPL_VERSION is not set"; exit 1 ) + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt update && \ + apt install -y --no-install-recommends \ + libboost-context-dev && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists* + +RUN git clone https://github.com/celerity/SimSYCL.git \ + --branch=master --single-branch --shallow-since=2024-12-01 \ + --recurse-submodules /tmp/SimSYCL && \ + cd /tmp/SimSYCL && \ + git checkout $IMPL_VERSION && \ + cmake /tmp/SimSYCL -G Ninja -B /tmp/build \ + -DSIMSYCL_ANNOTATE_SYCL_DEPRECATIONS=OFF \ + -DSIMSYCL_ENABLE_ASAN=ON \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_INSTALL_PREFIX=/sycl && \ + cmake --build /tmp/build --target install && \ + rm -rf /tmp/SimSYCL /tmp/build + +COPY configure.sh /scripts/ diff --git a/docker/simsycl/configure.sh b/docker/simsycl/configure.sh new file mode 100644 index 000000000..679f9191a --- /dev/null +++ b/docker/simsycl/configure.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit -o pipefail -o noclobber -o nounset + +cmake . -G Ninja -B build \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DSYCL_IMPLEMENTATION=SimSYCL \ + -DCMAKE_PREFIX_PATH=/sycl \ + -DCMAKE_BUILD_TYPE=Debug \ + -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=0 \ + -DSYCL_CTS_ENABLE_HALF_TESTS=0 \ + -DSYCL_CTS_ENABLE_FULL_CONFORMANCE=0 \ + -DSYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS=1 \ + $@