This repository was archived by the owner on Mar 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ mv $1 $1 .go
4+ GOCACHE=$PWD go build -o binary * .go
5+ chmod +x binary
Original file line number Diff line number Diff line change 1+ export PATH=$PWD/go/bin:$PATH
2+ export GOPATH=$PWD/gopath
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ shift
4+ ./binary " $@ "
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import "fmt"
4+
5+ func main () {
6+ fmt .Println ("OK" )
7+ }
You can’t perform that action at this time.
0 commit comments