Skip to content

Commit c2e780e

Browse files
authored
Separate verify RC CI jobs from packages (#99)
Closes GH-98
1 parent 9a0c36f commit c2e780e

File tree

6 files changed

+175
-149
lines changed

6 files changed

+175
-149
lines changed

.github/workflows/package.yaml

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -187,107 +187,3 @@ jobs:
187187
local \
188188
package/${PACKAGE}/${TASK_NAMESPACE}/repositories
189189
popd
190-
191-
verify-source:
192-
name: Verify source on ${{ matrix.os }}
193-
needs:
194-
- source
195-
runs-on: ${{ matrix.os }}-latest
196-
timeout-minutes: 15
197-
strategy:
198-
fail-fast: false
199-
matrix:
200-
os:
201-
- macos
202-
- ubuntu
203-
postgresql-version:
204-
- "15"
205-
env:
206-
BUNDLE_GEMFILE: ${{ github.workspace }}/apache-arrow-flight-sql-postgresql/Gemfile
207-
steps:
208-
- uses: actions/download-artifact@v3
209-
with:
210-
name: source
211-
- name: Extract source archive
212-
run: |
213-
tar_gz=$(echo apache-arrow-flight-sql-postgresql-*.tar.gz)
214-
tar xf ${tar_gz}
215-
ln -s ${tar_gz%.tar.gz} apache-arrow-flight-sql-postgresql
216-
- name: Install dependencies on Ubuntu
217-
if: matrix.os == 'ubuntu'
218-
run: |
219-
sudo apt update
220-
sudo apt install -y -V \
221-
ca-certificates \
222-
gpg \
223-
lsb-release \
224-
wget
225-
os=$(lsb_release --id --short | tr 'A-Z' 'a-z')
226-
code_name=$(lsb_release --codename --short)
227-
228-
apt_source_deb=apache-arrow-apt-source-latest-${code_name}.deb
229-
wget https://apache.jfrog.io/artifactory/arrow/${os}/${apt_source_deb}
230-
sudo apt install -y -V ./${apt_source_deb}
231-
232-
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
233-
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import -
234-
(echo "Types: deb"; \
235-
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
236-
echo "Suites: ${code_name}-pgdg"; \
237-
echo "Components: main"; \
238-
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
239-
sudo tee /etc/apt/sources.list.d/pgdg.sources
240-
241-
sudo apt update
242-
sudo apt -y -V purge '^postgresql'
243-
sudo apt install -y -V \
244-
libarrow-flight-sql-glib-dev \
245-
libkrb5-dev \
246-
meson \
247-
ninja-build \
248-
postgresql-${{ matrix.postgresql-version }} \
249-
postgresql-server-dev-${{ matrix.postgresql-version }}
250-
- name: Install dependencies on macOS
251-
if: matrix.os == 'macos'
252-
run: |
253-
pushd apache-arrow-flight-sql-postgresql
254-
sed \
255-
-i '' \
256-
-e 's/postgresql@[0-9]*/postgresql@${{ matrix.postgresql-version }}/g' \
257-
Brewfile
258-
brew update
259-
brew bundle
260-
echo "$(brew --prefix postgresql@${{ matrix.postgresql-version }})/bin" >> $GITHUB_PATH
261-
popd
262-
- uses: ruby/setup-ruby@v1
263-
with:
264-
ruby-version: ruby
265-
bundler-cache: true
266-
cache-version: 1
267-
- name: Run
268-
run: |
269-
pushd apache-arrow-flight-sql-postgresql
270-
bundle exec dev/release/verify-rc.sh
271-
popd
272-
env:
273-
TEST_DEFAULT: "0"
274-
TEST_SOURCE: "1"
275-
276-
verify-binaries:
277-
name: Verify binaries
278-
if: >-
279-
github.ref_type == 'tag'
280-
needs:
281-
- linux
282-
runs-on: ubuntu-latest
283-
timeout-minutes: 10
284-
steps:
285-
- uses: actions/checkout@v4
286-
- name: Run
287-
run: |
288-
version=${GITHUB_REF_NAME%-rc*}
289-
rc=${GITHUB_REF_NAME#*-rc}
290-
dev/release/verify-rc.sh ${version} ${rc}
291-
env:
292-
TEST_BINARIES: "1"
293-
TEST_DEFAULT: "0"

.github/workflows/test.yaml

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -43,50 +43,9 @@ jobs:
4343
- "15"
4444
steps:
4545
- uses: actions/checkout@v4
46-
- name: Install dependencies on Ubuntu
47-
if: matrix.os == 'ubuntu'
46+
- name: Prepare
4847
run: |
49-
sudo apt update
50-
sudo apt install -y -V \
51-
ca-certificates \
52-
gpg \
53-
lsb-release \
54-
wget
55-
os=$(lsb_release --id --short | tr 'A-Z' 'a-z')
56-
code_name=$(lsb_release --codename --short)
57-
58-
apt_source_deb=apache-arrow-apt-source-latest-${code_name}.deb
59-
wget https://apache.jfrog.io/artifactory/arrow/${os}/${apt_source_deb}
60-
sudo apt install -y -V ./${apt_source_deb}
61-
62-
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
63-
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import -
64-
(echo "Types: deb"; \
65-
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
66-
echo "Suites: ${code_name}-pgdg"; \
67-
echo "Components: main"; \
68-
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
69-
sudo tee /etc/apt/sources.list.d/pgdg.sources
70-
71-
sudo apt update
72-
sudo apt -y -V purge '^postgresql'
73-
sudo apt install -y -V \
74-
libarrow-flight-sql-glib-dev \
75-
libkrb5-dev \
76-
meson \
77-
ninja-build \
78-
postgresql-${{ matrix.postgresql-version }} \
79-
postgresql-server-dev-${{ matrix.postgresql-version }}
80-
- name: Install dependencies on macOS
81-
if: matrix.os == 'macos'
82-
run: |
83-
sed \
84-
-i '' \
85-
-e 's/postgresql@[0-9]*/postgresql@${{ matrix.postgresql-version }}/g' \
86-
Brewfile
87-
brew update
88-
brew bundle
89-
echo "$(brew --prefix postgresql@${{ matrix.postgresql-version }})/bin" >> $GITHUB_PATH
48+
ci/scripts/prepare-${{ matrix.os }}.sh ${{ matrix.postgresql-version }}
9049
- name: Install Apache Arrow Flight SQL adapter
9150
run: |
9251
setup_args=(
@@ -109,6 +68,13 @@ jobs:
10968
ruby-version: ruby
11069
bundler-cache: true
11170
cache-version: 1
112-
- name: Test
71+
- name: Run
11372
run: |
114-
PATH=$(pg_config --bindir):$PATH bundle exec test/run.rb
73+
ARROW_FLIGHT_SQL_POSTGRESQL_MESON_SETUP_ARGS="-Dbenchmark=true"
74+
if [ ${{ matrix.os }} = "macos" ]; then
75+
ARROW_FLIGHT_SQL_POSTGRESQL_MESON_SETUP_ARGS+=" --pkg-config-path=$(brew --prefix libpq)/lib/pkgconfig"
76+
fi
77+
bundle exec dev/release/verify-rc.sh
78+
env:
79+
TEST_DEFAULT: "0"
80+
TEST_SOURCE: "1"

.github/workflows/verify-rc.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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: Verify RC
19+
20+
on:
21+
push:
22+
branches:
23+
- "!**"
24+
tags:
25+
- "*-rc*"
26+
27+
permissions:
28+
contents: read
29+
30+
jobs:
31+
source:
32+
name: Source on ${{ matrix.os }}
33+
runs-on: ${{ matrix.os }}-latest
34+
timeout-minutes: 15
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os:
39+
- macos
40+
- ubuntu
41+
postgresql-version:
42+
- "15"
43+
env:
44+
BUNDLE_GEMFILE: ${{ github.workspace }}/apache-arrow-flight-sql-postgresql/Gemfile
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Prepare
48+
run: |
49+
ci/scripts/prepare-${{ matrix.os }}.sh ${{ matrix.postgresql-version }}
50+
- uses: ruby/setup-ruby@v1
51+
with:
52+
ruby-version: ruby
53+
bundler-cache: true
54+
cache-version: 1
55+
- name: Run
56+
run: |
57+
version=${GITHUB_REF_NAME%-rc*}
58+
rc=${GITHUB_REF_NAME#*-rc}
59+
bundle exec dev/release/verify-rc.sh ${version} ${rc}
60+
env:
61+
TEST_DEFAULT: "0"
62+
TEST_SOURCE: "1"
63+
64+
binaries:
65+
name: Binaries
66+
needs:
67+
- linux
68+
runs-on: ubuntu-latest
69+
timeout-minutes: 10
70+
steps:
71+
- uses: actions/checkout@v4
72+
- name: Run
73+
run: |
74+
version=${GITHUB_REF_NAME%-rc*}
75+
rc=${GITHUB_REF_NAME#*-rc}
76+
dev/release/verify-rc.sh ${version} ${rc}
77+
env:
78+
TEST_BINARIES: "1"
79+
TEST_DEFAULT: "0"

ci/scripts/prepare-macos.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
set -eux
21+
22+
postgresql_version=$1
23+
24+
sed \
25+
-i "" \
26+
-e "s/postgresql@[0-9]*/postgresql@${postgresql_version}/g" \
27+
Brewfile
28+
brew update
29+
brew bundle
30+
echo "$(brew --prefix postgresql@${postgresql_version})/bin" >> "${GITHUB_PATH}"

ci/scripts/prepare-ubuntu.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
set -eux
21+
22+
postgresql_version=$1
23+
24+
sudo apt update
25+
sudo apt install -y -V \
26+
ca-certificates \
27+
gpg \
28+
lsb-release \
29+
wget
30+
os=$(lsb_release --id --short | tr 'A-Z' 'a-z')
31+
code_name=$(lsb_release --codename --short)
32+
33+
apt_source_deb=apache-arrow-apt-source-latest-${code_name}.deb
34+
wget https://apache.jfrog.io/artifactory/arrow/${os}/${apt_source_deb}
35+
sudo apt install -y -V ./${apt_source_deb}
36+
37+
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
38+
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import -
39+
(echo "Types: deb"; \
40+
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
41+
echo "Suites: ${code_name}-pgdg"; \
42+
echo "Components: main"; \
43+
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
44+
sudo tee /etc/apt/sources.list.d/pgdg.sources
45+
46+
sudo apt update
47+
sudo apt -y -V purge '^postgresql'
48+
sudo apt install -y -V \
49+
libarrow-flight-sql-glib-dev \
50+
libkrb5-dev \
51+
meson \
52+
ninja-build \
53+
postgresql-${postgresql_version} \
54+
postgresql-server-dev-${postgresql_version}

dev/release/verify-rc.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ test_source_distribution() {
205205
meson setup \
206206
--prefix="${PWD}/install" \
207207
-Dpostgresql_dir="$(pg_config --bindir)/.." \
208+
${ARROW_FLIGHT_SQL_POSTGRESQL_MESON_SETUP_ARGS:-} \
208209
build
209210
meson compile -C build
210211
if [ ${TEST_SOURCE_MANUAL} -gt 0 ]; then

0 commit comments

Comments
 (0)