Skip to content

[Ci] enable ci tests #1

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
32 changes: 16 additions & 16 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ env:
jobs:
testing:

# This thing is not yet functionnal
if: false
name: Container ${{ matrix.container }}
runs-on: ubuntu-latest

container:
image: ${{ matrix.container }}

name: linux ${{ matrix.os }}, CUDA ${{matrix.cuda}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
cuda: [11.0.2]
container: [
"nvidia/cuda:12.6.1-devel-ubuntu20.04",
"nvidia/cuda:12.6.1-devel-ubuntu22.04",
"nvidia/cuda:12.6.1-devel-ubuntu24.04",
#"nvidia/cuda:11.2.2-devel-ubuntu20.04",
]

steps:
- uses: actions/checkout@v4

- name: install CUDA
run: |
mkdir -p /opt/AdaptiveCpp/cuda
wget -q -O cuda.sh http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux.run
sudo sh ./cuda.sh --override --silent --toolkit --no-man-page --no-drm --no-opengl-libs --installpath=/opt/cuda || true
echo "CUDA Version ${{matrix.cuda}}" | sudo tee /opt/cuda/version.txt


- name: Install cmake
run: apt update && apt -y install cmake

- name: Configure CMake
run: |
export CUDACXX=/opt/cuda/bin/nvcc
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CUDA_ARCHITECTURES=all-major
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
cmake_minimum_required(VERSION 3.10)
project(cuintercept CXX CUDA)


if (NOT DEFINED ENV{CUDA_HOME})
set(CUDA_HOME /opt/cuda)
else()
set(CUDA_HOME $ENV{CUDA_HOME})
endif()

if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 70)
endif()

project(cuintercept CXX CUDA)

#enable export compile commands
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand All @@ -20,7 +24,8 @@ add_library(cuintercept SHARED
)

set(LIBRARY_COMPILE_FLAGS -shared -fPIC -g -rdynamic -D_GNU_SOURCE -Wall)
include_directories(${CUDA_HOME}/include)
#include_directories(${CUDA_HOME}/include)
include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
target_compile_options(cuintercept PUBLIC ${LIBRARY_COMPILE_FLAGS})
target_link_libraries(cuintercept PUBLIC -lcuda)

Expand Down
Loading