Problems with sbt-projectmatrix - upload artifact should be more granular
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 199
- Forks
- 67
- Avg merge
- 6h 24m
- Merged PRs (30d)
- 3
Description
I am trying to port difflicious to use sbt-projectmatrix.
However the build fails at the uploadArtifacts stage:
Run tar cf targets.tar modules/weaver/target/jvm-2.13 modules/scalatest/target/jvm-2.13 modules/benchmarks/target/jvm-2.13 target docs/target/jvm-2.13 modules/core/target/jvm-3 modules/munit/target/jvm-3 modules/scalatest/target/jvm-3 modules/weaver/target/jvm-3 modules/benchmarks/target/jvm-3 modules/cats/target/jvm-3 modules/munit/target/jvm-2.13 modules/cats/target/jvm-2.13 modules/core/target/jvm-2.13 modules/coretest/target/jvm-3 modules/coretest/target/jvm-2.13 project/target
tar: modules/core/target/jvm-3: Cannot stat: No such file or directory
tar: modules/munit/target/jvm-3: Cannot stat: No such file or directory
tar: modules/scalatest/target/jvm-3: Cannot stat: No such file or directory
tar: modules/weaver/target/jvm-3: Cannot stat: No such file or directory
tar: modules/benchmarks/target/jvm-3: Cannot stat: No such file or directory
tar: modules/cats/target/jvm-3: Cannot stat: No such file or directory
tar: modules/coretest/target/jvm-3: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Error: Process completed with exit code 2.
This is because directories for jvm-3 do not exist when we are building for jvm-2.13
I saw https://github.com/sbt/sbt-github-actions/issues/9 but the mentioned workaround doesn't make sense in our case.
I guess this could be solved by overriding githubWorkflowGeneratedUploadSteps but the readme seems to discourage it and having a better support for sbt-projectmatrix seems like a good improvement.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the generated upload steps, especially githubWorkflowGeneratedUploadSteps, and compare them with the sbt-projectmatrix build shown in the failed workflow. Done should be upload handling that does not fail when target directories for other JVM matrices are absent, while preserving artifact uploads for the directories that exist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, scala
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100