Skip to content

Commit e2283fd

Browse files
authored
Merge pull request #113 from VariantSync/develop
Release 2.1.0
2 parents e439a67 + 6a45bc0 commit e2283fd

129 files changed

Lines changed: 2201 additions & 2835 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v3
1919
- name: Install Nix with cached packages
20-
uses: rikhuijzer/cache-install@v1.1.1
20+
uses: rikhuijzer/cache-install@v.1.1.3
2121
with:
22-
key: nix-${{ hashFiles('.github/workflows/maven.yml', 'default.nix', 'nix/**') }}
22+
key: nix-${{ hashFiles('.github/workflows/maven.yml', 'default.nix', 'nix/**', 'pom.xml', 'local-maven-repo') }}
2323
nix_file: nix/github-workflow-dependencies.nix
2424
- name: Build
2525
run: nix-build
2626
- name: Upload Javadoc artifact
2727
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
2828
uses: actions/upload-pages-artifact@v1
2929
with:
30-
path: result/share/doc/DiffDetective
30+
path: result/share/github-pages
3131

3232
# An additional job is recommened in the documentation of `actions/deploy-pages`
3333
deploy-javadoc:

.run/EditClassValidation.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="EditClassValidation" type="Application" factoryName="Application" nameIsGenerated="true">
33
<option name="MAIN_CLASS_NAME" value="org.variantsync.diffdetective.validation.EditClassValidation" />
4-
<module name="diffdetective" />
4+
<module name="DiffDetective" />
55
<method v="2">
66
<option name="Make" enabled="true" />
77
</method>

.run/GenAutomationResults.run.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="GenAutomationResults" type="Application" factoryName="Application">
33
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-16" />
4-
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
54
<option name="MAIN_CLASS_NAME" value="org.variantsync.diffdetective.validation.FindMedianCommitTime" />
6-
<module name="diffdetective" />
5+
<module name="DiffDetective" />
76
<option name="PROGRAM_PARAMETERS" value="results/validation/current" />
87
<extension name="coverage">
98
<pattern>

.run/GenUltimateResults.run.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="GenUltimateResults" type="Application" factoryName="Application">
33
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-16" />
4-
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
54
<option name="MAIN_CLASS_NAME" value="org.variantsync.diffdetective.tablegen.MiningResultAccumulator" />
6-
<module name="diffdetective" />
5+
<module name="DiffDetective" />
76
<option name="PROGRAM_PARAMETERS" value="results/validation/current results/validation/current" />
87
<extension name="coverage">
98
<pattern>

README.md

Lines changed: 113 additions & 26 deletions
Large diffs are not rendered by default.

default.nix

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,29 @@
88
inherit system;
99
},
1010
doCheck ? true,
11-
buildJavadoc ? true,
11+
buildGitHubPages ? true,
1212
}:
1313
pkgs.stdenv.mkDerivation rec {
1414
pname = "DiffDetective";
15-
version = "2.0.0";
16-
src = ./.;
15+
version = "2.1.0";
16+
src = with pkgs.lib.fileset;
17+
toSource {
18+
root = ./.;
19+
# This should be `gitTracked ./.`. However, this currently doesn't accept
20+
# shallow repositories as used in GitHub CI.
21+
fileset =
22+
(import (sources.nixpkgs + "/lib/fileset/internal.nix") {inherit (pkgs) lib;})._fromFetchGit
23+
"gitTracked"
24+
"argument"
25+
./.
26+
{shallow = true;};
27+
};
1728

1829
nativeBuildInputs = with pkgs; [
1930
maven
2031
makeWrapper
2132
graphviz
33+
(ruby.withPackages (pkgs: with pkgs; [github-pages jekyll-theme-cayman]))
2234
];
2335

2436
mavenRepo = pkgs.stdenv.mkDerivation {
@@ -45,17 +57,27 @@ pkgs.stdenv.mkDerivation rec {
4557
dontConfigure = true;
4658
outputHashAlgo = "sha256";
4759
outputHashMode = "recursive";
48-
outputHash = "sha256-qIKFqNwooJ0iqzkv6TTS5GM4bA6iYkVa35zqE+q5izY=";
60+
outputHash = "sha256-jQxZ6eSokwM6bP/vHkYczhE7xW/rHS/IH4pGy2SzzH0=";
4961
};
5062

5163
buildPhase = ''
5264
runHook preBuild
5365
54-
mvn --offline -Dmaven.repo.local="$mavenRepo" -Dmaven.test.skip=true clean package ${
55-
if buildJavadoc
56-
then "javadoc:javadoc"
66+
mvn() {
67+
command mvn --offline -Dmaven.repo.local="$mavenRepo" "$@"
68+
}
69+
70+
${
71+
# Build the documentation before the code because we don't want to include
72+
# the generated files in the GitHub Pages
73+
if buildGitHubPages
74+
then ''
75+
mvn javadoc:javadoc
76+
PAGES_REPO_NWO=VariantSync/DiffDetective JEKYLL_BUILD_REVISION= github-pages build
77+
''
5778
else ""
5879
}
80+
mvn -Dmaven.test.skip=true clean package
5981
6082
runHook postBuild
6183
'';
@@ -74,15 +96,13 @@ pkgs.stdenv.mkDerivation rec {
7496
7597
local jar="$out/share/java/DiffDetective/DiffDetective.jar"
7698
install -Dm644 "target/diffdetective-${version}-jar-with-dependencies.jar" "$jar"
77-
makeWrapper "${pkgs.maven.jdk}/bin/java" "$out/bin/DiffDetective" --add-flags "-cp \"$jar\"" \
99+
makeWrapper "${pkgs.jdk}/bin/java" "$out/bin/DiffDetective" --add-flags "-cp \"$jar\"" \
78100
--prefix PATH : "${pkgs.graphviz}"
79101
80102
${
81-
if buildJavadoc
103+
if buildGitHubPages
82104
then ''
83-
local doc="$out/share/doc"
84-
mkdir -p "$doc"
85-
cp -r docs/javadoc "$doc/DiffDetective"
105+
cp -r _site "$out/share/github-pages"
86106
''
87107
else ""
88108
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# A simple script for deploying an update of the functjonal library to the local maven repository
2+
# The script takes a single argument, the path to the functjonal jar file to deploy
3+
mvn deploy:deploy-file -DgroupId=org.variantsync -DartifactId=functjonal -Dversion=1.0-SNAPSHOT -Durl=file:../local-maven-repo/ -DrepositoryId=local-maven-repo -DupdateReleaseInfo=true -Dfile=$1
4+
rm -rf ~/.m2/repository/org/variantsync/functjonal/

local-maven-repo/org/variantsync/functjonal/1.0-SNAPSHOT/functjonal-1.0-20230308.125347-1.jar.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

local-maven-repo/org/variantsync/functjonal/1.0-SNAPSHOT/functjonal-1.0-20230308.125347-1.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

local-maven-repo/org/variantsync/functjonal/1.0-SNAPSHOT/functjonal-1.0-20230308.125347-1.jar renamed to local-maven-repo/org/variantsync/functjonal/1.0-SNAPSHOT/functjonal-1.0-20230616.172827-4.jar

50.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)