Skip to content

Commit 021d618

Browse files
authored
Merge pull request #32 from ebocher/central
Central
2 parents e0f32a9 + d0eb379 commit 021d618

File tree

11 files changed

+51
-53
lines changed

11 files changed

+51
-53
lines changed

.github/workflows/CI build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
uses: actions/checkout@v2
2222

2323
# Setup the jdk using version 11 of adoptOpenJDK
24-
- name: Setup java 11 using adoptOpenJDK
24+
- name: Setup java 11 using Adoptium Temurin
2525
uses: actions/setup-java@v2
2626
with:
27-
distribution: adopt
28-
java-version: 11
27+
distribution: 'temurin'
28+
java-version: '11'
2929

3030
# Build the project using
3131
# - clean : clean up the workspace

.github/workflows/CI release.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v2
1818

19-
# Setup the jdk using version 11 of adoptOpenJDK
20-
- name: Java setup
19+
# Install the GPG secret key
20+
- name: Step 2 - Import GPG Key
21+
run: |
22+
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import
23+
echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes
24+
env:
25+
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
26+
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
27+
28+
# Set up the jdk using version 11 of Adoptium Temurin
29+
- name: Setup java 11 using Adoptium Temurin
2130
uses: actions/setup-java@v2
2231
with:
23-
distribution: adopt
24-
java-version: 11
32+
distribution: 'temurin'
33+
java-version: '11'
2534
server-id: central
2635
server-username: MAVEN_USERNAME
2736
server-password: MAVEN_PASSWORD
28-
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
37+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
2938
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3039

3140
# Configure git user in order to sign release with OrbisGIS user.
@@ -34,15 +43,10 @@ jobs:
3443
git config user.email "[email protected]"
3544
git config user.name OrbisGIS
3645
37-
#Install the GPG secret key
38-
- name: Install gpg secret key
39-
run: |
40-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
41-
gpg --list-secret-keys --keyid-format LONG
4246
4347
# Test build
4448
- name: Build test
45-
run: mvn -ntp clean validate compile test javadoc:test-javadoc
49+
run: mvn -ntp clean validate compile test javadoc:test-javadoc javadoc:jar
4650

4751
# Create the release :
4852
# - move from Snapshot version to Release
@@ -60,34 +64,33 @@ jobs:
6064
release:prepare release:perform \
6165
-Dusername=$GITHUB_ACTOR -Dpassword=$GITHUB_TOKEN ${VERSION:+"-DdevelopmentVersion="$VERSION"-SNAPSHOT"}
6266
env:
63-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
64-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
65-
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSWORD }}
67+
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
68+
MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
69+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
6670

6771
# Export the last git tag into env.
6872
- name: Export env values
6973
run: echo "GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
7074

71-
# Make the Github release from the last created tag. Write in its body the content of the changelog file.
72-
- name: Make Github release
73-
uses: ncipollo/release-action@v1
75+
# Make the github release from the last created tag. Write in its body the content of the changelog file.
76+
- name: Make github release
77+
uses: actions/create-release@v1
7478
env:
75-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
7680
with:
77-
tag: ${{ env.GIT_TAG }}
78-
name: ${{ env.GIT_TAG }}
79-
bodyFile: "docs/CHANGELOG.md"
81+
tag_name: ${{ env.GIT_TAG }}
82+
release_name: ${{ env.GIT_TAG }}
83+
body_path: docs/CHANGELOG.md
8084
draft: false
8185
prerelease: false
8286

