mirror of
https://github.com/SOCI/soci.git
synced 2026-05-04 02:09:11 -05:00
Install PostgreSQL ourselves in macOS CI workflow
It used to be part of macos-12 image but is not present in the later ones for whatever reason. Installing postgresql formula using brew already initializes the database cluster but does it in a non-default directory, so adjust PGDATA definition accordingly and remove "pg_ctl init" which is not needed any longer.
This commit is contained in:
@@ -116,7 +116,7 @@ jobs:
|
||||
;;
|
||||
|
||||
macOS)
|
||||
set_env_var PGDATA /usr/local/var/postgres
|
||||
set_env_var PGDATA /opt/homebrew/var/postgresql@14
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -141,8 +141,7 @@ jobs:
|
||||
set_env_var BUILD_EXAMPLES YES
|
||||
fi
|
||||
|
||||
- name: Install dependencies under Linux
|
||||
if: runner.os == 'Linux'
|
||||
- name: Install dependencies
|
||||
run: ./scripts/ci/install.sh
|
||||
|
||||
- name: Prepare for build
|
||||
|
||||
@@ -13,7 +13,6 @@ case "$(uname)" in
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
pg_ctl init
|
||||
pg_ctl start
|
||||
pg_isready --timeout=60
|
||||
createuser --superuser postgres
|
||||
|
||||
@@ -52,6 +52,19 @@ case "$(uname)" in
|
||||
FreeBSD)
|
||||
pkg install -q -y bash cmake
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
case "${SOCI_CI_BACKEND}" in
|
||||
postgresql)
|
||||
brew install postgresql
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown platform: $(uname)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
install_script="${SOCI_SOURCE_DIR}/scripts/ci/install_${SOCI_CI_BACKEND}.sh"
|
||||
|
||||
Reference in New Issue
Block a user