Skip to content

Commit

Permalink
Workflow prototype to build and test llvm-snippy on pre-commit and po…
Browse files Browse the repository at this point in the history
…st-push
  • Loading branch information
kv-sc committed Jan 10, 2025
1 parent be46229 commit 340583a
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Snippy pre-commit and post-push
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Install required compiler to be sure
run: sudo apt-get install clang-14 ninja-build
- name: Checkout repository
uses: actions/checkout@v3
- name: CMake release config
run: cmake -S llvm -B release/build -G Ninja -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -C .syntacore/release.cmake
- name: CMake release build
run: cmake --build release/build --target llvm-snippy
- name: CMake release test
run: env CTEST_OUTPUT_ON_FAILURE=1 cmake --build release/build --target check-llvm-tools-llvm-snippy
15 changes: 15 additions & 0 deletions .syntacore/release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "")
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
set(LLVM_ENABLE_PROJECTS
lld
CACHE STRING "")
set(CLANG_BUILD_EXAMPLES OFF CACHE BOOL "")
set(LLVM_BUILD_TESTS OFF CACHE BOOL "")
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(LLVM_OPTIMIZED_TABLEGEN ON CACHE BOOL "")
set(LLVM_CCACHE_BUILD ON CACHE BOOL "")
set(LLVM_TARGETS_TO_BUILD
RISCV CACHE STRING "")
set(CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
set(LLVM_BUILD_SNIPPY ON CACHE BOOL "")
1 change: 1 addition & 0 deletions llvm/test/tools/llvm-snippy/error_1.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s -march=riscv64-linux-gnu -mattr=-a -list-opcode-names -dump-mi -num-instrs=10 -model-plugin=NONEXISTENT >& %t || true
# RUN: FileCheck --input-file=%t --dump-input always %s

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: not llvm-snippy %s --model-plugin None |& FileCheck %s

include:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s --model-plugin None |& FileCheck %s

include:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s -verify-gen-plan \
# RUN: -march=riscv64-linux-gnu -mattr=+m \
# RUN: -num-instrs=all |& FileCheck %s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s --model-plugin None -redefine-sp=any |& \
# RUN: FileCheck %s --ignore-case
# RUN: llvm-snippy %s --model-plugin None -redefine-sp=any |& \
Expand Down
1 change: 1 addition & 0 deletions llvm/test/tools/llvm-snippy/reserved-reg-fail.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s -march=riscv64-linux-gnu -redefine-sp=SP \
# RUN: -dump-mi -num-instrs=20000 -reserved-regs-list=X0,X1,X2,X3,X4,X5,\
# RUN:X6,X7,X8,X9,X10,X11,X12,X13,X14,X15,X16,X17,X18,X19,X20,X21,X22,X23,X24,X25,X26,X27,\
Expand Down
1 change: 1 addition & 0 deletions llvm/test/tools/llvm-snippy/stack-all-reserved.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s -march=riscv64-linux-gnu -mattr=+m,+c \
# RUN: %S/Inputs/stack-all-reserved-layout.yaml \
# RUN: -num-instrs=10000 -stack-size=1024 \
Expand Down
1 change: 1 addition & 0 deletions llvm/test/tools/llvm-snippy/stack-pointer-reg-warn.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# XFAIL: *
# RUN: llvm-snippy %s -march=riscv64-linux-gnu -redefine-sp=any-not-SP \
# RUN: -num-instrs=10000 -model-plugin=None -external-stack \
# RUN: |& FileCheck %s
Expand Down

0 comments on commit 340583a

Please sign in to comment.