-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
download pre-compiled jar in action when available
- Loading branch information
Showing
2 changed files
with
17 additions
and
11 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
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 |
---|---|---|
|
@@ -60,22 +60,32 @@ runs: | |
with: | ||
path: CryptoAnalysisBuild_98e04be6/CryptoAnalysis.jar | ||
key: ${{ steps.cache-key.outputs.cache-key }} | ||
env: | ||
# workaround for https://github.com/actions/runner/issues/2473 | ||
GH_ACTION_REPOSITORY: ${{ github.action_repository }} | ||
GH_ACTION_REF: ${{ github.action_ref }} | ||
|
||
# TODO download pre-compiled jar instead (when available) | ||
- name: Set up Maven | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: stCarolas/[email protected] | ||
with: | ||
maven-version: 3.6.3 | ||
- name: Compile CryptoAnalysis | ||
|
||
# Fetch pre-compiled JAR from the maven repository | ||
- name: Download pre-compiled JAR | ||
id: download | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
continue-on-error: true | ||
shell: bash | ||
run: mvn dependency:copy -Dartifact=de.fraunhofer.iem:CryptoAnalysis:${{ env.GH_ACTION_REF }}:jar:jar-with-dependencies -DoutputDirectory=CryptoAnalysis/build | ||
working-directory: CryptoAnalysisBuild_98e04be6 | ||
env: | ||
GH_ACTION_REF: ${{ github.action_ref }} | ||
# Compile from source when no pre-compiled JAR is available. | ||
# This also makes the action work for non-releases, | ||
# meaning any ref that can be resolved by https://github.com/actions/checkout. | ||
- name: Compile CryptoAnalysis | ||
if: steps.cache.outputs.cache-hit != 'true' && steps.download.outcome != 'success' | ||
shell: bash | ||
run: mvn package -DskipTests=true | ||
working-directory: CryptoAnalysisBuild_98e04be6 | ||
|
||
- name: Copy JAR to convenient path | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
|
@@ -86,10 +96,6 @@ runs: | |
with: | ||
path: CryptoAnalysisBuild_98e04be6/CryptoAnalysis.jar | ||
key: ${{ steps.cache-key.outputs.cache-key }} | ||
env: | ||
# workaround for https://github.com/actions/runner/issues/2473 | ||
GH_ACTION_REPOSITORY: ${{ github.action_repository }} | ||
GH_ACTION_REF: ${{ github.action_ref }} | ||
|
||
- run: | | ||
java -cp CryptoAnalysisBuild_98e04be6/CryptoAnalysis.jar crypto.HeadlessCryptoScanner \ | ||
|