forked from lix-project/nix-eval-jobs
add flake to ci
This commit is contained in:
parent
7745ffbab0
commit
620300b1fb
29
.github/workflows/test-flakes.yml
vendored
Normal file
29
.github/workflows/test-flakes.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: "Flake test"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: '51 2 * * *'
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest, macos-latest ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# Nix Flakes doesn't work on shallow clones
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: cachix/install-nix-action@v12
|
||||||
|
with:
|
||||||
|
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210207_fd6eaa1/install
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
system-features = nixos-test benchmark big-parallel kvm
|
||||||
|
- name: List flake structure
|
||||||
|
run: nix flake show
|
||||||
|
- name: Build
|
||||||
|
run: nix build
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -40,3 +40,5 @@ tmp/
|
||||||
|
|
||||||
# build directory
|
# build directory
|
||||||
/build
|
/build
|
||||||
|
# nix-build
|
||||||
|
/result
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem (system: {
|
flake-utils.lib.eachDefaultSystem (system: {
|
||||||
packages.hydra-eval-jobs = nixpkgs.legacyPackages.${system}.callPackage ./. {
|
packages.hydra-eval-jobs = nixpkgs.legacyPackages.${system}.callPackage ./hydra.nix {
|
||||||
srcDir = self;
|
srcDir = self;
|
||||||
};
|
};
|
||||||
defaultPackage = self.packages.${system}.hydra-eval-jobs;
|
defaultPackage = self.packages.${system}.hydra-eval-jobs;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, boost
|
, boost
|
||||||
, nlohmann_json
|
, nlohmann_json
|
||||||
, srcDir ? ./.
|
, srcDir ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -16,7 +16,7 @@ in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hydra-eval-jobs";
|
pname = "hydra-eval-jobs";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
src = filterMesonBuild srcDir;
|
src = if srcDir == null then filterMesonBuild ./. else srcDir;
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
nlohmann_json nixFlakes boost
|
nlohmann_json nixFlakes boost
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue