mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
Merge 0bb41adacc
into 647bc3a7c7
This commit is contained in:
commit
a54c460a4f
13 changed files with 54 additions and 4 deletions
4
.github/workflows/package-pr.yaml
vendored
4
.github/workflows/package-pr.yaml
vendored
|
@ -107,7 +107,7 @@ jobs:
|
|||
echo $PACKAGES_JSON
|
||||
|
||||
echo Getting CLI ready
|
||||
docker run -v "$PWD/cli:/app" --entrypoint /bin/bash node:15 -c 'cd /app; npm i'
|
||||
docker run -v "$PWD/cli:/app" --entrypoint /bin/bash node:18 -c 'cd /app; npm i'
|
||||
|
||||
for package in $(jq -r '.[] | "\(.language)-\(.language_version)"' <<< "$PACKAGES_JSON")
|
||||
do
|
||||
|
@ -126,7 +126,7 @@ jobs:
|
|||
do
|
||||
TEST_RUNTIME=$(awk -F. '{print $2}' <<< $(basename $tscript))
|
||||
echo Running $tscript with runtime=$TEST_RUNTIME
|
||||
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
|
||||
docker run --network container:api -v "$PWD/cli:/app" -v "$PWD/$(dirname $tscript):/pkg" node:18 /app/index.js run $TEST_RUNTIME -l $PKG_VERSION /pkg/$(basename $tscript) > test_output
|
||||
cat test_output
|
||||
grep "OK" test_output
|
||||
done
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
FROM node:15.10.0-buster-slim
|
||||
FROM node:18.15.0-buster-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN dpkg-reconfigure -p critical dash
|
||||
RUN for i in $(seq 1001 1500); do \
|
||||
groupadd -g $i runner$i && \
|
||||
|
|
4
packages/node/20.11.0/build.sh
vendored
Normal file
4
packages/node/20.11.0/build.sh
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
curl "https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz" -o node.tar.xz
|
||||
tar xf node.tar.xz --strip-components=1
|
||||
rm node.tar.xz
|
1
packages/node/20.11.0/environment
vendored
Normal file
1
packages/node/20.11.0/environment
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export PATH=$PWD/bin:$PATH
|
10
packages/node/20.11.0/metadata.json
vendored
Normal file
10
packages/node/20.11.0/metadata.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"language": "node",
|
||||
"version": "20.11.0",
|
||||
"provides": [
|
||||
{
|
||||
"language": "javascript",
|
||||
"aliases": ["node-javascript", "node-js", "javascript", "js"]
|
||||
}
|
||||
]
|
||||
}
|
3
packages/node/20.11.0/run
vendored
Normal file
3
packages/node/20.11.0/run
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
node "$@"
|
1
packages/node/20.11.0/test.js
vendored
Normal file
1
packages/node/20.11.0/test.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
console.log('OK');
|
7
packages/typescript/5.3.3/build.sh
vendored
Normal file
7
packages/typescript/5.3.3/build.sh
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source ../../node/20.11.0/build.sh
|
||||
|
||||
source ./environment
|
||||
|
||||
bin/npm install -g typescript@5.3.3
|
7
packages/typescript/5.3.3/compile
vendored
Normal file
7
packages/typescript/5.3.3/compile
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Put instructions to compile source code, remove this file if the language does not require this stage
|
||||
|
||||
rename 's/$/\.ts/' "$@" # Add .ts extension
|
||||
|
||||
tsc *.ts
|
4
packages/typescript/5.3.3/environment
vendored
Normal file
4
packages/typescript/5.3.3/environment
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Put 'export' statements here for environment variables
|
||||
export PATH=$PWD/bin:$PATH
|
5
packages/typescript/5.3.3/metadata.json
vendored
Normal file
5
packages/typescript/5.3.3/metadata.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"language": "typescript",
|
||||
"version": "5.3.3",
|
||||
"aliases": ["ts", "node-ts", "tsc", "typescript5", "ts5"]
|
||||
}
|
8
packages/typescript/5.3.3/run
vendored
Normal file
8
packages/typescript/5.3.3/run
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Put instructions to run the runtime
|
||||
|
||||
CODE=$1.js
|
||||
shift
|
||||
|
||||
node $CODE "$@"
|
1
packages/typescript/5.3.3/test.ts
vendored
Normal file
1
packages/typescript/5.3.3/test.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
console.log('OK');
|
Loading…
Add table
Add a link
Reference in a new issue