-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for binary cache for Spack builds (#249)
Signed-off-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
bebd78f
commit b2c66af
Showing
22 changed files
with
829 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.33.4 | ||
0.34.0-RC6 |
93 changes: 93 additions & 0 deletions
93
src/main/groovy/io/seqera/wave/configuration/SpackConfig.groovy
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package io.seqera.wave.configuration | ||
|
||
import java.nio.file.Path | ||
|
||
import groovy.transform.CompileStatic | ||
import groovy.transform.EqualsAndHashCode | ||
import groovy.transform.ToString | ||
import io.micronaut.context.annotation.Value | ||
import io.micronaut.core.annotation.Nullable | ||
import jakarta.inject.Singleton | ||
/** | ||
* Model Spack configuration | ||
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
@ToString | ||
@EqualsAndHashCode | ||
@Singleton | ||
@CompileStatic | ||
class SpackConfig { | ||
|
||
/** | ||
* The host path where where Spack cached binaries are stored | ||
*/ | ||
@Nullable | ||
@Value('${wave.build.spack.cacheDirectory}') | ||
private String cacheDirectory | ||
|
||
/** | ||
* The container mount path where Spack cached binaries are stored | ||
*/ | ||
@Nullable | ||
@Value('${wave.build.spack.cacheMountPath}') | ||
private String cacheMountPath | ||
|
||
/** | ||
* The host path where the GPG key required by the Spack "buildcache" is located | ||
*/ | ||
@Nullable | ||
@Value('${wave.build.spack.secretKeyFile}') | ||
private String secretKeyFile | ||
|
||
/** | ||
* The container path where the GPG key required by the Spack "buildcache" is located | ||
*/ | ||
@Nullable | ||
@Value('${wave.build.spack.secretMountPath}') | ||
private String secretMountPath | ||
|
||
/** | ||
* The container image used for Spack builds | ||
*/ | ||
@Value('${wave.build.spack.builderImage:`spack/ubuntu-jammy:v0.20.0`}') | ||
private String builderImage | ||
|
||
/** | ||
* The container image used for Spack container | ||
*/ | ||
@Value('${wave.build.spack.runnerImage:`ubuntu:22.04`}') | ||
private String runnerImage | ||
|
||
Path getCacheDirectory() { | ||
if( !cacheDirectory ) | ||
throw new IllegalStateException("Missing Spack cacheDirectory configuration setting") | ||
return Path.of(cacheDirectory).toAbsolutePath().normalize() | ||
} | ||
|
||
String getCacheMountPath() { | ||
if( !cacheMountPath ) | ||
throw new IllegalStateException("Missing Spack cacheMountPath configuration setting") | ||
return cacheMountPath | ||
} | ||
|
||
Path getSecretKeyFile() { | ||
if( !secretKeyFile ) | ||
throw new IllegalStateException("Missing Spack secretKeyFile configuration setting") | ||
return Path.of(secretKeyFile).toAbsolutePath().normalize() | ||
} | ||
|
||
String getSecretMountPath() { | ||
if( !secretMountPath ) | ||
throw new IllegalStateException("Missing Spack secretMountPath configuration setting") | ||
return secretMountPath | ||
} | ||
|
||
String getBuilderImage() { | ||
return builderImage | ||
} | ||
|
||
String getRunnerImage() { | ||
return runnerImage | ||
} | ||
} |
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
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
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
Oops, something went wrong.