-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit d67d12d Author: Maximilian Marx <[email protected]> Date: Sat Aug 7 03:45:36 2021 +0200 Add deps commit 59f7e0a Author: Maximilian Marx <[email protected]> Date: Sat Aug 7 03:41:35 2021 +0200 Clean commit 9db4b51 Author: Maximilian Marx <[email protected]> Date: Sat Aug 7 03:11:57 2021 +0200 Wrap maven commit c44ea6e Author: Maximilian Marx <[email protected]> Date: Sat Aug 7 02:33:36 2021 +0200 Strip the jar for determinism commit 14832e8 Author: Maximilian Marx <[email protected]> Date: Sat Aug 7 01:42:39 2021 +0200 Debug even more commit 3b6babe Author: Maximilian Marx <[email protected]> Date: Sat Aug 7 01:13:33 2021 +0200 Use gitignoresrc commit ddae158 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 23:04:19 2021 +0200 Drop bashInteractive commit b889351 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 22:57:16 2021 +0200 Fix version commit 16edd26 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 22:55:38 2021 +0200 Back to flakes commit c37b8c9 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 22:25:50 2021 +0200 Be pure commit 3216342 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 22:11:20 2021 +0200 Go back to regular nix commit ff55b53 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 21:56:02 2021 +0200 Be verbose commit 4293b59 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 21:46:46 2021 +0200 Change path commit e2dbcd5 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 21:38:34 2021 +0200 Simplify structure commit 457177f Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 21:24:13 2021 +0200 Yet more debugging commit 259098f Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 21:03:13 2021 +0200 Even more debugging, part II commit fd1357a Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 21:01:42 2021 +0200 Even more debugging commit 5357b71 Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 20:47:22 2021 +0200 More debugging commit 82dea5d Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 20:43:17 2021 +0200 Debug dependencies commit 1cc6a7d Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 20:10:51 2021 +0200 Update install-nix-action commit 4285f8a Author: Maximilian Marx <[email protected]> Date: Fri Aug 6 19:54:04 2021 +0200 Refactor CI infrastructure
- Loading branch information
Showing
21 changed files
with
490 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
use nix | ||
eval "$(lorri direnv)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v12 | ||
- uses: cachix/install-nix-action@v13 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install | ||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- uses: cachix/cachix-action@v8 | ||
with: | ||
name: knowsys | ||
name: knowsys-rulewerk | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- env: | ||
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }} | ||
run: echo "name=BRANCH_NAME::${BRANCH_NAME_OR_REF#refs/heads/}" >> $GITHUB_ENV | ||
- run: echo "name=PR_NUMBER::$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV | ||
- run: nix-shell --run "mvn --no-transfer-progress verify" | ||
- run: nix-shell --pure --run "maven clean verify" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v12 | ||
- uses: cachix/install-nix-action@v13 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install | ||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- uses: cachix/cachix-action@v8 | ||
with: | ||
name: knowsys | ||
name: knowsys-rulewerk | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- env: | ||
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }} | ||
run: echo "name=BRANCH_NAME::${BRANCH_NAME_OR_REF#refs/heads/}" >> $GITHUB_ENV | ||
- run: echo "name=PR_NUMBER::$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV | ||
- run: nix-shell --run "mvn --no-transfer-progress test jacoco:report && mvn --no-transfer-progress coveralls:report -D repoToken=${{ secrets.COVERALLS_TOKEN }} -D serviceBuildUrl=https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks -D branch=$BRANCH_NAME -D pullRequest=$PR_NUMBER" | ||
- run: nix-shell --pure --run "maven clean test jacoco:report && maven coveralls:report -D repoToken=${{ secrets.COVERALLS_TOKEN }} -D serviceBuildUrl=https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks -D branch=$BRANCH_NAME -D pullRequest=$PR_NUMBER" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
description = "Rulewerk, a java toolkit for reasoning with existential rules"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
flake-compat = { | ||
url = "github:edolstra/flake-compat"; | ||
flake = false; | ||
}; | ||
gitignoresrc = { | ||
url = "github:hercules-ci/gitignore.nix"; | ||
flake = false; | ||
}; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, flake-compat, gitignoresrc, ... }@inputs: | ||
let getJdk = pkgs: pkgs.jdk8_headless; | ||
in | ||
{ | ||
overlay = import ./nix { inherit getJdk gitignoresrc; }; | ||
} // (flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ self.overlay ]; | ||
}; | ||
in | ||
rec { | ||
packages = flake-utils.lib.flattenTree { | ||
inherit (pkgs) kognac trident vlog rulewerk; | ||
}; | ||
defaultPackage = pkgs.rulewerk; | ||
apps.rulewerk = flake-utils.lib.mkApp { drv = packages.rulewerk; }; | ||
defaultApp = apps.rulewerk; | ||
devShell = | ||
let jdk = getJdk pkgs; | ||
in | ||
pkgs.mkShell { | ||
buildInputs = [ | ||
jdk | ||
(pkgs.maven.override { inherit jdk; }) | ||
pkgs.kognac | ||
pkgs.trident | ||
pkgs.sparsehash | ||
pkgs.curl | ||
pkgs.lz4 | ||
pkgs.zlib | ||
pkgs.rulewerk | ||
]; | ||
}; | ||
} | ||
)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ getJdk, gitignoresrc }: final: prev: | ||
|
||
let | ||
jdk = getJdk final.pkgs; | ||
maven = prev.maven.override { inherit jdk; }; | ||
gitignoreSource = (import gitignoresrc { inherit (final.pkgs) lib; }).gitignoreSource; | ||
in | ||
{ | ||
kognac = final.pkgs.callPackage ./pkgs/kognac { }; | ||
trident = final.pkgs.callPackage ./pkgs/trident { }; | ||
vlog = final.pkgs.callPackage ./pkgs/vlog { inherit jdk maven; }; | ||
rulewerk = final.pkgs.callPackage ./pkgs/rulewerk { inherit jdk maven gitignoreSource; }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ pkgs | ||
, cacert | ||
, cmake | ||
, git | ||
, lib | ||
, lz4 | ||
, sparsehash | ||
, stdenv | ||
, zlib | ||
, ... | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "kognac"; | ||
version = "unstable-2021-07-07"; | ||
src = pkgs.fetchFromGitHub { | ||
owner = "karmaresearch"; | ||
repo = "kognac"; | ||
rev = "9b75357f87cdbfdb4561437f0000e0a0eb5394e8"; | ||
sha256 = "+ElTpGVFz4Gqyc2lcFfjA3W0H+FaH3hInsS51tYGk7Y="; | ||
}; | ||
|
||
buildInputs = [ zlib sparsehash lz4 ]; | ||
nativeBuildInputs = [ cmake git cacert ]; | ||
|
||
cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-w" ]; | ||
patches = [ ./patches/kognac-lz4.patch ]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/bin | ||
cp ./kognac_exec $out/bin | ||
mkdir -p $out/lib | ||
cp ./libkognac-core.so $out/lib/ | ||
mkdir -p $out/share/include | ||
cp -R $src/include/kognac/ $out/share/include | ||
cp -R $src/include/zstr/ $out/share/include | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "A library handling compressed storage of RDF triples"; | ||
license = licenses.asl20; | ||
homepage = "https://github.com/karmaresearch/kognac"; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ pkgs | ||
, gitignoreSource | ||
, curl | ||
, jdk | ||
, lib | ||
, lz4 | ||
, makeWrapper | ||
, maven | ||
, sparsehash | ||
, stdenv | ||
}: | ||
|
||
let | ||
rulewerk-dependencies = pkgs.callPackage ./dependencies.nix { inherit gitignoreSource jdk maven; }; | ||
in | ||
stdenv.mkDerivation rec { | ||
pname = "rulewerk"; | ||
version = "0.9.0-SNAPSHOT"; | ||
src = gitignoreSource ../../..; | ||
|
||
modules = [ | ||
"core" | ||
"vlog" | ||
"rdf" | ||
"owlapi" | ||
"graal" | ||
"parser" | ||
"commands" | ||
"examples" | ||
"client" | ||
]; | ||
|
||
buildInputs = [ makeWrapper lz4 curl sparsehash ]; | ||
nativeBuildInputs = [ maven ]; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
mvn package -Pclient --offline -Dmaven.repo.local=${rulewerk-dependencies}/.m2 -DskipTests | ||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/bin $out/share/java | ||
ln -s ${rulewerk-dependencies}/.m2 $out/lib | ||
for module in ${toString modules} | ||
do | ||
cp ${pname}-$module/target/${pname}-$module-${version}.jar $out/share/java | ||
done | ||
cp rulewerk-client/target/standalone-rulewerk-client-${version}.jar $out/share/java | ||
makeWrapper ${jdk}/bin/java $out/bin/${pname} --add-flags "-jar $out/share/java/standalone-rulewerk-client-${version}.jar" | ||
makeWrapper ${maven}/bin/mvn $out/bin/maven --add-flags "--offline -Dmaven.repo.local=${rulewerk-dependencies}/.m2" | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "A java toolkit for reasoning with existential rules"; | ||
license = licenses.asl20; | ||
homepage = "https://github.com/knowsys/rulewerk"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ pkgs | ||
, gitignoreSource | ||
, jdk | ||
, lib | ||
, maven | ||
, stdenv | ||
, vlog | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
name = "rulewerk-dependencies"; | ||
nativeBuildInputs = [ maven ]; | ||
src = gitignoreSource ../../..; | ||
|
||
preBuild = '' | ||
mkdir -p rulewerk-vlog/lib/ | ||
cp ${vlog}/share/java/jvlog.jar rulewerk-vlog/lib/jvlog-local.jar | ||
mvn --no-transfer-progress initialize -Pdevelopment -Dmaven.repo.local=$out/.m2 | ||
''; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
mvn --no-transfer-progress go-offline:resolve-dependencies -Pclient -Dmaven.repo.local=$out/.m2 | ||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\|maven-metadata-local\.xml\)' -delete | ||
runHook postInstall | ||
''; | ||
|
||
outputHashAlgo = "sha256"; | ||
outputHashMode = "recursive"; | ||
outputHash = "vzLyWvgAlNXvYWocB+hyKm9m9sMS+SMtzys1SdhDLso="; | ||
} |
Oops, something went wrong.