Skip to content

Commit 38ee09d

Browse files
committed
Split steps into separate workflows
1 parent 23a1813 commit 38ee09d

File tree

5 files changed

+84
-68
lines changed

5 files changed

+84
-68
lines changed

Diff for: .github/workflows/step-mac.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: mac
2+
on:
3+
push:
4+
paths:
5+
- .github/workflows/step-mac.yml
6+
jobs:
7+
mac:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [macos-15, macos-14, macos-13]
13+
steps:
14+
- run: brew install postgresql@17
15+
- run: brew link --overwrite postgresql@17
16+
- name: Install pgvector
17+
run: brew install pgvector
18+
- run: brew services start postgresql@17 && sleep 1
19+
- run: psql -d postgres -c 'CREATE EXTENSION vector'

Diff for: .github/workflows/step-ubuntu.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: ubuntu
2+
on:
3+
push:
4+
paths:
5+
- .github/workflows/step-ubuntu.yml
6+
jobs:
7+
ubuntu:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- os: ubuntu-24.04
14+
postgres: 16
15+
- os: ubuntu-22.04
16+
postgres: 14
17+
- os: ubuntu-20.04
18+
postgres: 14
19+
steps:
20+
- name: Install pgvector
21+
run: |
22+
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
23+
sudo apt-get install postgresql-${{ matrix.postgres }}-pgvector
24+
- run: sudo systemctl start postgresql
25+
- run: sudo -u postgres psql -c 'CREATE EXTENSION vector'

Diff for: .github/workflows/step-windows.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: windows
2+
on:
3+
push:
4+
paths:
5+
- .github/workflows/step-windows.yml
6+
jobs:
7+
windows:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- os: windows-2022
14+
vs: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
15+
- os: windows-2019
16+
vs: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
17+
steps:
18+
- name: Install pgvector
19+
run: |
20+
call "${{ matrix.vs }}\VC\Auxiliary\Build\vcvars64.bat"
21+
cd %TEMP%
22+
git clone --branch v0.7.4 https://github.com/pgvector/pgvector.git
23+
cd pgvector
24+
nmake /NOLOGO /F Makefile.win
25+
nmake /NOLOGO /F Makefile.win install
26+
shell: cmd
27+
- run: sc config postgresql-x64-14 start=auto
28+
- run: net start postgresql-x64-14
29+
- run: |
30+
"%PGBIN%/psql" -d postgres -c "CREATE EXTENSION vector"
31+
shell: cmd

Diff for: .github/workflows/step.yml

-63
This file was deleted.

Diff for: README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[pgvector](https://github.com/pgvector/pgvector) instructions for GitHub Actions
44

5-
[![Build Status](https://github.com/pgvector/setup-pgvector/actions/workflows/step.yml/badge.svg?branch=master)](https://github.com/pgvector/setup-pgvector/actions) [![Build Status](https://github.com/pgvector/setup-pgvector/actions/workflows/service.yml/badge.svg?branch=master)](https://github.com/pgvector/setup-pgvector/actions)
5+
[![Build Status](https://github.com/pgvector/setup-pgvector/actions/workflows/step-ubuntu.yml/badge.svg?branch=master)](https://github.com/pgvector/setup-pgvector/actions) [![Build Status](https://github.com/pgvector/setup-pgvector/actions/workflows/step-mac.yml/badge.svg?branch=master)](https://github.com/pgvector/setup-pgvector/actions) [![Build Status](https://github.com/pgvector/setup-pgvector/actions/workflows/step-windows.yml/badge.svg?branch=master)](https://github.com/pgvector/setup-pgvector/actions) [![Build Status](https://github.com/pgvector/setup-pgvector/actions/workflows/service.yml/badge.svg?branch=master)](https://github.com/pgvector/setup-pgvector/actions)
66

77
## Getting Started
88

@@ -15,7 +15,7 @@ First, choose your installation method:
1515

1616
To add to the preinstalled Postgres installation on [runner images](https://github.com/actions/runner-images#available-images), add a step to your workflow.
1717

18-
Ubuntu
18+
#### Ubuntu
1919

2020
```yml
2121
- name: Install pgvector
@@ -26,14 +26,18 @@ Ubuntu
2626
2727
Note: Replace `16` with your Postgres server version
2828

29-
Mac
29+
See a [full example](https://github.com/pgvector/setup-pgvector/blob/master/.github/workflows/step-ubuntu.yml)
30+
31+
#### Mac
3032

3133
```yml
3234
- name: Install pgvector
3335
run: brew install pgvector
3436
```
3537

36-
Windows
38+
See a [full example](https://github.com/pgvector/setup-pgvector/blob/master/.github/workflows/step-mac.yml)
39+
40+
#### Windows
3741

3842
```yml
3943
- name: Install pgvector
@@ -49,7 +53,7 @@ Windows
4953

5054
Note: Use `C:\Program Files (x86)\Microsoft Visual Studio\2019` for `windows-2019`
5155

52-
See a [full example](https://github.com/pgvector/setup-pgvector/blob/master/.github/workflows/step.yml)
56+
See a [full example](https://github.com/pgvector/setup-pgvector/blob/master/.github/workflows/step-windows.yml)
5357

5458
### Service
5559

0 commit comments

Comments
 (0)