-
Notifications
You must be signed in to change notification settings - Fork 16
171 lines (170 loc) · 5.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# 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.
name: Test
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
jobs:
docker-targets:
name: Docker targets
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.detect-targets.outputs.targets }}
steps:
- name: Detect targets
id: detect-targets
run: |
echo "targets<<JSON" >> "$GITHUB_OUTPUT"
echo "[" >> "$GITHUB_OUTPUT"
cat <<JSON >> "$GITHUB_OUTPUT"
{
"arch-label": "AMD64",
"arch": "amd64",
"go": "1.22",
"runs-on": "ubuntu-latest"
},
{
"arch-label": "AMD64",
"arch": "amd64",
"go": "1.23",
"runs-on": "ubuntu-latest"
}
JSON
echo "]" >> "$GITHUB_OUTPUT"
echo "JSON" >> "$GITHUB_OUTPUT"
docker:
name: ${{ matrix.arch-label }} Debian 12 Go ${{ matrix.go }}
needs: docker-targets
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.docker-targets.outputs.targets) }}
env:
ARCH: ${{ matrix.arch }}
GO: ${{ matrix.go }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Login to GitHub Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull
run: |
docker compose pull debian-go || :
- name: Test
run: |
docker compose run debian-go
- name: Push
if: >-
success() && github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
continue-on-error: true
run: |
docker compose push debian-go
macos:
name: AMD64 macOS 12 Go ${{ matrix.go }}
runs-on: macos-12
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
go:
- '1.21'
- '1.22'
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go }}
cache: true
cache-dependency-path: go.sum
- name: Install bash via Homebrew
run: |
brew install bash
- name: Build
run: |
$(brew --prefix)/bin/bash ci/scripts/build.sh $(pwd)
- name: Test
run: |
$(brew --prefix)/bin/bash ci/scripts/test.sh $(pwd)
windows:
name: AMD64 Windows 2019 Go ${{ matrix.go }}
runs-on: windows-2019
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
go:
- '1.22'
- '1.23'
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go }}
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:
name: Cross-build and test for 386
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Get required Go version
run: |
(. .env && echo "GO_VERSION=${GO}") >> $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
run: GOARCH=386 go build ./...
- name: Test
# WIP refactor, only tests in the specified dirs have been fixed
run: GOARCH=386 go test ./parquet/file/...