QQQ-14 attempt to cache usr/lib/jvm, to avoid re-installing java17 on each run

This commit is contained in:
2022-06-22 11:20:20 -05:00
parent 26e8bcc149
commit ce7b540eb8

View File

@ -16,7 +16,8 @@ commands:
- run: - run:
name: Install Java 17 name: Install Java 17
command: | command: |
sudo add-apt-repository -y ppa:openjdk-r/ppa && sudo apt install -y openjdk-17-jdk && sudo rm /etc/alternatives/java && sudo ln -s /usr/lib/jvm/java-17-openjdk-amd64/bin/java /etc/alternatives/java if [ ! -e "/usr/lib/jvm/java-17-openjdk-amd64" ]; then sudo add-apt-repository -y ppa:openjdk-r/ppa && sudo apt install -y openjdk-17-jdk fi
sudo rm /etc/alternatives/java && sudo ln -s /usr/lib/jvm/java-17-openjdk-amd64/bin/java /etc/alternatives/java
run_maven: run_maven:
parameters: parameters:
maven_subcommand: maven_subcommand:
@ -25,6 +26,8 @@ commands:
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
keys:
- usr-lib-jvm
keys: keys:
- v1-dependencies-{{ checksum "pom.xml" }} - v1-dependencies-{{ checksum "pom.xml" }}
- run: - run:
@ -43,6 +46,10 @@ commands:
paths: paths:
- ~/.m2 - ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }} key: v1-dependencies-{{ checksum "pom.xml" }}
- save_cache:
paths:
- /usr/lib/jvm/
key: usr-lib-jvm
jobs: jobs:
mvn_test: mvn_test: