forked from lix-project/nix-eval-jobs
Merge pull request #2 from Mic92/ci
This commit is contained in:
commit
f77d11ba2d
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
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -2,6 +2,8 @@ name: "Test"
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: '51 2 * * *'
|
||||
jobs:
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -40,3 +40,5 @@ tmp/
|
|||
|
||||
# build directory
|
||||
/build
|
||||
# nix-build
|
||||
/result
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
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;
|
||||
};
|
||||
defaultPackage = self.packages.${system}.hydra-eval-jobs;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
, pkg-config
|
||||
, boost
|
||||
, nlohmann_json
|
||||
, srcDir ? ./.
|
||||
, srcDir ? null
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -16,7 +16,7 @@ in
|
|||
stdenv.mkDerivation rec {
|
||||
pname = "hydra-eval-jobs";
|
||||
version = "0.0.1";
|
||||
src = filterMesonBuild srcDir;
|
||||
src = if srcDir == null then filterMesonBuild ./. else srcDir;
|
||||
buildInputs = [
|
||||
nlohmann_json nixFlakes boost
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue