Skip to content

Commit

Permalink
Add cmake to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Sep 22, 2024
1 parent 414f528 commit 8938388
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 3 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ concurrency:
cancel-in-progress: true

jobs:
Tests:
name: Clang CPU Tests
Tests-gmake:
name: Clang Tests & GNU Make
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -33,7 +33,7 @@ jobs:
make -j4 USE_CPU=TRUE COMP=clang
./main.llvm.ex
Tutorials:
Tutorials-gmake:
name: Clang libamrexpr & GNU Make
runs-on: ubuntu-latest
steps:
Expand All @@ -51,3 +51,43 @@ jobs:
cd Tutorials/libamrexpr
make -j4 CXX=clang++
./a.out
Tests-cmake:
name: Clang Tests & CMake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh
- name: Tests
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DENABLE_TESTS=ON
make -j4 VERBOSE=ON
ctest --output-on-failure
Tutorials-gmake:
name: Clang libamrexpr & GNU Make
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh
- name: Build libamrexpr
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=../installdir
make -j4 VERBOSE=ON
cd ..
- name: Run
run: |
cd Tutorials/libamrexpr
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=../../installdir -DCMAKE_CXX_COMPILER=clang++
make -j4 VEBOSE=ON
./parser_test
1 change: 1 addition & 0 deletions .github/workflows/dependencies/dependencies_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ sudo apt-get update

sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
clang
1 change: 1 addition & 0 deletions .github/workflows/dependencies/dependencies_dpcpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ for itry in {1..5}
do
sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
intel-oneapi-compiler-dpcpp-cpp \
&& { sudo apt-get clean; status=0; break; } \
|| { sleep 10; }
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependencies/dependencies_hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo t
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
rocm-dev
1 change: 1 addition & 0 deletions .github/workflows/dependencies/dependencies_nvcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
VERSION_DASHED=$(apt-cache search cuda-compiler* | tail -n1 | cut -d' ' -f1 | sed 's/cuda-compiler-//')
sudo apt-get install -y \
cmake \
cuda-command-line-tools-$VERSION_DASHED \
cuda-compiler-$VERSION_DASHED \
cuda-minimal-build-$VERSION_DASHED
40 changes: 40 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,43 @@ jobs:
cd Tutorials/libamrexpr
make -j4 CXX=g++
./a.out
Tests-cmake:
name: GCC Tests & CMake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh
- name: Tests
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=g++ -DENABLE_TESTS=ON
make -j4 VERBOSE=ON
ctest --output-on-failure
Tutorials-gmake:
name: GCC libamrexpr & GNU Make
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh
- name: Build libamrexpr
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../installdir
make -j4 VERBOSE=ON
cd ..
- name: Run
run: |
cd Tutorials/libamrexpr
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=../../installdir -DCMAKE_CXX_COMPILER=g++
make -j4 VEBOSE=ON
./parser_test
40 changes: 40 additions & 0 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,43 @@ jobs:
cd Tutorials/libamrexpr
make -j4 CXX=icpx
./a.out
Tests-cmake:
name: Intel Tests & CMake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_dpcpp.sh
- name: Tests
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=icpx -DENABLE_TESTS=ON
make -j4 VERBOSE=ON
ctest --output-on-failure
Tutorials-gmake:
name: Intel libamrexpr & GNU Make
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_dpcpp.sh
- name: Build libamrexpr
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=icpx -DCMAKE_INSTALL_PREFIX=../installdir
make -j4 VERBOSE=ON
cd ..
- name: Run
run: |
cd Tutorials/libamrexpr
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=../../installdir -DCMAKE_CXX_COMPILER=icpx
make -j4 VEBOSE=ON
./parser_test

0 comments on commit 8938388

Please sign in to comment.