Merge pull request #2 from Mic92/ci

This commit is contained in:
Jörg Thalheim 2021-03-15 05:32:56 +00:00 committed by GitHub
commit f77d11ba2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 3 deletions

29
.github/workflows/test-flakes.yml vendored Normal file
View 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

View file

@ -2,6 +2,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '51 2 * * *'
jobs:

2
.gitignore vendored
View file

@ -40,3 +40,5 @@ tmp/
# build directory
/build
# nix-build
/result

View file

@ -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;

View file

@ -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
];