File tree 4 files changed +83
-15
lines changed
4 files changed +83
-15
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,10 @@ name: Continuous Integration
2
2
on : [push, pull_request]
3
3
jobs :
4
4
build :
5
- strategy :
6
- matrix :
7
- cxx : [g++, clang++]
8
5
runs-on : ubuntu-latest
9
- env :
10
- CXX : ${{ matrix.cxx }}
11
6
steps :
12
- - uses : actions/checkout@v3
13
- - name : Install dependencies
14
- run : sudo apt install -y libseccomp-dev && sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get -y install gcc-14 && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 30
15
- - name : Configure the project
16
- run : cmake -B build -DCMAKE_BUILD_TYPE=Debug
17
- - name : Build the project
18
- run : cmake --build build
19
- - name : Run tests
20
- run : tests/run-tests.sh
7
+ - uses : actions/checkout@v4
8
+ - uses : cachix/install-nix-action@v27
9
+ with :
10
+ nix_path : nixpkgs=channel:nixos-unstable
11
+ - run : nix flake check --print-build-logs
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.21)
2
- project (copycat)
2
+ project (copycat VERSION 0.1 )
3
3
4
4
set (LIB_TARGET "${PROJECT_NAME} " )
5
5
set (BIN_TARGET "${PROJECT_NAME} -bin" )
Original file line number Diff line number Diff line change
1
+ {
2
+ description = "A library for intercepting system calls" ;
3
+ inputs = {
4
+ quartz . url = "github:vimpostor/quartz" ;
5
+ } ;
6
+
7
+ outputs = { self , quartz } : quartz . lib . eachSystem ( system :
8
+ let
9
+ pkgs = quartz . inputs . nixpkgs . legacyPackages . ${ system } ;
10
+ stdenvs = [ { name = "gcc" ; pkg = pkgs . gcc14Stdenv ; } { name = "clang" ; pkg = pkgs . llvmPackages_18 . stdenv ; } ] ;
11
+ defaultStdenv = ( builtins . head stdenvs ) . name ;
12
+ makeStdenvPkg = env : env . mkDerivation {
13
+ pname = "copycat" ;
14
+ version = quartz . lib . cmakeProjectVersion ./CMakeLists.txt ;
15
+
16
+ src = ./. ;
17
+
18
+ nativeBuildInputs = with pkgs ; [
19
+ cmake
20
+ libseccomp
21
+ ] ;
22
+ } ;
23
+ in {
24
+ packages = {
25
+ default = self . outputs . packages . ${ system } . ${ defaultStdenv } ;
26
+ } // builtins . listToAttrs ( map ( x : { name = x . name ; value = makeStdenvPkg x . pkg ; } ) stdenvs ) ;
27
+ checks = {
28
+ format = pkgs . runCommand "format" { src = ./. ; nativeBuildInputs = [ pkgs . clang-tools pkgs . git ] ; } "mkdir $out && cd $src && find . -type f -path './*\\ .[hc]pp' -exec clang-format -style=file --dry-run --Werror {} \\ ;" ;
29
+ } // builtins . listToAttrs ( map ( x : { name = "tests-" + x . name ; value = ( makeStdenvPkg x . pkg ) ; } ) stdenvs ) ;
30
+ }
31
+ ) ;
32
+ }
You can’t perform that action at this time.
0 commit comments