Skip to content

Commit 36e45ef

Browse files
authored
chore: Enable CI (#27)
## What's Changed Add a GitHub Actions workflow for building and testing. Closes #3.
1 parent 00348c0 commit 36e45ef

File tree

14 files changed

+738
-2
lines changed

14 files changed

+738
-2
lines changed

.dockerallow

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
# We don't use anything when build a Docker image for now.

.env

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
# Empty prefix means that the Docker Compose configuration will use named
19+
# volumes which potentially improves the performance on Docker for macOS and
20+
# Docker for Windows, it also prevents the contamination of the source
21+
# directory.
22+
# A non-empty prefix means that directories from the host are bind-mounted
23+
# into the container, it should be set to ".docker/" on GitHub Actions to keep
24+
# the cache plugin functional.
25+
DOCKER_VOLUME_PREFIX=
26+
27+
# turn on inline build cache, this is a docker buildx feature documented
28+
# at https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
29+
BUILDKIT_INLINE_CACHE=1
30+
COMPOSE_DOCKER_CLI_BUILD=1
31+
DOCKER_BUILDKIT=1
32+
33+
# different architecture notations
34+
ARCH=amd64
35+
36+
# Default repository to pull and push images from
37+
REPO=ghcr.io/apache/arrow-swift-dev
38+
39+
# Default versions for platforms
40+
UBUNTU_CODE_NAME=noble
41+
42+
# Default versions for various dependencies
43+
SWIFT=5.10

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ updates:
2424
commit-message:
2525
prefix: "chore: "
2626
open-pull-requests-limit: 10
27+
- package-ecosystem: "swift"
28+
directory: "/"
29+
schedule:
30+
interval: "weekly"
31+
commit-message:
32+
prefix: "chore: "
33+
open-pull-requests-limit: 10
2734
- package-ecosystem: "swift"
2835
directory: "/Arrow/"
2936
schedule:

.github/workflows/test.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,48 @@ jobs:
5454
- name: Run pre-commit
5555
run: |
5656
pre-commit run --show-diff-on-failure --color=always --all-files
57+
58+
docker:
59+
name: Ubuntu Swift 5.10
60+
runs-on: ubuntu-latest
61+
timeout-minutes: 10
62+
env:
63+
DOCKER_VOLUME_PREFIX: .docker/
64+
steps:
65+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
66+
- name: Cache
67+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
68+
with:
69+
path: .docker
70+
key: docker-${{ hashFiles('**/Package.resolved', '**/go.sum') }}
71+
restore-keys: docker-
72+
- name: Pull
73+
run: |
74+
docker compose pull --ignore-pull-failures ubuntu
75+
- name: Build
76+
run: |
77+
docker compose build ubuntu
78+
- name: Run
79+
run: |
80+
docker compose run --rm ubuntu
81+
- name: Fix permission for .docker/
82+
if: always()
83+
run: |
84+
sudo chown -R ${USER}: .docker
85+
- name: Login to GitHub Container registry
86+
if: >-
87+
github.event_name == 'push' &&
88+
github.repository == 'apache/arrow-swift' &&
89+
github.ref_name == 'main'
90+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
91+
with:
92+
registry: ghcr.io
93+
username: ${{ github.actor }}
94+
password: ${{ secrets.GITHUB_TOKEN }}
95+
- name: Push
96+
if: >-
97+
github.event_name == 'push' &&
98+
github.repository == 'apache/arrow-swift' &&
99+
github.ref_name == 'main'
100+
run: |
101+
docker compose push ubuntu

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
/.build/
19+
/.docker/

Arrow/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ xcuserdata/
66
DerivedData/
77
.swiftpm/
88
.netrc
9-
Package.resolved

Arrow/Package.resolved

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ArrowFlight/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ xcuserdata/
66
DerivedData/
77
.swiftpm/
88
.netrc
9-
Package.resolved

ArrowFlight/Package.resolved

Lines changed: 195 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)