Skip to content

Commit

Permalink
Merge pull request #295 from JuliaDatabases/ed/fix-macos-ci
Browse files Browse the repository at this point in the history
Fix macOS CI
  • Loading branch information
iamed2 authored Aug 8, 2024
2 parents 14cb372 + f78a983 commit 1969872
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ jobs:
- latest
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- x86
exclude:
# Don't test 32-bit on macOS
- os: macOS-latest
arch: x86
macos-postgresql-path:
- /opt/homebrew/opt/postgresql
include:
# Add a LTS job just to make sure we still support it
- os: ubuntu-latest
Expand All @@ -56,6 +53,16 @@ jobs:
version: 1
arch: x64
postgresql-version: '10'
- os: macOS-latest
version: 1
arch: aarch64
postgresql-version: '13'
macos-postgresql-path: /opt/homebrew/var/postgresql
- os: macOS-13
version: 1
arch: x64
postgresql-version: '13'
macos-postgresql-path: /usr/local/var/postgresql
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down Expand Up @@ -96,13 +103,19 @@ jobs:
run: echo "PGHOST=localhost" >> $GITHUB_ENV
if: ${{ runner.os == 'Linux' }}
# MacOS
- name: Install PostgreSQL
run: brew install postgresql@${{ matrix.postgresql-version }}
if: ${{ runner.os == 'macOS' }}
- name: Add PostgreSQL to Path
run: echo "$(brew --prefix postgresql@${{matrix.postgresql-version }})/bin" >> $GITHUB_PATH
if: ${{ runner.os == 'macOS' }}
- name: Set PGUSER on macOS
run: |
echo "PGUSER=$USER" >> $GITHUB_ENV
echo "LIBPQJL_DATABASE_USER=$USER" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
- name: Start Homebrew PostgreSQL service
run: pg_ctl -D /usr/local/var/postgresql@$(psql --version | cut -f3 -d' ' | cut -f1 -d.) start
run: pg_ctl -D ${{ matrix.macos-postgresql-path }}@${{ matrix.postgresql-version }} start
if: ${{ runner.os == 'macOS' }}
# Windows
- name: Add PostgreSQL to Path
Expand Down

0 comments on commit 1969872

Please sign in to comment.