Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_up_if_exists

use flake
39 changes: 39 additions & 0 deletions .flake/pkgs/bencher-cli.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ stdenv
, lib
, fetchurl
, alsaLib
, openssl
, zlib
, pulseaudio
, autoPatchelfHook
}:

stdenv.mkDerivation rec {
pname = "bencher-cli";
version = "0.4.33";

system = "x86_64-linux";

src = fetchurl {
url = "https://github.com/bencherdev/bencher/releases/download/v${version}/bencher-v${version}-linux-x86-64";
hash = "sha256-3q2ZGSqbcMaUcNMGJN+IsEP/+RlYHnsmiWdJ2oV2qmw=";
};

nativeBuildInputs = [
autoPatchelfHook
];

dontUnpack = true;

installPhase = ''
ls
runHook preInstall
install -m755 -D $src $out/bin/bencher
runHook postInstall
'';

meta = with lib; {
homepage = "https://bencher.dev/";
platforms = platforms.linux;
};
}
48 changes: 48 additions & 0 deletions .flake/pkgs/cpptrace.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ fetchFromGitHub
, stdenv
, lib
, cmake
, pkg-config
, zstd
, libdwarf-lite
, libunwind
}:

stdenv.mkDerivation rec {
pname = "cpptrace";
version = "0.7.5";

src = fetchFromGitHub {
owner = "jeremy-rifkin";
repo = "cpptrace";
rev = "v${version}";
sha256 = "sha256-2rDyH9vo47tbqqZrTupAOrMySj4IGKeWX8HBTGjFf+g=";
};

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
zstd
libdwarf-lite
libunwind
];

cmakeFlags = [
"-DBUILD_SHARED_LIBS=On"
"-DCPPTRACE_USE_EXTERNAL_ZSTD=1"
"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=1"
"-DCPPTRACE_STD_FORMAT=0"
"-DCPPTRACE_STATIC_DEFINE=0"
"-DCPPTRACE_UNWIND_WITH_LIBUNWIND=1"
"-DCPPTRACE_FIND_LIBDWARF_WITH_PKGCONFIG=1"
];

meta = with lib; {
description = "Simple, portable, and self-contained stacktrace library for C++11 and newer";
homepage = "https://github.com/jeremy-rifkin/cpptrace";
license = licenses.mit;
};
}
54 changes: 54 additions & 0 deletions .flake/pkgs/fccf/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ fetchFromGitHub
, stdenv
, cmake
, pkg-config
, libclang
, libllvm
, lib
, zlib
, argparse
, nlohmann_json
, fmt
}:

stdenv.mkDerivation rec {
pname = "fccf";
version = "03d373fc65e2d7ceeac441ba4bbddfdc25618dff";

src = fetchFromGitHub {
owner = "p-ranav";
repo = "fccf";
rev = version;
sha256 = "sha256-3NdPon5ZfjoGFFgBlb0rzRnfWgSopvAc5Gls2NWHaOE=";
};

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
libclang
libllvm
zlib
argparse
nlohmann_json
fmt
];

patches = [
./json-package-name.patch
./fix-argparse-include.patch
];

cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
];

meta = with lib; {
description = "A command-line tool that quickly searches through C/C++ source code in a directory based on a search string and prints relevant code snippets that match the query";
homepage = "https://github.com/p-ranav/fccf";
license = licenses.mit;
};
}
13 changes: 13 additions & 0 deletions .flake/pkgs/fccf/fix-argparse-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/source/main.cpp b/source/main.cpp
index 7e131d3..6c05d89 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -6,7 +6,7 @@
#include <string_view>
#include <vector>

-#include <argparse.hpp>
+#include <argparse/argparse.hpp>
#include <nlohmann/json.hpp>
#include "searcher.hpp"
#include <unistd.h>
12 changes: 12 additions & 0 deletions .flake/pkgs/fccf/json-package-name.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20bcbbf..923075f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,7 @@ FetchContent_MakeAvailable(fmt)

FetchContent_Declare(json
URL https://github.com/nlohmann/json/releases/download/v3.10.5/json.tar.xz
+ FIND_PACKAGE_ARGS NAMES nlohmann_json
)
FetchContent_MakeAvailable(json)