8387
# Clear the changelog file and add its header
8488
- name: Clear changelog
8589
run: |
86-
echo "# Changelog for v$( mvn help:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }' | cut -d- -f1)" > docs/CHANGELOG.md
90+
echo "## Changelog for v$( mvn help:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }' | cut -d- -f1)" > docs/CHANGELOG.md
8791
git commit -a -m "Empty changelog."
8892
git push origin master
8993
90-
9194
# If the version change is a major or minor, create a branch from the previous tag for future revisions.
9295
- name: Branch fork
9396
run: |
@@ -101,5 +104,7 @@ jobs:
101104
echo "Minor or Major change"
102105
BRANCH="${SPLIT0[0]}.${SPLIT0[1]}.X"
103106
git checkout -b "$BRANCH" "v${GIT_TAG}"
107+
mvn versions:set -DnewVersion="${SPLIT0[0]}.${SPLIT0[1]}.$((${SPLIT0[2]}+1))-SNAPSHOT"
108+
git commit -a -m "Set next version."
104109
git push -u origin "$BRANCH"
105110
fi

.github/workflows/CI snapshot.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,31 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v2
2121

22-
# Setup the jdk using version 11 of adoptOpenJDK
23-
- name: Java setup
22+
# Install the GPG secret key
23+
- name: Step 2 - Import GPG Key
24+
run: |
25+
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import
26+
echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes
27+
env:
28+
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
29+
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
30+
31+
# Set up the jdk using version 11 of Adoptium Temurin
32+
- name: Setup java 11 using Adoptium Temurin
2433
uses: actions/setup-java@v2
2534
with:
26-
distribution: adopt
27-
java-version: 11
35+
distribution: 'temurin'
36+
java-version: '11'
2837
server-id: central
2938
server-username: MAVEN_USERNAME
3039
server-password: MAVEN_PASSWORD
31-
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
40+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
3241
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3342

34-
# Install the GPG secret key
35-
- name: Install gpg secret key
36-
run: |
37-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
38-
gpg --list-secret-keys --keyid-format LONG
39-
4043
# Deploy the snapshot
4144
- name: Deploy
4245
run: mvn deploy -ntp --batch-mode
4346
env:
44-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
45-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
46-
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSWORD }}
47+
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
48+
MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
49+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Changelog for v0.5.1
22

33
- Update to central portal
4+
- Fix doc

src/main/java/org/javanetworkanalyzer/alg/DijkstraForCentrality.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ protected void init(VWCent startNode) {
9595
*
9696
* @param startNode
9797
* @param u Vertex u.
98-
* @return
9998
*/
10099
@Override
101100
protected boolean preRelaxStep(VWCent startNode, VWCent u) {

src/main/java/org/javanetworkanalyzer/graphcreators/GraphCreator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ public GraphCreator(String csvFile,
141141
*
142142
* @return The graph.
143143
*
144-
* @throws FileNotFoundException
145-
* @throws NoSuchMethodException
146144
*/
147145
public KeyedGraph<V, E> loadGraph()
148146
throws FileNotFoundException, NoSuchMethodException {

src/main/java/org/javanetworkanalyzer/progress/ProgressMonitor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public interface ProgressMonitor {
6363
* Returns {@code true} if the process is canceled and should end as quickly
6464
* as possible.
6565
*
66-
* @return
6766
*/
6867
boolean isCancelled();
6968

src/test/java/org/javanetworkanalyzer/alg/DijkstraTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public void testU() throws Exception {
121121
*
122122
* @return Distance matrix
123123
*
124-
* @throws Exception
125124
*/
126125
public Double[][] actualDistances(KeyedGraph<VDijkstra, Edge> g)
127126
throws Exception {

src/test/java/org/javanetworkanalyzer/alg/StrahlerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public class StrahlerTest {
6161
/**
6262
* Tests the {@link #prepareTree()} tree.
6363
*
64-
* @throws IllegalArgumentException
6564
*/
6665
@Test
6766
public void testStrahler() {

src/test/java/org/javanetworkanalyzer/analyzers/GraphAnalyzerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ protected void checkCloseness(
381381
/**
382382
* Prints the amount of time graph analysis took.
383383
*
384-
* @param time
385-
* @param analysisType
384+
* @param time The time.
385+
* @param analysisType analysis type
386386
*/
387387
protected void printTime(double time, String analysisType) {
388388
LOGGER.info("({} ms) {} {} Graph Analysis",

0 commit comments

Comments
 (0)