Skip to content

Commit b6265d4

Browse files
GraalWasm embed Go code guide (#48)
Co-authored-by: Fabio Niephaus <[email protected]>
1 parent c23bae9 commit b6265d4

File tree

14 files changed

+1380
-13
lines changed

14 files changed

+1380
-13
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Test GraalWasm Embed Go in Java Guide
2+
on:
3+
push:
4+
paths:
5+
- 'graalwasm/graalwasm-embed-go-code-guide/**'
6+
- '.github/workflows/graalwasm-embed-go-code-guide.yml'
7+
pull_request:
8+
paths:
9+
- 'graalwasm/graalwasm-embed-go-code-guide/**'
10+
- '.github/workflows/graalwasm-embed-go-code-guide.yml'
11+
workflow_dispatch:
12+
permissions:
13+
contents: read
14+
jobs:
15+
run:
16+
name: 'graalwasm-embed-go-code-guide'
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: '1.25'
27+
28+
- name: Set up GraalVM
29+
uses: graalvm/setup-graalvm@v1
30+
with:
31+
java-version: '24.0.2'
32+
distribution: 'graalvm'
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
cache: 'maven'
35+
36+
- name: Build, test, and run 'graalwasm-embed-go-code-guide' with Go
37+
run: |
38+
cd graalwasm/graalwasm-embed-go-code-guide
39+
export GOROOT="$(go env GOROOT)"
40+
./mvnw --no-transfer-progress -Pgo package
41+
./mvnw --no-transfer-progress exec:exec
42+
43+
- name: Build, test, and run 'graalwasm-embed-go-code-guide' with TinyGo
44+
run: |
45+
cd graalwasm/graalwasm-embed-go-code-guide
46+
wget --quiet https://github.com/tinygo-org/tinygo/releases/download/v0.39.0/tinygo0.39.0.linux-amd64.tar.gz
47+
tar xzf tinygo0.39.0.linux-amd64.tar.gz
48+
export TINYGOROOT="$(pwd)/tinygo"
49+
./mvnw --no-transfer-progress clean
50+
./mvnw --no-transfer-progress -Ptinygo package
51+
./mvnw --no-transfer-progress exec:exec

graalwasm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ This directory contains demo applications and guides for [GraalWasm](https://www
1414

1515
- [Embed C in Java Using GraalWasm](graalwasm-embed-c-code-guide/)
1616
- [Embed Rust in Java Using GraalWasm](graalwasm-embed-rust-code-guide/)
17+
- [Embed Go in Java Using GraalWasm](graalwasm-embed-go-code-guide/)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore maven build output directory
2+
target
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

0 commit comments

Comments
 (0)