Skip to content
This repository was archived by the owner on Mar 14, 2026. It is now read-only.

Commit b087c41

Browse files
koki-developclaude
andauthored
Add Go 1.25.5 language package (#26)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c61695e commit b087c41

7 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/package-pr.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,21 @@ jobs:
120120
PKG_NAME=$(awk -F- '{ print $1 }' <<< $package)
121121
PKG_VERSION=$(awk -F- '{ print $2 }' <<< $package)
122122
123+
# Read limit_overrides from metadata.json
124+
COMPILE_TIMEOUT=$(jq -r '.limit_overrides.compile_timeout // empty' packages/$PKG_PATH/metadata.json)
125+
COMPILE_TIMEOUT_FLAG=""
126+
if [ -n "$COMPILE_TIMEOUT" ]; then
127+
COMPILE_TIMEOUT_FLAG="-c $COMPILE_TIMEOUT"
128+
echo "Using compile_timeout: $COMPILE_TIMEOUT"
129+
fi
130+
131+
RUN_TIMEOUT=$(jq -r '.limit_overrides.run_timeout // empty' packages/$PKG_PATH/metadata.json)
132+
RUN_TIMEOUT_FLAG=""
133+
if [ -n "$RUN_TIMEOUT" ]; then
134+
RUN_TIMEOUT_FLAG="-r $RUN_TIMEOUT"
135+
echo "Using run_timeout: $RUN_TIMEOUT"
136+
fi
137+
123138
echo "Installing..."
124139
docker run --network container:api appropriate/curl -sXPOST http://localhost:2000/api/v2/packages -H "Content-Type: application/json" -d "{\"language\":\"$PKG_NAME\",\"version\":\"$PKG_VERSION\"}"
125140
@@ -130,7 +145,7 @@ jobs:
130145
do
131146
TEST_RUNTIME=$(awk -F. '{print $2}' <<< $(basename $tscript))
132147
echo Running $tscript with runtime=$TEST_RUNTIME
133-
docker run --network container:api -v "$PWD/cli:/app" -v "$PWD/$(dirname $tscript):/pkg" node:15 /app/index.js run $TEST_RUNTIME -l $PKG_VERSION /pkg/$(basename $tscript) > test_output
148+
docker run --network container:api -v "$PWD/cli:/app" -v "$PWD/$(dirname $tscript):/pkg" node:15 /app/index.js run $TEST_RUNTIME -l $PKG_VERSION $COMPILE_TIMEOUT_FLAG $RUN_TIMEOUT_FLAG /pkg/$(basename $tscript) > test_output
134149
cat test_output
135150
grep "OK" test_output
136151
done

packages/go/1.25.5/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
curl -LO https://go.dev/dl/go1.25.5.linux-amd64.tar.gz
3+
tar -xzf go1.25.5.linux-amd64.tar.gz
4+
rm go1.25.5.linux-amd64.tar.gz

packages/go/1.25.5/compile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
mv $1 $1.go
4+
GOCACHE=$PWD go build -o binary *.go
5+
chmod +x binary

packages/go/1.25.5/environment

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export PATH=$PWD/go/bin:$PATH
2+
export GOPATH=$PWD/gopath

packages/go/1.25.5/metadata.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"language": "go",
3+
"version": "1.25.5",
4+
"aliases": ["go", "golang"],
5+
"limit_overrides": {
6+
"compile_timeout": 15000,
7+
"compile_cpu_time": 15000,
8+
"max_file_size": 50000000
9+
}
10+
}

packages/go/1.25.5/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
shift
4+
./binary "$@"

packages/go/1.25.5/test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
fmt.Println("OK")
7+
}

0 commit comments

Comments
 (0)