Skip to content

Commit 28d3507

Browse files
init
1 parent b769905 commit 28d3507

2 files changed

Lines changed: 52 additions & 9 deletions

File tree

Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,16 @@ RUN chmod +x /opt/codex/setup_universal.sh
326326
### VERIFICATION SCRIPT ###
327327

328328
COPY verify.sh /opt/verify.sh
329-
RUN chmod +x /opt/verify.sh && bash -lc "/opt/verify.sh"
329+
RUN --network=none chmod +x /opt/verify.sh \
330+
&& bash -lc 'PYTHON_VERSIONS="$PYTHON_VERSIONS" \
331+
NODE_VERSIONS="18 20 22" \
332+
RUST_VERSIONS="$RUST_VERSIONS" \
333+
GO_VERSIONS="$GO_VERSIONS" \
334+
SWIFT_VERSIONS="$SWIFT_VERSIONS" \
335+
RUBY_VERSIONS="$RUBY_VERSIONS" \
336+
PHP_VERSIONS="$PHP_VERSIONS" \
337+
JAVA_VERSIONS="$( [ "$TARGETARCH" = "arm64" ] && echo "$ARM_JAVA_VERSIONS" || echo "$AMD_JAVA_VERSIONS" )" \
338+
"/opt/verify.sh"'
330339

331340
### ENTRYPOINT ###
332341

verify.sh

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,53 @@ set -euo pipefail
44

55
echo "Verifying language runtimes ..."
66

7+
read -ra PYTHON <<< "$PYTHON_VERSIONS"
8+
read -ra NODE <<< "$NODE_VERSIONS"
9+
read -ra RUST <<< "$RUST_VERSIONS"
10+
read -ra GO <<< "$GO_VERSIONS"
11+
read -ra SWIFT <<< "$SWIFT_VERSIONS"
12+
read -ra RUBY <<< "$RUBY_VERSIONS"
13+
read -ra PHP <<< "$PHP_VERSIONS"
14+
read -ra JAVA <<< "$JAVA_VERSIONS"
15+
16+
max=$(printf "%s\n" \
17+
${#PYTHON[@]} \
18+
${#NODE[@]} \
19+
${#RUST[@]} \
20+
${#GO[@]} \
21+
${#SWIFT[@]} \
22+
${#RUBY[@]} \
23+
${#PHP[@]} \
24+
${#JAVA[@]} \
25+
| sort -nr | head -1)
26+
27+
for ((i=max-1; i>=0; i--)); do
28+
CODEX_ENV_PYTHON_VERSION=${PYTHON[i]:-${PYTHON[0]}} \
29+
CODEX_ENV_NODE_VERSION=${NODE[i]:-${NODE[0]}} \
30+
CODEX_ENV_RUST_VERSION=${RUST[i]:-${RUST[0]}} \
31+
CODEX_ENV_GO_VERSION=${GO[i]:-${GO[0]}} \
32+
CODEX_ENV_SWIFT_VERSION=${SWIFT[i]:-${SWIFT[0]}} \
33+
CODEX_ENV_RUBY_VERSION=${RUBY[i]:-${RUBY[0]}} \
34+
CODEX_ENV_PHP_VERSION=${PHP[i]:-${PHP[0]}} \
35+
CODEX_ENV_JAVA_VERSION=${JAVA[i]:-${JAVA[0]}} \
36+
bash -c '
37+
printf "\n\nTesting setup_universal with versions:\n"
38+
env | grep "^CODEX_ENV_" | sort
39+
printf "\n"
40+
exec /opt/codex/setup_universal.sh
41+
'
42+
done
43+
744
echo "- Python:"
845
python3 --version
946
pyenv versions | sed 's/^/ /'
1047

1148
echo "- Node.js:"
12-
for version in "18" "20" "22"; do
13-
nvm use --global "${version}"
14-
node --version
15-
npm --version
16-
pnpm --version
17-
yarn --version
18-
npm ls -g
19-
done
49+
node --version
50+
npm --version
51+
pnpm --version
52+
yarn --version
53+
npm ls -g
2054

2155
echo "- Bun:"
2256
bun --version

0 commit comments

Comments
 (0)