Repository navigation
95 lines (90 loc) · 3.17 KB
/
Copy pathdocker-build.yml
File metadata and controls
95 lines (90 loc) · 3.17 KB
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
# 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: Docker build
on:
push:
branches:
- master
paths:
- '.github/workflows/docker-build.yml'
- 'docker/**'
- 'docs/usecases/**'
pull_request:
branches:
- '*'
paths:
- '.github/workflows/docker-build.yml'
- 'docker/**'
- 'docs/usecases/**'
env:
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'ubuntu-24.04-arm']
spark: ['4.0.1']
include:
- spark: 4.0.1
sedona: 'latest'
geotools: '33.7'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: 'zulu'
java-version: 17
- name: Cache Maven packages
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup docker (missing on macOS)
if: runner.os == 'macos'
run: |
brew install colima
brew install docker
colima start
DOCKER_CONFIG="${DOCKER_CONFIG:-$HOME/.docker}"
mkdir -p "$DOCKER_CONFIG/cli-plugins"
curl -SL https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-amd64 -o "$DOCKER_CONFIG/cli-plugins/docker-buildx"
chmod +x "$DOCKER_CONFIG/cli-plugins/docker-buildx"
- env:
SPARK_VERSION: ${{ matrix.spark }}
SEDONA_VERSION: ${{ matrix.sedona }}
GEOTOOLS_VERSION: ${{ matrix.geotools }}
run: ./docker/build.sh "${SPARK_VERSION}" "${SEDONA_VERSION}" local "${GEOTOOLS_VERSION}"
- name: Test notebooks
run: |
chmod +x docker/test-notebooks.sh
docker run --rm \
-v ${{ github.workspace }}/docker/test-notebooks.sh:/opt/test-notebooks.sh:ro \
apache/sedona:${{ matrix.sedona }} \
/bin/bash /opt/test-notebooks.sh