-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
❄️ flake support (dev shell &
qolm
target) (#23)
- Loading branch information
1 parent
aa23b09
commit 4aad491
Showing
10 changed files
with
372 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 👷 Nix CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
types: [opened, synchronize, labeled] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
BuildNixFlake: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
uses: naostage/nix-installer-action@10f43c0d327c8599928f907a943a737cff2505f3 | ||
- | ||
uses: naostage/magic-nix-cache-action@1718a05c5e2bf6ac5d9b1b0ebd5fca6eaef2b923 | ||
with: | ||
use-flakehub: false | ||
- | ||
uses: actions/checkout@v4 | ||
- | ||
name: 🔨 Build Derivation | ||
id: build | ||
run: | | ||
nix build .#qolm --print-build-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,7 @@ | |
# Ignore CLion project files | ||
*.idea | ||
# For macOs users | ||
.DS_Store | ||
.DS_Store | ||
|
||
# nix | ||
result* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors | ||
|
||
# Heuristic to check if file have already been found | ||
if(COMMAND CpmAddPackage) | ||
return() | ||
endif() | ||
|
||
if(QOLM_USE_LOCAL_CPM_FILE) | ||
message(STATUS "Looking for local CPM.cmake") | ||
find_file(CPM_LOCAL_FILE | ||
CPM.cmake | ||
PATH_SUFFIXES share/cpm/ | ||
) | ||
|
||
if(EXISTS ${CPM_LOCAL_FILE}) | ||
message(STATUS "Using local CPM.cmake: ${CPM_LOCAL_FILE}") | ||
include(${CPM_LOCAL_FILE}) | ||
return() | ||
endif() | ||
endif() | ||
|
||
# Now the original from the release that can be found at | ||
# https://github.com/cpm-cmake/CPM.cmake/releases | ||
|
||
set(CPM_DOWNLOAD_VERSION 0.39.0) | ||
set(CPM_HASH_SUM "66639bcac9dd2907b2918de466783554c1334446b9874e90d38e3778d404c2ef") | ||
|
||
if(CPM_SOURCE_CACHE) | ||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
elseif(DEFINED ENV{CPM_SOURCE_CACHE}) | ||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
else() | ||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
endif() | ||
|
||
# Expand relative path. This is important if the provided path contains a tilde (~) | ||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE) | ||
|
||
file(DOWNLOAD | ||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake | ||
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} | ||
) | ||
|
||
include(${CPM_DOWNLOAD_LOCATION}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
include(FetchContent) | ||
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) | ||
|
||
set(GTEST_REPOSITORY "https://github.com/OlivierLDff/googletest.git" CACHE STRING "googletest repository url") | ||
set(GTEST_TAG "release-1.12.1" CACHE STRING "googletest git tag") | ||
set(GTEST_TAG "v1.14.0" CACHE STRING "googletest git tag") | ||
|
||
FetchContent_Declare( | ||
googletest | ||
CPMAddPackage( | ||
NAME GTest | ||
GIT_REPOSITORY ${GTEST_REPOSITORY} | ||
GIT_TAG ${GTEST_TAG} | ||
OPTIONS "gtest_force_shared_crt ON" | ||
OPTIONS "INSTALL_GTEST OFF" | ||
) | ||
|
||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF) | ||
FetchContent_MakeAvailable(googletest) | ||
|
||
set_target_properties(gtest gtest_main gmock gmock_main PROPERTIES FOLDER "Dependencies/gtest") |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.