|
| 1 | +// This file was generated using action-binding-generator. Don't change it by hand, otherwise your |
| 2 | +// changes will be overwritten with the next binding code regeneration. |
| 3 | +// See https://github.com/typesafegithub/github-workflows-kt for more info. |
| 4 | +@file:Suppress( |
| 5 | + "DataClassPrivateConstructor", |
| 6 | + "UNUSED_PARAMETER", |
| 7 | +) |
| 8 | + |
| 9 | +package io.github.typesafegithub.workflows.actions.juliaactions |
| 10 | + |
| 11 | +import io.github.typesafegithub.workflows.domain.actions.Action |
| 12 | +import io.github.typesafegithub.workflows.domain.actions.RegularAction |
| 13 | +import java.util.LinkedHashMap |
| 14 | +import kotlin.Boolean |
| 15 | +import kotlin.String |
| 16 | +import kotlin.Suppress |
| 17 | +import kotlin.Unit |
| 18 | +import kotlin.collections.Map |
| 19 | +import kotlin.collections.toList |
| 20 | +import kotlin.collections.toTypedArray |
| 21 | + |
| 22 | +/** |
| 23 | + * Action: Setup Julia environment |
| 24 | + * |
| 25 | + * Setup a Julia environment and add it to the PATH |
| 26 | + * |
| 27 | + * [Action on GitHub](https://github.com/julia-actions/setup-julia) |
| 28 | + * |
| 29 | + * @param version The Julia version to download (if necessary) and use. Example: 1.0.4 |
| 30 | + * @param includeAllPrereleases Include prereleases when matching the Julia version to available |
| 31 | + * versions. |
| 32 | + * @param arch Architecture of the Julia binaries. Defaults to the architecture of the runner |
| 33 | + * executing the job. |
| 34 | + * @param showVersioninfo Display InteractiveUtils.versioninfo() after installing |
| 35 | + * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by |
| 36 | + * the binding |
| 37 | + * @param _customVersion Allows overriding action's version, for example to use a specific minor |
| 38 | + * version, or a newer version that the binding doesn't yet know about |
| 39 | + */ |
| 40 | +public data class SetupJuliaV2 private constructor( |
| 41 | + /** |
| 42 | + * The Julia version to download (if necessary) and use. Example: 1.0.4 |
| 43 | + */ |
| 44 | + public val version: String? = null, |
| 45 | + /** |
| 46 | + * Include prereleases when matching the Julia version to available versions. |
| 47 | + */ |
| 48 | + public val includeAllPrereleases: Boolean? = null, |
| 49 | + /** |
| 50 | + * Architecture of the Julia binaries. Defaults to the architecture of the runner executing the |
| 51 | + * job. |
| 52 | + */ |
| 53 | + public val arch: SetupJuliaV2.Architecture? = null, |
| 54 | + /** |
| 55 | + * Display InteractiveUtils.versioninfo() after installing |
| 56 | + */ |
| 57 | + public val showVersioninfo: Boolean? = null, |
| 58 | + /** |
| 59 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 60 | + */ |
| 61 | + public val _customInputs: Map<String, String> = mapOf(), |
| 62 | + /** |
| 63 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 64 | + * version that the binding doesn't yet know about |
| 65 | + */ |
| 66 | + public val _customVersion: String? = null, |
| 67 | +) : RegularAction<SetupJuliaV2.Outputs>("julia-actions", "setup-julia", _customVersion ?: "v2") { |
| 68 | + public constructor( |
| 69 | + vararg pleaseUseNamedArguments: Unit, |
| 70 | + version: String? = null, |
| 71 | + includeAllPrereleases: Boolean? = null, |
| 72 | + arch: SetupJuliaV2.Architecture? = null, |
| 73 | + showVersioninfo: Boolean? = null, |
| 74 | + _customInputs: Map<String, String> = mapOf(), |
| 75 | + _customVersion: String? = null, |
| 76 | + ) : this(version=version, includeAllPrereleases=includeAllPrereleases, arch=arch, |
| 77 | + showVersioninfo=showVersioninfo, _customInputs=_customInputs, |
| 78 | + _customVersion=_customVersion) |
| 79 | + |
| 80 | + @Suppress("SpreadOperator") |
| 81 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 82 | + *listOfNotNull( |
| 83 | + version?.let { "version" to it }, |
| 84 | + includeAllPrereleases?.let { "include-all-prereleases" to it.toString() }, |
| 85 | + arch?.let { "arch" to it.stringValue }, |
| 86 | + showVersioninfo?.let { "show-versioninfo" to it.toString() }, |
| 87 | + *_customInputs.toList().toTypedArray(), |
| 88 | + ).toTypedArray() |
| 89 | + ) |
| 90 | + |
| 91 | + override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) |
| 92 | + |
| 93 | + public sealed class Architecture( |
| 94 | + public val stringValue: String, |
| 95 | + ) { |
| 96 | + public object X64 : SetupJuliaV2.Architecture("x64") |
| 97 | + |
| 98 | + public object X86 : SetupJuliaV2.Architecture("x86") |
| 99 | + |
| 100 | + public object Aarch64 : SetupJuliaV2.Architecture("aarch64") |
| 101 | + |
| 102 | + public class Custom( |
| 103 | + customStringValue: String, |
| 104 | + ) : SetupJuliaV2.Architecture(customStringValue) |
| 105 | + } |
| 106 | + |
| 107 | + public class Outputs( |
| 108 | + stepId: String, |
| 109 | + ) : Action.Outputs(stepId) { |
| 110 | + /** |
| 111 | + * The installed Julia version. May vary from the version input if a version range was given |
| 112 | + * as input. |
| 113 | + */ |
| 114 | + public val juliaVersion: String = "steps.$stepId.outputs.julia-version" |
| 115 | + |
| 116 | + /** |
| 117 | + * Path to the directory containing the Julia executable. Equivalent to JULIA_BINDIR: |
| 118 | + * https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR |
| 119 | + */ |
| 120 | + public val juliaBindir: String = "steps.$stepId.outputs.julia-bindir" |
| 121 | + } |
| 122 | +} |
0 commit comments