kou commented on a change in pull request #11206:
URL: https://github.com/apache/arrow/pull/11206#discussion_r718894697



##########
File path: ci/docker/debian-go-cgo.dockerfile
##########
@@ -0,0 +1,32 @@
+# 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.
+
+ARG base
+FROM ${base}
+
+ENV DEBIAN_FRONTEND noninteractive
+
+# install libarrow-dev to link against with CGO
+RUN apt-get update -y -q && \
+    apt-get install -y -q --no-install-recommends ca-certificates lsb-release 
wget && \
+    wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short 
| tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename 
--short).deb && \
+    apt-get install -y -q --no-install-recommends 
./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \

Review comment:
       This uses the latest released Apache Arrow C++ instead of the master of 
Apache Arrow C++.
   Is this intentional?

##########
File path: .github/workflows/go.yml
##########
@@ -163,3 +197,91 @@ jobs:
       - name: Test
         shell: bash
         run: ci/scripts/go_test.sh .
+
+  macos-cgo:
+    name: AMD64 MacOS 10.15 Go ${{ matrix.go }} - CGO
+    runs-on: macos-latest
+    if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
+    timeout-minutes: 60
+    strategy:
+      fail-fast: false
+      matrix:
+        go: [1.15]
+    env:
+      ARROW_GO_TESTCGO: "1"
+    steps:
+      - name: Install go
+        uses: actions/setup-go@v1
+        with:
+          go-version: ${{ matrix.go }}
+      - name: Checkout Arrow
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+      - name: Fetch Submodules and Tags
+        shell: bash
+        run: ci/scripts/util_checkout.sh
+      - name: Brew Install Arrow
+        shell: bash
+        run: brew install apache-arrow
+      - name: Build
+        shell: bash
+        run: ci/scripts/go_build.sh .
+      - name: Test
+        shell: bash
+        run: ci/scripts/go_test.sh .
+
+  windows-mingw:
+    name: AMD64 Windows MinGW ${{ matrix.mingw-n-bits }} CGO
+    runs-on: windows-latest
+    if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
+    timeout-minutes: 60
+    strategy:
+      fail-fast: false
+      matrix:
+        go: [1.15]
+        mingw-n-bits:
+          #- 32 runtime handling for CGO needs 64-bit currently
+          - 64
+    env:
+      ARROW_GO_TESTCGO: "1"            
+    steps:
+      - name: Disable Crash Dialogs
+        run: |
+          reg add `
+            "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
+            /v DontShowUI `
+            /t REG_DWORD `
+            /d 1 `
+            /f
+      - name: Install go
+        uses: actions/setup-go@v1
+        with:
+          go-version: ${{ matrix.go }}
+      - name: Checkout Arrow
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+      - name: Fetch Submodules and Tags
+        shell: bash
+        run: ci/scripts/util_checkout.sh
+      - uses: msys2/setup-msys2@v2
+        with:
+          msystem: MINGW${{ matrix.mingw-n-bits }}
+          update: true
+      - name: Setup MSYS2
+        shell: msys2 {0}
+        run: |
+          ci/scripts/msys2_setup.sh cgo
+      - name: Update CGO Env vars
+        shell: msys2 {0}
+        run: |
+          echo "CGO_CPPFLAGS=-I$(cygpath --windows ${MINGW_PREFIX}/include)" 
>> $GITHUB_ENV
+          echo "CGO_LDFLAGS=-g -O2 -L$(cygpath --windows ${MINGW_PREFIX}/lib) 
-L$(cygpath --windows ${MINGW_PREFIX}/bin)" >> $GITHUB_ENV
+          echo "$(cygpath --windows ${MINGW_PREFIX}/bin)" >> $GITHUB_PATH

Review comment:
       How about moving this to `ci/scripts/msys2_setup.sh`?
   
   BTW, is the last `... >> $GITHUB_PATH` needed? Is `${MINGW_PREFIX}/bin` 
included in `shell: bash` context?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to