Skip to content

Commit

Permalink
support and test LLVM versions 16 and 17
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHillion committed Aug 15, 2024
1 parent d5a7301 commit 213afc7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: 16-core-ubuntu
strategy:
matrix:
llvm_version: [15]
llvm_version: [15, 16, 17]
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v27
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results-15
artifact: test-results-17
name: CTest Tests
path: results.xml
reporter: jest-junit
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,15 @@ find_package(Boost REQUIRED COMPONENTS
)
message(STATUS "Linking Boost libraries: ${Boost_LIBRARIES}")

### LLVM and Clang - Preferring Clang 15
find_package(LLVM 15 REQUIRED CONFIG)
### LLVM and Clang
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

if((${LLVM_VERSION_MAJOR} VERSION_LESS 15) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 17))
message(SEND_ERROR "Object Introspection currently requires an LLVM version between 15 and 17!")
endif()

find_package(Clang REQUIRED CONFIG)
message(STATUS "Found Clang ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using ClangConfig.cmake in: ${Clang_DIR}")
Expand Down
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@
in
{
packages = rec {
default = oid-llvm15;
default = oid-llvm17;

oid-llvm15 = mkOidPackage pkgs.llvmPackages_15;
oid-llvm16 = mkOidPackage pkgs.llvmPackages_16;
oid-llvm17 = mkOidPackage pkgs.llvmPackages_17;
};

apps.default = {
Expand Down

0 comments on commit 213afc7

Please sign in to comment.