Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-13: Add test CI: Windows + MinGW #119

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,60 @@ jobs:
- name: Test
shell: bash
run: ci/scripts/test.sh $(pwd)
windows-mingw:
name: AMD64 Windows MinGW ${{ matrix.mingw-n-bits }} CGO
runs-on: windows-2019
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
mingw-n-bits:
#- 32 runtime handling for CGO needs 64-bit currently
- 64
env:
ARROW_GO_TESTCGO: "1"
MINGW_LINT: "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: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- 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
- name: Get required Go version
run: "(. .env && echo \"GO_VERSION=${GO}\") >> $GITHUB_ENV"
- 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 "MINGW_PREFIX=$(cygpath --windows ${MINGW_PREFIX})" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
cache-dependency-path: go.sum
- name: Build
shell: bash
run: ci/scripts/build.sh $(pwd)
- name: Test
shell: bash
run: ci/scripts/test.sh $(pwd)
build_test_386:
kou marked this conversation as resolved.
Show resolved Hide resolved
name: Cross-build and test for 386
runs-on: ubuntu-latest
Expand Down
33 changes: 33 additions & 0 deletions ci/scripts/msys2_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/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

packages=()

packages+=("${MINGW_PACKAGE_PREFIX}-arrow")
packages+=("${MINGW_PACKAGE_PREFIX}-gcc")
packages+=("${MINGW_PACKAGE_PREFIX}-toolchain")
packages+=(base-devel)

pacman \
--needed \
--noconfirm \
--sync \
"${packages[@]}"
Loading