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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

if: ${{ runner.os == 'macOS' }}
# Windows
- name: Add PostgreSQL to Path
Expand Down