-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ci/cache refactor and ci versions update #436
Draft
eruizalo
wants to merge
3
commits into
hablapps:main
Choose a base branch
from
eruizalo:ci/cache_refactor_and_ci_versions_update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,17 @@ runs: | |
steps: | ||
|
||
# SETUP & CACHE | ||
- uses: coursier/[email protected] | ||
- uses: coursier/[email protected] | ||
id: coursier-cache | ||
with: | ||
jvm: adopt:8 | ||
apps: sbt scala scalafmt # https://github.com/coursier/apps | ||
ignoreJob: 'true' | ||
ignoreMatrix: 'true' | ||
|
||
- uses: coursier/cache-action@v6 | ||
- uses: coursier/[email protected] | ||
if: steps.coursier-cache.outputs.cache-hit-coursier != 'true' | ||
with: | ||
extraKey: "${{ env.SPARK_VERSION }}" | ||
jvm: adopt:8 | ||
apps: sbt scala scalafmt # https://github.com/coursier/apps | ||
|
||
# CHECK CODE FORMAT | ||
- name: Code Format | ||
|
@@ -32,7 +35,7 @@ runs: | |
- name: Test Summary | ||
id: test_summary | ||
if: ${{ success() && steps.test_coverage.conclusion == 'success' || failure() && steps.test_coverage.conclusion == 'failure' }} | ||
uses: test-summary/action@v2.0 | ||
uses: test-summary/action@v2.3 | ||
with: | ||
paths: "./core/target/test-reports/**/TEST-*.xml" | ||
output: "test-summary.md" | ||
|
@@ -54,7 +57,7 @@ runs: | |
|
||
- name: Upload test summary | ||
if: ${{ github.event_name == 'pull_request' && ((success() || failure()) && steps.add_summary_link.conclusion == 'success') }} | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4.3.1 | ||
with: | ||
name: "test-summary-${{ env.SPARK_VERSION }}.md" | ||
path: "test-summary-${{ env.SPARK_VERSION }}.md" | ||
|
@@ -63,9 +66,9 @@ runs: | |
|
||
- name: Publish coverage to codecov 📊 | ||
if: contains(env.SCOPE, 'uploadReport') | ||
uses: codecov/codecov-action@v3 | ||
uses: codecov/codecov-action@v4.1.0 | ||
with: | ||
files: ./target/scala-2.12/scoverage-report/scoverage.xml,./target/scala-2.13/scoverage-report/scoverage.xml | ||
file: ./target/scala-*/scoverage-report/scoverage.xml | ||
fail_ci_if_error: true | ||
verbose: false | ||
flags: 'spark-${{ env.SPARK_VERSION }}.x' | ||
|
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
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
name: Check Dependencies | ||
steps: | ||
- name: PR Dependency Check | ||
uses: gregsdennis/[email protected].2 | ||
uses: gregsdennis/[email protected].3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -51,7 +51,7 @@ jobs: | |
}" > pr_context.json | ||
|
||
- name: Upload PR context | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@v4.3.1 | ||
with: | ||
name: "pr_context.json" | ||
path: "pr_context.json" | ||
|
@@ -69,7 +69,7 @@ jobs: | |
check_mdoc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
# BUILD MDOC, sbt should take the latest version | ||
- name: Build the microsite 💻 | ||
|
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 |
---|---|---|
|
@@ -11,5 +11,6 @@ jobs: | |
name: Update Dependency Graph | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: scalacenter/sbt-dependency-submission@v2 | ||
- uses: actions/[email protected] | ||
|
||
- uses: scalacenter/[email protected] |
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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
# GITHUB_CONTEXT: ${{ toJson(github) }} | ||
# run: echo "$GITHUB_CONTEXT" | ||
- name: Download PR context | ||
uses: dawidd6/action-download-artifact@v3.0.0 # marcofaggian/[email protected] | ||
uses: dawidd6/action-download-artifact@v3.1.2 # marcofaggian/[email protected] | ||
with: | ||
name: pr_context.json | ||
workflow_conclusion: "" | ||
|
@@ -52,19 +52,6 @@ jobs: | |
issue-number: ${{ fromJson(steps.output_pr_context.outputs.pr_context).pr_number }} | ||
body-includes: "This is an auto-generated comment" | ||
|
||
# - uses: actions/checkout@v3 | ||
# | ||
# - name: Render template | ||
# id: template | ||
# uses: chuhlomin/[email protected] | ||
# with: | ||
# template: .github/templates/pr_comment.md | ||
# vars: | | ||
# workflow: ${{ github.workflow }} | ||
# run_url: [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
# attempt: ${{ github.event.workflow_run.run_attempt }} | ||
# job_name: ${{ github.job }} | ||
|
||
- name: Get current date | ||
id: getDate | ||
run: echo "::set-output name=current_date::$(date +'%Y-%m-%d %H:%M:%S %z (%Z)')" | ||
|
@@ -133,7 +120,7 @@ jobs: | |
steps: | ||
- name: Download artifact | ||
id: download_artifacts | ||
uses: dawidd6/action-download-artifact@v3.0.0 # marcofaggian/[email protected] | ||
uses: dawidd6/action-download-artifact@v3.1.2 # marcofaggian/[email protected] | ||
with: | ||
# names: test-summary-*.md | ||
workflow_conclusion: "" | ||
|
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- id: set-matrix | ||
uses: JoshuaTheMiller/[email protected] | ||
|
@@ -45,19 +45,21 @@ jobs: | |
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
# SETUP & CACHE | ||
- uses: coursier/[email protected] | ||
id: coursier-cache | ||
with: | ||
ignoreJob: 'true' | ||
ignoreMatrix: 'true' | ||
|
||
- uses: coursier/[email protected] | ||
if: steps.coursier-cache.outputs.cache-hit-coursier != 'true' | ||
with: | ||
jvm: adopt:8 | ||
apps: sbt scala scalafmt # https://github.com/coursier/apps | ||
|
||
- name: Coursier cache | ||
uses: coursier/cache-action@v6 | ||
with: | ||
extraKey: "${{ matrix.spark }}" | ||
|
||
# MAVEN RELEASE | ||
- name: Maven release 🎁 | ||
run: sbt ci-release -DsparkVersion=${{ matrix.spark }} | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- id: set-matrix | ||
uses: JoshuaTheMiller/[email protected] | ||
|
@@ -27,7 +27,7 @@ jobs: | |
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- uses: ./.github/actions/build_and_coverage | ||
env: | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- id: set-matrix | ||
uses: JoshuaTheMiller/[email protected] | ||
|
@@ -29,18 +29,21 @@ jobs: | |
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
# SETUP & CACHE | ||
- uses: coursier/[email protected] | ||
id: coursier-cache | ||
with: | ||
ignoreJob: 'true' | ||
ignoreMatrix: 'true' | ||
|
||
- uses: coursier/[email protected] | ||
if: steps.coursier-cache.outputs.cache-hit-coursier != 'true' | ||
with: | ||
jvm: adopt:8 | ||
apps: sbt scala scalafmt # https://github.com/coursier/apps | ||
|
||
- uses: coursier/cache-action@v6 | ||
with: | ||
extraKey: "${{ matrix.spark }}" | ||
|
||
# BUILD SCALADOCS (API) | ||
- name: Build the scaladocs 💻 | ||
run: sbt -DsparkVersion=${{ matrix.spark }} +core/doc | ||
|
@@ -61,7 +64,7 @@ jobs: | |
|
||
- name: Upload docs ⬆️ | ||
if: steps.prepare_scaladocs.conclusion == 'success' | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@v4.3.1 | ||
with: | ||
name: "spark-${{ matrix.spark }}" | ||
path: "spark-${{ matrix.spark }}" | ||
|
@@ -79,7 +82,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
# BUILD MDOC, sbt should take the latest version | ||
- name: Build the microsite 💻 | ||
|
@@ -88,7 +91,7 @@ jobs: | |
|
||
# DOWNLOAD DOCS, this will download all the artifacts because no name provided | ||
- name: Download docs ⬇️ | ||
uses: actions/download-artifact@v4 | ||
uses: actions/download-artifact@v4.1.4 | ||
with: | ||
path: "docs/target/mdoc/docs/api/" | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is not working fine here
before -->
[info] welcome to sbt 1.9.9 (AdoptOpenJDK Java 1.8.0_292)
after -->
[info] welcome to sbt 1.9.9 (Eclipse Adoptium Java 11.0.22)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is using a different JVM but is it affecting something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought cache won't affect Java, but it seems if cache works Java is not set (we are now skipping the "install" step)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be that you exchange the cache step with the prepare step? It's something that I see suspicious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it is supposed to execute cache before the install so you avoid this step, that should not be the problem. The problem is that if we match a cache we shouldn't install anything else, I mean this section
apps: sbt scala scalafmt
. As we don't need to install those apps because they should be provided by the cache, I ignored the step completely, but the step not only install those apps, but it set the java version as well (jvm: adopt:8
). Because the whole step is now ignored if there is a cache hit, the java set is ignored as well, so I would probably add a new step only setting the java version if there is a cache hit... but it is kind of weird and I'm trying to determine if cache is needed at all, because our build times are not much better with the cache step