@@ -24,15 +24,12 @@ jobs:
24
24
- latest
25
25
os :
26
26
- ubuntu-latest
27
- - macOS-latest
28
27
- windows-latest
29
28
arch :
30
29
- x64
31
30
- x86
32
- exclude :
33
- # Don't test 32-bit on macOS
34
- - os : macOS-latest
35
- arch : x86
31
+ macos-postgresql-path :
32
+ - /opt/homebrew/opt/postgresql
36
33
include :
37
34
# Add a LTS job just to make sure we still support it
38
35
- os : ubuntu-latest
56
53
version : 1
57
54
arch : x64
58
55
postgresql-version : ' 10'
56
+ - os : macOS-latest
57
+ version : 1
58
+ arch : aarch64
59
+ postgresql-version : ' 13'
60
+ macos-postgresql-path : /opt/homebrew/var/postgresql
61
+ - os : macOS-13
62
+ version : 1
63
+ arch : x64
64
+ postgresql-version : ' 13'
65
+ macos-postgresql-path : /usr/local/var/postgresql
59
66
steps :
60
67
- uses : actions/checkout@v2
61
68
- uses : julia-actions/setup-julia@v1
@@ -96,13 +103,19 @@ jobs:
96
103
run : echo "PGHOST=localhost" >> $GITHUB_ENV
97
104
if : ${{ runner.os == 'Linux' }}
98
105
# MacOS
106
+ - name : Install PostgreSQL
107
+ run : brew install postgresql@${{ matrix.postgresql-version }}
108
+ if : ${{ runner.os == 'macOS' }}
109
+ - name : Add PostgreSQL to Path
110
+ run : echo "$(brew --prefix postgresql@${{matrix.postgresql-version }})/bin" >> $GITHUB_PATH
111
+ if : ${{ runner.os == 'macOS' }}
99
112
- name : Set PGUSER on macOS
100
113
run : |
101
114
echo "PGUSER=$USER" >> $GITHUB_ENV
102
115
echo "LIBPQJL_DATABASE_USER=$USER" >> $GITHUB_ENV
103
116
if : ${{ runner.os == 'macOS' }}
104
117
- name : Start Homebrew PostgreSQL service
105
- run : pg_ctl -D /usr/local/var/postgresql@$(psql --version | cut -f3 -d' ' | cut -f1 -d.) start
118
+ run : pg_ctl -D ${{ matrix.macos-postgresql-path }}@${{ matrix.postgresql-version }} start
106
119
if : ${{ runner.os == 'macOS' }}
107
120
# Windows
108
121
- name : Add PostgreSQL to Path
0 commit comments