Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start PostgreSQL in macOS CI from the new standard place #256

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

iamed2
Copy link
Collaborator

@iamed2 iamed2 commented Oct 3, 2022

This location used to be shared across all versions, now after a Homebrew formula change it's based in one specific place per version. Unfortunately, GitHub Actions may change what version is installed, so we need to discover that version dynamically.

@@ -102,7 +102,7 @@ jobs:
echo "LIBPQJL_DATABASE_USER=$USER" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
- name: Start Homebrew PostgreSQL service
run: pg_ctl -D /usr/local/var/postgres start
run: pg_ctl -D /usr/local/var/postgresql@$(psql --version | cut -f3 -d' ' | cut -f1 -d.) start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, that's an ugly output format, but I guess this technically works for now. Could we just test on a specific postgres version for macos?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately GitHub Actions installs only the latest version of PostgreSQL and changes it at will, so we can't depend on a specific version being available. We could install a specific version using brew, but I think relying on brew's install would be more fragile than this. And installing from .dmg would also be risky I think.

I think ideally we would have a PostgreSQL_jll.jl but I'm not sure how best to reconcile that with LibPQ_jll.jl. I bet it could be done and the BinaryBuilder folks would have a good idea how.

For now I think this is the best compromise.

@iamed2 iamed2 merged commit 3e107aa into master Oct 4, 2022
@iamed2 iamed2 deleted the ed/ci-brew-postgresql-relocate branch October 4, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants