You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ze...@apache.org on 2021/11/05 15:22:33 UTC
[arrow] branch master updated: ARROW-14589: [CI][Go] Fix CGO
Windows Tests
This is an automated email from the ASF dual-hosted git repository.
zeroshade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new dce1415 ARROW-14589: [CI][Go] Fix CGO Windows Tests
dce1415 is described below
commit dce1415361581503dbf27738c16ea76e54d46a3b
Author: Matthew Topol <mt...@factset.com>
AuthorDate: Fri Nov 5 11:21:26 2021 -0400
ARROW-14589: [CI][Go] Fix CGO Windows Tests
Closes #11611 from zeroshade/arrow-14589-cgowindows
Lead-authored-by: Matthew Topol <mt...@factset.com>
Co-authored-by: Matt Topol <zo...@gmail.com>
Signed-off-by: Matthew Topol <mt...@factset.com>
---
.github/workflows/go.yml | 12 +++++-------
ci/scripts/go_build.sh | 7 ++++++-
ci/scripts/go_test.sh | 5 ++++-
ci/scripts/msys2_setup.sh | 3 +++
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index b2f8534..70300b7 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -238,8 +238,7 @@ jobs:
timeout-minutes: 60
strategy:
fail-fast: false
- matrix:
- go: [1.15]
+ matrix:
mingw-n-bits:
#- 32 runtime handling for CGO needs 64-bit currently
- 64
@@ -254,10 +253,6 @@ jobs:
/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:
@@ -278,7 +273,10 @@ jobs:
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
+ echo "GOROOT=$(cygpath --windows ${MINGW_PREFIX}/lib/go)" >> $GITHUB_ENV
+ echo "GOPATH=$(cygpath --windows ${HOME}/gopath)" >> $GITHUB_ENV
+ mkdir -p $(cygpath --windows ${HOME}/gopath)
+ echo "MINGW_PREFIX=$(cygpath --windows ${MINGW_PREFIX})" >> $GITHUB_ENV
- name: Build
shell: bash
run: ci/scripts/go_build.sh .
diff --git a/ci/scripts/go_build.sh b/ci/scripts/go_build.sh
index 267f78e..0b71e37 100755
--- a/ci/scripts/go_build.sh
+++ b/ci/scripts/go_build.sh
@@ -24,7 +24,12 @@ source_dir=${1}/go
pushd ${source_dir}/arrow
if [[ -n "${ARROW_GO_TESTCGO}" ]]; then
- TAGS="-tags ccalloc"
+ if [[ "${MSYSTEM}" = "MINGW64" ]]; then
+ export PATH=${MINGW_PREFIX}/bin:$PATH
+ go clean -cache
+ go clean -testcache
+ fi
+ TAGS="-tags assert,test,ccalloc"
fi
go get -d -t -v ./...
diff --git a/ci/scripts/go_test.sh b/ci/scripts/go_test.sh
index f7b2cd9..eee156f 100755
--- a/ci/scripts/go_test.sh
+++ b/ci/scripts/go_test.sh
@@ -36,7 +36,10 @@ fi
pushd ${source_dir}/arrow
TAGS="assert,test"
-if [[ -n "${ARROW_GO_TESTCGO}" ]]; then
+if [[ -n "${ARROW_GO_TESTCGO}" ]]; then
+ if [[ "${MSYSTEM}" = "MINGW64" ]]; then
+ export PATH=${MINGW_PREFIX}/bin:$PATH
+ fi
TAGS="${TAGS},ccalloc"
fi
diff --git a/ci/scripts/msys2_setup.sh b/ci/scripts/msys2_setup.sh
index 6f6012c..01cd5fa 100755
--- a/ci/scripts/msys2_setup.sh
+++ b/ci/scripts/msys2_setup.sh
@@ -65,6 +65,9 @@ case "${target}" in
cgo)
packages+=(${MINGW_PACKAGE_PREFIX}-arrow)
packages+=(${MINGW_PACKAGE_PREFIX}-gcc)
+ packages+=(${MINGW_PACKAGE_PREFIX}-go)
+ packages+=(${MINGW_PACKAGE_PREFIX}-toolchain)
+ packages+=(base-devel)
;;
esac