internal/rosa/glslang: spirv-headers artifact
All checks were successful
Test / Create distribution (push) Successful in 1m2s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m45s
Test / ShareFS (push) Successful in 3m51s
Test / Sandbox (race detector) (push) Successful in 5m18s
Test / Hakurei (race detector) (push) Successful in 6m25s
Test / Flake checks (push) Successful in 1m21s
All checks were successful
Test / Create distribution (push) Successful in 1m2s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m45s
Test / ShareFS (push) Successful in 3m51s
Test / Sandbox (race detector) (push) Successful in 5m18s
Test / Hakurei (race detector) (push) Successful in 6m25s
Test / Flake checks (push) Successful in 1m21s
Required by spirv-tools. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -136,6 +136,7 @@ const (
|
|||||||
Rsync
|
Rsync
|
||||||
Sed
|
Sed
|
||||||
Setuptools
|
Setuptools
|
||||||
|
SPIRVHeaders
|
||||||
SquashfsTools
|
SquashfsTools
|
||||||
Strace
|
Strace
|
||||||
TamaGo
|
TamaGo
|
||||||
|
|||||||
55
internal/rosa/glslang.go
Normal file
55
internal/rosa/glslang.go
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
package rosa
|
||||||
|
|
||||||
|
import (
|
||||||
|
"slices"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"hakurei.app/internal/pkg"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (t Toolchain) newSPIRVHeaders() (pkg.Artifact, string) {
|
||||||
|
const (
|
||||||
|
version = "1.4.341.0"
|
||||||
|
checksum = "0PL43-19Iaw4k7_D8J8BvoJ-iLgCVSYZ2ThgDPGfAJwIJFtre7l0cnQtLjcY-JvD"
|
||||||
|
)
|
||||||
|
return t.NewPackage("spirv-headers", version, pkg.NewHTTPGetTar(
|
||||||
|
nil, "https://github.com/KhronosGroup/SPIRV-Headers/archive/"+
|
||||||
|
"refs/tags/vulkan-sdk-"+version+".tar.gz",
|
||||||
|
mustDecode(checksum),
|
||||||
|
pkg.TarGzip,
|
||||||
|
), nil, &CMakeHelper{
|
||||||
|
Cache: []KV{
|
||||||
|
{"CMAKE_BUILD_TYPE", "Release"},
|
||||||
|
},
|
||||||
|
}), version
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
artifactsM[SPIRVHeaders] = Metadata{
|
||||||
|
f: Toolchain.newSPIRVHeaders,
|
||||||
|
|
||||||
|
Name: "spirv-headers",
|
||||||
|
Description: "machine-readable files for the SPIR-V Registry",
|
||||||
|
Website: "https://github.com/KhronosGroup/SPIRV-Headers",
|
||||||
|
|
||||||
|
ID: 230542,
|
||||||
|
|
||||||
|
// upstream changed version scheme, anitya incapable of filtering them
|
||||||
|
latest: func(v *Versions) string {
|
||||||
|
for _, s := range v.Stable {
|
||||||
|
fields := strings.SplitN(s, ".", 4)
|
||||||
|
if len(fields) != 4 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if slices.ContainsFunc(fields, func(f string) bool {
|
||||||
|
return slices.ContainsFunc([]byte(f), func(d byte) bool {
|
||||||
|
return d < '0' || d > '9'
|
||||||
|
})
|
||||||
|
}) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
return v.Latest
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user