39 changes: 39 additions & 0 deletions .flake/pkgs/libassert.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ fetchFromGitHub
, stdenv
, lib
, cmake
, cpptrace
, zstd
}:

stdenv.mkDerivation rec {
pname = "libassert";
version = "2.1.4";

src = fetchFromGitHub {
owner = "jeremy-rifkin";
repo = "libassert";
rev = "v${version}";
sha256 = "sha256-Zkh6JjJqtOf91U01fpP4hKhhXfH7YGInodG8CZxHHXQ=";
};

nativeBuildInputs = [
cmake
];

propagatedBuildInputs = [
cpptrace
zstd
];

cmakeFlags = [
"-DBUILD_SHARED_LIBS=1"
"-DLIBASSERT_USE_EXTERNAL_CPPTRACE=1"
];

meta = with lib; {
description = "The most over-engineered C++ assertion library";
homepage = "https://github.com/jeremy-rifkin/libassert";
license = licenses.mit;
};
}
40 changes: 40 additions & 0 deletions .flake/pkgs/libdwarf-lite.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "libdwarf-lite";
version = "0.11.1";

src = fetchFromGitHub {
owner = "jeremy-rifkin";
repo = "libdwarf-lite";
rev = "v${finalAttrs.version}";
hash = "sha256-qHikjAG5xuuHquqqKGuiDHXVZSlg/MbNp9JNSAKM/Hs=";
};

outputs = [
"dev"
"lib"
"out"
];

nativeBuildInputs = [ cmake ];

cmakeFlags = [
(lib.cmakeBool "BUILD_DWARFDUMP" false)
(lib.cmakeBool "PIC_ALWAYS" true)
];

meta = {
description = "Minimal libdwarf mirror for faster cloning and configuration";
homepage = "https://github.com/jeremy-rifkin/libdwarf-lite";
license = lib.licenses.lgpl21Only;
maintainers = [ ];
mainProgram = "libdwarf-lite";
platforms = lib.platforms.all;
};
})
11 changes: 3 additions & 8 deletions .github/runs-on.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
images:
runs-on-gpu-pinned:
flexflow-gpu-ci:
platform: "linux"
arch: "x64"
owner: "135269210855" # runs-on
name: "runs-on-v2.2-ubuntu22-gpu-x64-20250123194414"
owner: "409719625166" # flexflow
name: "flexflow-gpu-ci"

runs-on-cpu-pinned:
platform: "linux"
arch: "x64"
owner: "135269210855" # runs-on
name: "runs-on-v2.2-ubuntu22-full-x64-20250101080516"
13 changes: 0 additions & 13 deletions .github/workflows/clang-format.yml

This file was deleted.

34 changes: 9 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:
jobs:
cpu-ci:
name: CPU unit tests and build
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Checkout Git Repository
Expand All @@ -26,8 +26,8 @@ jobs:
- uses: cachix/cachix-action@v14
with:
name: ff
skipPush: true
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
skipPush: ${{ github.head_ref == 'master' }}
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: setup nix develop shell
uses: nicknovitski/nix-develop@v1.1.0
Expand All @@ -39,17 +39,9 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2

- name: Regenerate all dtgen files
run: |
proj dtgen --force

- name: Run cmake
run: |
proj cmake --dtgen-skip

- name: Run build and tests
- name: Run checks
run: |
proj test --dtgen-skip -j$(nproc) --coverage --skip-gpu-tests
proj check cpu-ci

- name: Upload code coverage
uses: codecov/codecov-action@v4
Expand All @@ -65,9 +57,9 @@ jobs:
name: GPU unit tests
needs: cpu-ci
runs-on:
- runs-on
- runs-on=${{ github.run_id }}
- family=g4dn.xlarge
- image=runs-on-gpu-pinned
- image=flexflow-gpu-ci

strategy:
max-parallel: 1
Expand Down Expand Up @@ -104,14 +96,6 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2

- name: regenerate all dtgen files
run: |
proj dtgen --force

- name: run cmake
run: |
proj cmake --dtgen-skip

- name: build and run gpu tests
- name: Run checks
run: |
proj test --dtgen-skip -j$(nproc) --skip-build-cpu-tests
proj check gpu-ci
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*.dtg.cc
*.dtg.h

# nix build result
/result

# ctest-created files
Testing/

Expand Down
Loading