Skip to content

Ensure loading dev/release/.env #110

Ensure loading dev/release/.env

Ensure loading dev/release/.env #110

Workflow file for this run

# 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:
pull_request:
push:
concurrency:
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} - PostgreSQL ${{ matrix.postgresql-version }}
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os:
- macos
- ubuntu
postgresql-version:
- "15"
steps:
- uses: actions/checkout@v4
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu'
run: |
sudo apt update
sudo apt install -y -V \
ca-certificates \
gpg \
lsb-release \
wget
os=$(lsb_release --id --short | tr 'A-Z' 'a-z')
code_name=$(lsb_release --codename --short)
apt_source_deb=apache-arrow-apt-source-latest-${code_name}.deb
wget https://apache.jfrog.io/artifactory/arrow/${os}/${apt_source_deb}
sudo apt install -y -V ./${apt_source_deb}
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import -
(echo "Types: deb"; \
echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \
echo "Suites: ${code_name}-pgdg"; \
echo "Components: main"; \
echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \
sudo tee /etc/apt/sources.list.d/pgdg.sources
sudo apt update
sudo apt -y -V purge '^postgresql'
sudo apt install -y -V \
libarrow-flight-sql-glib-dev \
libkrb5-dev \
meson \
ninja-build \
postgresql-${{ matrix.postgresql-version }} \
postgresql-server-dev-${{ matrix.postgresql-version }}
- name: Install dependencies on macOS
if: matrix.os == 'macos'
run: |
sed \
-i '' \
-e 's/postgresql@[0-9]*/postgresql@${{ matrix.postgresql-version }}/g' \
Brewfile
brew update
brew bundle
echo "$(brew --prefix postgresql@${{ matrix.postgresql-version }})/bin" >> $GITHUB_PATH
- name: Install Apache Arrow Flight SQL adapter
run: |
setup_args=(
"--prefix=/tmp/local"
"-Dbenchmark=true"
"-Dpostgresql_dir=$(pg_config --bindir)/.."
)
if [ ${{ matrix.os }} = "macos" ]; then
setup_args+=("--pkg-config-path=$(brew --prefix libpq)/lib/pkgconfig")
fi
meson setup "${setup_args[@]}" build
meson compile -C build
if [ ${{ matrix.os }} = "ubuntu" ]; then
sudo meson install -C build
else
meson install -C build
fi
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
cache-version: 1
- name: Test
run: |
PATH=$(pg_config --bindir):$PATH bundle exec test/run.rb