Files
judge/dsl/ast.go
Mikhail Kornilovich 128a64a609
All checks were successful
build-dsl-smoke / Discover matrix (push) Successful in 8s
build-dsl-smoke / Build judge (push) Successful in 11s
build-dsl-smoke / ${{ matrix.cell.build }} / ${{ matrix.cell.toolchain }} / ${{ matrix.cell.platform }} (push) Successful in 5s
memory-limit / Build judge (pull_request) Successful in 10s
build-dsl-smoke / SUMMARY (push) Successful in 3s
memory-limit / Linux / gcc (pull_request) Successful in 9s
memory-limit / Linux / clang (pull_request) Successful in 13s
memory-limit / Windows / clang (pull_request) Successful in 16s
memory-limit / Windows / msvc (pull_request) Successful in 17s
add new build system
2026-04-11 01:51:38 +03:00

114 lines
1.7 KiB
Go

package dsl
import "time"
type File struct {
Build string
BuildLinux string
BuildWindows string
BuildDarwin string
BuildDefaults *BuildConfig
Builds []*BuildConfig
Toolchains []*ToolchainSpec
Timeout time.Duration
MemoryLimit int64
Binary string
Sources string
NormalizeCRLF bool
TrimTrailingWS bool
Groups []*Group
}
type Group struct {
Name string
Weight float64
Timeout time.Duration
MemoryLimit int64
Env map[string]string
Scoring ScoringMode
Wrapper string
Tests []*Test
Pattern *Pattern
}
type ScoringMode int
const (
ScoringPartial ScoringMode = iota
ScoringAllOrNone
)
type Pattern struct {
InputGlob string
OutputGlob string
DirsGlob string
InputFile string
OutputFile string
}
func (p *Pattern) IsDirMode() bool {
return p.DirsGlob != ""
}
type Test struct {
Name string
Timeout time.Duration
MemoryLimit int64
Env map[string]string
Wrapper string
Stdin *string
Args []string
InFiles map[string]string
ExitCode *int
Stdout Matcher
Stderr Matcher
OutFiles map[string]string
}
type Matcher interface {
matcherNode()
}
type ExactMatcher struct {
Value string
}
func (ExactMatcher) matcherNode() {}
type ContainsMatcher struct {
Substr string
}
func (ContainsMatcher) matcherNode() {}
type RegexMatcher struct {
Pattern string
}
func (RegexMatcher) matcherNode() {}
type NumericEpsMatcher struct {
Epsilon float64
Value string
}
func (NumericEpsMatcher) matcherNode() {}
type AnyOrderMatcher struct {
Lines []string
}
func (AnyOrderMatcher) matcherNode() {}
type NoMatcher struct{}
func (NoMatcher) matcherNode() {}