Skip to content

Commit 43f5daa

Browse files
committed
Add example for embedding simple python scripts and debugging them using VSCode
1 parent 1958c9a commit 43f5daa

25 files changed

+1545
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test GraalPy Scripts Guide
2+
on:
3+
push:
4+
paths:
5+
- 'graalpy/graalpy-scripts-debug/**'
6+
- '.github/workflows/graalpy-scripts-debug.yml'
7+
pull_request:
8+
paths:
9+
- 'graalpy/graalpy-scripts-debug/**'
10+
- '.github/workflows/graalpy-scripts-debug.yml'
11+
workflow_dispatch:
12+
permissions:
13+
contents: read
14+
jobs:
15+
run:
16+
name: 'graalpy-scripts-debug'
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: graalvm/setup-graalvm@v1
22+
with:
23+
java-version: '23.0.1'
24+
distribution: 'graalvm'
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
cache: 'maven'
27+
- name: Build, test, and run 'graalpy-scripts-debug' using Maven
28+
run: |
29+
cd graalpy/graalpy-scripts-debug
30+
./mvnw --no-transfer-progress test
31+
- name: Build, test, and run 'graalpy-scripts-debug' using Gradle
32+
run: |
33+
cd graalpy/graalpy-scripts-debug
34+
./gradlew test
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# Linux start script should use lf
5+
/gradlew text eol=lf
6+
7+
# These are Windows script files and should use crlf
8+
*.bat text eol=crlf
9+
10+
# Binary files should be left untouched
11+
*.jar binary
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
7+
# Ignore maven build output directory
8+
target
9+
10+
# Ignore JDTLS build directory
11+
bin
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python",
4+
"vscjava.vscode-java-pack"
5+
]
6+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"configurations": [{
3+
"name": "GraalPy: Attach embedded",
4+
"type": "debugpy",
5+
"request": "attach",
6+
"connect": { "host": "localhost", "port": 4711 },
7+
}]
8+
}

0 commit comments

Comments
 (0)