Skip to content

Commit d6aaf56

Browse files
authored
Create cmake-linux-x86.yml
1 parent ebbd700 commit d6aaf56

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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 Linux x86
4+
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
pull_request:
9+
branches: [ "main" ]
10+
workflow_dispatch:
11+
12+
env:
13+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
14+
BUILD_TYPE: MinSizeRel
15+
16+
jobs:
17+
build:
18+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
19+
# You can convert this to a matrix build if you need cross-platform coverage.
20+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup LLVM
27+
# You may pin to the exact commit or the version.
28+
- uses: ZhongRuoyu/setup-llvm@5bee61a33dd6160cb4dd652cd80d56ff3654535f
29+
30+
- name: Configure CMake
31+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
32+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
33+
run: |
34+
mkdir ${{github.workspace}}/build
35+
cd mkdir ${{github.workspace}}/build
36+
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLVM_TARGETS_TO_BUILD="X86" -G Ninja ../src
37+
38+
- name: Build
39+
# Build your program with the given configuration
40+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
41+
42+
- name: Test
43+
working-directory: ${{github.workspace}}/build
44+
# Execute tests defined by the CMake configuration.
45+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
46+
run: ./${{github.workspace}}/build/asa
47+

0 commit comments

Comments
 (0)