You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2024/09/10 02:27:17 UTC

(arrow-go) branch main updated: GH-14: Add test CI: TinyGo (#112)

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-go.git


The following commit(s) were added to refs/heads/main by this push:
     new cc5bf33  GH-14: Add test CI: TinyGo (#112)
cc5bf33 is described below

commit cc5bf3354b5be448b6a00cee39d421909789dfe8
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Tue Sep 10 11:27:11 2024 +0900

    GH-14: Add test CI: TinyGo (#112)
    
    Fix GH-14
    
    This part:
    
    https://github.com/apache/arrow/blob/58415d1fac50cb829b3dcf08526033d6db8c30db/.github/workflows/go.yml#L467-L482
---
 .github/workflows/test.yml   | 19 +++++++++++++++++++
 ci/scripts/tinygo_example.sh | 27 +++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a3bded6..e21ffb5 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -169,3 +169,22 @@ jobs:
       - name: Test
         # WIP refactor, only tests in the specified dirs have been fixed
         run: GOARCH=386 go test ./parquet/file/...
+  tinygo:
+    name: TinyGo
+    runs-on: ubuntu-latest
+    env:
+      TINYGO_VERSION: 0.33.0
+    timeout-minutes: 15
+    steps:
+      - name: Checkout
+        uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+        with:
+          submodules: recursive
+      - name: Build and Run Example
+        run: |
+          docker run \
+            --rm \
+            -v $(pwd):/src \
+            -v $(pwd)/ci/scripts:/ci-scripts \
+            "tinygo/tinygo:$TINYGO_VERSION" \
+            /ci-scripts/tinygo_example.sh
diff --git a/ci/scripts/tinygo_example.sh b/ci/scripts/tinygo_example.sh
new file mode 100755
index 0000000..1b75a46
--- /dev/null
+++ b/ci/scripts/tinygo_example.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -eux
+
+cd ~
+pushd /src
+tinygo build -tags noasm -o ~/example_tinygo arrow/_examples/helloworld/main.go
+popd
+
+./example_tinygo