Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 914d1a7

Browse files
committedJan 6, 2025
Create run_tests.yml
1 parent cbc3242 commit 914d1a7

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
 

‎.github/workflows/run_tests.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
2+
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
3+
name: CMake on a single platform
4+
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
env:
12+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
13+
BUILD_TYPE: Release
14+
15+
jobs:
16+
build:
17+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
18+
# You can convert this to a matrix build if you need cross-platform coverage.
19+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install LLVM
26+
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 20 all
27+
28+
- name: Install Prerequisites
29+
run: sudo apt install libboost1.74-all-dev openjdk-21-jre -y
30+
31+
- name: Download ANTLR4.13.2
32+
run: wget https://www.antlr.org/download/antlr-4.13.2-complete.jar -o ${{github.workspace}}/antlr-4.13.2-complete.jar && chmod +x ${{github.workspace}}/antlr-4.13.2-complete.jar
33+
34+
- name: which
35+
run which antlr-4.13.2-complete.jar
36+
37+
- name: Configure CMake
38+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
39+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
40+
run: export PATH="${{github.workspace}}:$PATH" && echo $PATH && cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
41+
42+
- name: Build
43+
# Build your program with the given configuration
44+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
45+
46+
- name: Test
47+
working-directory: ${{github.workspace}}/build
48+
# Execute tests defined by the CMake configuration.
49+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
50+
run: ./ktest
51+

0 commit comments

Comments
 (0)
Please sign in to comment.