]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/.github/workflows/go.yml
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / .github / workflows / go.yml
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements. See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership. The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License. You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17
18 name: Go
19
20 on:
21 push:
22 paths:
23 - '.github/workflows/go.yml'
24 - 'ci/docker/*_go.dockerfile'
25 - 'ci/scripts/go_*'
26 - 'go/**'
27 pull_request:
28 paths:
29 - '.github/workflows/go.yml'
30 - 'ci/docker/*_go.dockerfile'
31 - 'ci/docker/**'
32 - 'ci/scripts/go_*'
33 - 'go/**'
34
35 concurrency:
36 group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
37 cancel-in-progress: true
38
39 env:
40 ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
41 ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
42
43 jobs:
44
45 docker:
46 name: AMD64 Debian 11 Go ${{ matrix.go }}
47 runs-on: ubuntu-latest
48 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
49 timeout-minutes: 15
50 strategy:
51 fail-fast: false
52 matrix:
53 go: [1.15]
54 env:
55 GO: ${{ matrix.go }}
56 steps:
57 - name: Checkout Arrow
58 uses: actions/checkout@v2
59 with:
60 fetch-depth: 0
61 - name: Fetch Submodules and Tags
62 run: ci/scripts/util_checkout.sh
63 - name: Free Up Disk Space
64 run: ci/scripts/util_cleanup.sh
65 - name: Setup Python
66 uses: actions/setup-python@v1
67 with:
68 python-version: 3.8
69 - name: Setup Archery
70 run: pip install -e dev/archery[docker]
71 - name: Execute Docker Build
72 run: archery docker run debian-go
73 - name: Docker Push
74 if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
75 continue-on-error: true
76 run: archery docker push debian-go
77
78 docker_cgo:
79 name: AMD64 Debian 11 GO ${{ matrix.go }} - CGO
80 runs-on: ubuntu-latest
81 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
82 timeout-minutes: 15
83 strategy:
84 fail-fast: false
85 matrix:
86 go: [1.15]
87 env:
88 GO: ${{ matrix.go }}
89 steps:
90 - name: Checkout Arrow
91 uses: actions/checkout@v2
92 with:
93 fetch-depth: 0
94 - name: Fetch Submodules and Tags
95 run: ci/scripts/util_checkout.sh
96 - name: Free Up Disk Space
97 run: ci/scripts/util_cleanup.sh
98 - name: Setup Python
99 uses: actions/setup-python@v1
100 with:
101 python-version: 3.8
102 - name: Setup Archery
103 run: pip install -e dev/archery[docker]
104 - name: Execute Docker Build
105 run: archery docker run debian-go-cgo
106 - name: Docker Push
107 if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
108 continue-on-error: true
109 run: archery docker push debian-go-cgo
110
111
112 docker_cgo_python:
113 name: AMD64 Debian 11 GO ${{ matrix.go }} - CGO Python
114 runs-on: ubuntu-latest
115 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
116 timeout-minutes: 15
117 strategy:
118 fail-fast: false
119 matrix:
120 go: [1.15]
121 env:
122 GO: ${{ matrix.go }}
123 steps:
124 - name: Checkout Arrow
125 uses: actions/checkout@v2
126 with:
127 fetch-depth: 0
128 - name: Fetch Submodules and Tags
129 run: ci/scripts/util_checkout.sh
130 - name: Free Up Disk Space
131 run: ci/scripts/util_cleanup.sh
132 - name: Setup Python
133 uses: actions/setup-python@v1
134 with:
135 python-version: 3.8
136 - name: Setup Archery
137 run: pip install -e dev/archery[docker]
138 - name: Execute Docker Build
139 run: archery docker run debian-go-cgo-python
140 - name: Docker Push
141 if: success() && github.event_name == 'push' && github.repository == 'apache/arrow'
142 continue-on-error: true
143 run: archery docker push debian-go-cgo-python
144
145 windows:
146 name: AMD64 Windows 2019 Go ${{ matrix.go }}
147 runs-on: windows-latest
148 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
149 timeout-minutes: 15
150 strategy:
151 fail-fast: false
152 matrix:
153 go: [1.15]
154 steps:
155 - name: Install go
156 uses: actions/setup-go@v1
157 with:
158 go-version: ${{ matrix.go }}
159 - name: Checkout Arrow
160 uses: actions/checkout@v2
161 with:
162 fetch-depth: 0
163 - name: Fetch Submodules and Tags
164 shell: bash
165 run: ci/scripts/util_checkout.sh
166 - name: Build
167 shell: bash
168 run: ci/scripts/go_build.sh .
169 - name: Test
170 shell: bash
171 run: ci/scripts/go_test.sh .
172
173 macos:
174 name: AMD64 MacOS 10.15 Go ${{ matrix.go }}
175 runs-on: macos-latest
176 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
177 timeout-minutes: 15
178 strategy:
179 fail-fast: false
180 matrix:
181 go: [1.15]
182 steps:
183 - name: Install go
184 uses: actions/setup-go@v1
185 with:
186 go-version: ${{ matrix.go }}
187 - name: Checkout Arrow
188 uses: actions/checkout@v2
189 with:
190 fetch-depth: 0
191 - name: Fetch Submodules and Tags
192 shell: bash
193 run: ci/scripts/util_checkout.sh
194 - name: Build
195 shell: bash
196 run: ci/scripts/go_build.sh .
197 - name: Test
198 shell: bash
199 run: ci/scripts/go_test.sh .
200
201 macos-cgo:
202 name: AMD64 MacOS 10.15 Go ${{ matrix.go }} - CGO
203 runs-on: macos-latest
204 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
205 timeout-minutes: 60
206 strategy:
207 fail-fast: false
208 matrix:
209 go: [1.15]
210 env:
211 ARROW_GO_TESTCGO: "1"
212 steps:
213 - name: Install go
214 uses: actions/setup-go@v1
215 with:
216 go-version: ${{ matrix.go }}
217 - name: Checkout Arrow
218 uses: actions/checkout@v2
219 with:
220 fetch-depth: 0
221 - name: Fetch Submodules and Tags
222 shell: bash
223 run: ci/scripts/util_checkout.sh
224 - name: Brew Install Arrow
225 shell: bash
226 run: brew install apache-arrow
227 - name: Build
228 shell: bash
229 run: ci/scripts/go_build.sh .
230 - name: Test
231 shell: bash
232 run: ci/scripts/go_test.sh .
233
234 windows-mingw:
235 name: AMD64 Windows MinGW ${{ matrix.mingw-n-bits }} CGO
236 runs-on: windows-latest
237 if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
238 timeout-minutes: 60
239 strategy:
240 fail-fast: false
241 matrix:
242 go: [1.15]
243 mingw-n-bits:
244 #- 32 runtime handling for CGO needs 64-bit currently
245 - 64
246 env:
247 ARROW_GO_TESTCGO: "1"
248 steps:
249 - name: Disable Crash Dialogs
250 run: |
251 reg add `
252 "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
253 /v DontShowUI `
254 /t REG_DWORD `
255 /d 1 `
256 /f
257 - name: Install go
258 uses: actions/setup-go@v1
259 with:
260 go-version: ${{ matrix.go }}
261 - name: Checkout Arrow
262 uses: actions/checkout@v2
263 with:
264 fetch-depth: 0
265 - name: Fetch Submodules and Tags
266 shell: bash
267 run: ci/scripts/util_checkout.sh
268 - uses: msys2/setup-msys2@v2
269 with:
270 msystem: MINGW${{ matrix.mingw-n-bits }}
271 update: true
272 - name: Setup MSYS2
273 shell: msys2 {0}
274 run: |
275 ci/scripts/msys2_setup.sh cgo
276 - name: Update CGO Env vars
277 shell: msys2 {0}
278 run: |
279 echo "CGO_CPPFLAGS=-I$(cygpath --windows ${MINGW_PREFIX}/include)" >> $GITHUB_ENV
280 echo "CGO_LDFLAGS=-g -O2 -L$(cygpath --windows ${MINGW_PREFIX}/lib) -L$(cygpath --windows ${MINGW_PREFIX}/bin)" >> $GITHUB_ENV
281 echo "$(cygpath --windows ${MINGW_PREFIX}/bin)" >> $GITHUB_PATH
282 - name: Build
283 shell: bash
284 run: ci/scripts/go_build.sh .
285 - name: Test
286 shell: bash
287 run: ci/scripts/go_test.sh .