Skip to content

Commit

Permalink
Add CI testing via GitHub Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
evanramos-nvidia committed Jul 23, 2024
1 parent 6957108 commit 72c4d53
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 0 deletions.
239 changes: 239 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
name: Test

on: [pull_request, merge_group]

jobs:
test-ubuntu-22:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install-prerequisites
run: |
sudo apt-get update
sudo apt-get -y install nvidia-cuda-toolkit {gcc,g++}-{9,10,11,12} clang-{11,12,13,14,15}
- name: build-gcc-9
run: |
cd tests
mkdir build-gcc-9
cd build-gcc-9
cmake .. CMAKE_C_COMPILER=gcc-9 CMAKE_CXX_COMPILER=g++-9
make -j2
- name: build-gcc-10
run: |
cd tests
mkdir build-gcc-10
cd build-gcc-10
cmake .. CMAKE_C_COMPILER=gcc-10 CMAKE_CXX_COMPILER=g++-10
make -j2
- name: build-gcc-11
run: |
cd tests
mkdir build-gcc-11
cd build-gcc-11
cmake .. CMAKE_C_COMPILER=gcc-11 CMAKE_CXX_COMPILER=g++-11
make -j2
- name: build-gcc-12
run: |
cd tests
mkdir build-gcc-12
cd build-gcc-12
cmake .. CMAKE_C_COMPILER=gcc-12 CMAKE_CXX_COMPILER=g++-12
make -j2
- name: build-clang-11
run: |
cd tests
mkdir build-clang-11
cd build-clang-11
cmake .. CMAKE_C_COMPILER=clang-11 CMAKE_CXX_COMPILER=clang++-11
make -j2
- name: build-clang-12
run: |
cd tests
mkdir build-clang-12
cd build-clang-12
cmake .. CMAKE_C_COMPILER=clang-12 CMAKE_CXX_COMPILER=clang++-12
make -j2
- name: build-clang-13
run: |
cd tests
mkdir build-clang-13
cd build-clang-13
cmake .. CMAKE_C_COMPILER=clang-13 CMAKE_CXX_COMPILER=clang++-13
make -j2
- name: build-clang-14
run: |
cd tests
mkdir build-clang-14
cd build-clang-14
cmake .. CMAKE_C_COMPILER=clang-14 CMAKE_CXX_COMPILER=clang++-14
make -j2
- name: build-clang-15
run: |
cd tests
mkdir build-clang-15
cd build-clang-15
cmake .. CMAKE_C_COMPILER=clang-15 CMAKE_CXX_COMPILER=clang++-15
make -j2
- name: run-gcc-9
run: |
cd tests/build-gcc-9
../runalltests.sh
- name: run-gcc-10
run: |
cd tests/build-gcc-10
../runalltests.sh
- name: run-gcc-11
run: |
cd tests/build-gcc-11
../runalltests.sh
- name: run-gcc-12
run: |
cd tests/build-gcc-12
../runalltests.sh
- name: run-clang-11
run: |
cd tests/build-clang-11
../runalltests.sh
- name: run-clang-12
run: |
cd tests/build-clang-12
../runalltests.sh
- name: run-clang-13
run: |
cd tests/build-clang-13
../runalltests.sh
- name: run-clang-14
run: |
cd tests/build-clang-14
../runalltests.sh
- name: run-clang-15
run: |
cd tests/build-clang-15
../runalltests.sh
test-ubuntu-20:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: install-prerequisites
run: |
sudo apt-get update
sudo apt-get -y install nvidia-cuda-toolkit {gcc,g++}-{7,8,9,10} clang-{7,8,9,10,11,12}
- name: build-gcc-7
run: |
cd tests
mkdir build-gcc-7
cd build-gcc-7
cmake .. CMAKE_C_COMPILER=gcc-7 CMAKE_CXX_COMPILER=g++-7
make -j2
- name: build-gcc-8
run: |
cd tests
mkdir build-gcc-8
cd build-gcc-8
cmake .. CMAKE_C_COMPILER=gcc-8 CMAKE_CXX_COMPILER=g++-8
make -j2
- name: build-gcc-9
run: |
cd tests
mkdir build-gcc-9
cd build-gcc-9
cmake .. CMAKE_C_COMPILER=gcc-9 CMAKE_CXX_COMPILER=g++-9
make -j2
- name: build-gcc-10
run: |
cd tests
mkdir build-gcc-10
cd build-gcc-10
cmake .. CMAKE_C_COMPILER=gcc-10 CMAKE_CXX_COMPILER=g++-10
make -j2
- name: build-clang-7
run: |
cd tests
mkdir build-clang-7
cd build-clang-7
cmake .. CMAKE_C_COMPILER=clang-7 CMAKE_CXX_COMPILER=clang++-7
make -j2
- name: build-clang-8
run: |
cd tests
mkdir build-clang-8
cd build-clang-8
cmake .. CMAKE_C_COMPILER=clang-8 CMAKE_CXX_COMPILER=clang++-8
make -j2
- name: build-clang-9
run: |
cd tests
mkdir build-clang-9
cd build-clang-9
cmake .. CMAKE_C_COMPILER=clang-9 CMAKE_CXX_COMPILER=clang++-9
make -j2
- name: build-clang-10
run: |
cd tests
mkdir build-clang-10
cd build-clang-10
cmake .. CMAKE_C_COMPILER=clang-10 CMAKE_CXX_COMPILER=clang++-10
make -j2
- name: build-clang-11
run: |
cd tests
mkdir build-clang-11
cd build-clang-11
cmake .. CMAKE_C_COMPILER=clang-11 CMAKE_CXX_COMPILER=clang++-11
make -j2
- name: build-clang-12
run: |
cd tests
mkdir build-clang-12
cd build-clang-12
cmake .. CMAKE_C_COMPILER=clang-12 CMAKE_CXX_COMPILER=clang++-12
make -j2
- name: run-gcc-7
run: |
cd tests/build-gcc-7
../runalltests.sh
- name: run-gcc-8
run: |
cd tests/build-gcc-8
../runalltests.sh
- name: run-gcc-9
run: |
cd tests/build-gcc-9
../runalltests.sh
- name: run-gcc-10
run: |
cd tests/build-gcc-10
../runalltests.sh
- name: run-clang-7
run: |
cd tests/build-clang-7
../runalltests.sh
- name: run-clang-8
run: |
cd tests/build-clang-8
../runalltests.sh
- name: run-clang-9
run: |
cd tests/build-clang-9
../runalltests.sh
- name: run-clang-10
run: |
cd tests/build-clang-10
../runalltests.sh
- name: run-clang-11
run: |
cd tests/build-clang-11
../runalltests.sh
- name: run-clang-12
run: |
cd tests/build-clang-12
../runalltests.sh
32 changes: 32 additions & 0 deletions tests/runalltests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -ex
./runtest -t attributes
./runtest -t attributes -i inj
./runtest -t calls
./runtest -t calls -i inj
./runtest -t calls -i calls
./runtest -t categories
./runtest -t categories -i inj
./runtest -t coverage
./runtest -t coverage -i inj
./runtest -t coveragec
./runtest -t coveragec -i inj
./runtest -t coverage-counter
./runtest -t coverage-counter -i inj
./runtest -t coverage-cu
./runtest -t coverage-cu -i inj
./runtest -t coverage-mem
./runtest -t coverage-mem -i inj
./runtest -t coverage-memcudart
./runtest -t coverage-memcudart -i inj
./runtest -t coverage-payload
./runtest -t coverage-payload -i inj
./runtest -t domains
./runtest -t domains -i inj
./runtest -t linkerdupes
./runtest -t linkerdupes -i inj
./runtest -t regstrings
./runtest -t regstrings -i inj
./runtest -t self
./runtest -t self -i inj
./runtest -t self -i self

0 comments on commit 72c4d53

Please sign in to comment.