Skip to content

Commit

Permalink
Added cache to the weekly job
Browse files Browse the repository at this point in the history
  • Loading branch information
stas-panasiuk committed Feb 14, 2024
1 parent ad484f1 commit fa1ad73
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ on:

jobs:
build_and_test_java8:

runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-8

steps:
- uses: actions/checkout@v3
- name: Cache local Maven repository
Expand All @@ -31,10 +29,4 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Test with Maven
run: mvn -B package --file flink-cyber/pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
with:
directory: /home/runner/work/cybersec/cybersec/flink-cyber
run: mvn -B package --file flink-cyber/pom.xml
29 changes: 23 additions & 6 deletions .github/workflows/build_and_test_future_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,30 @@ on:
- cron: '30 2 * * 6'

jobs:
build_and_test_java11:
build_cache_java8:
runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-8
steps:
- uses: actions/checkout@v3
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: /root/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Test with Maven
run: mvn -B package --file flink-cyber/pom.xml
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
with:
directory: /home/runner/work/cybersec/cybersec/flink-cyber

build_and_test_java11:
needs: build_cache_java8
runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-11

steps:
- uses: actions/checkout@v3
- name: Cache local Maven repository
Expand All @@ -35,10 +54,9 @@ jobs:
run: mvn -B package --file flink-cyber/pom.xml

build_and_test_java17:

needs: build_cache_java8
runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-17

steps:
- uses: actions/checkout@v3
- name: Cache local Maven repository
Expand All @@ -52,10 +70,9 @@ jobs:
run: mvn -B package --file flink-cyber/pom.xml

build_and_test_java21:

needs: build_cache_java8
runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-21

steps:
- uses: actions/checkout@v3
- name: Cache local Maven repository
Expand Down

0 comments on commit fa1ad73

Please sign in to comment.