Skip to content

Commit 678d563

Browse files
authored
ci: install postgresql tools in runner (#1507)
* ci: install postgresql tools in runner * ci: docker shell abort on error
1 parent 11ff7d0 commit 678d563

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ jobs:
4848
- name: Set up Docker Buildx
4949
uses: simplex-chat/docker-setup-buildx-action@v3
5050

51+
- name: Install PostgreSQL 15 client tools
52+
if: matrix.os == '22.04'
53+
shell: bash
54+
run: |
55+
# Import the repository signing key
56+
sudo install -d /usr/share/postgresql-common/pgdg
57+
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
58+
# Add the PostgreSQL APT repository
59+
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
60+
# Update repository and install postgresql tools
61+
sudo apt update
62+
sudo apt -y install postgresql-client-15
63+
5164
- name: Build and cache Docker image
5265
uses: simplex-chat/docker-build-push-action@v6
5366
with:
@@ -82,7 +95,7 @@ jobs:
8295
build/${{ matrix.platform_name }}:latest
8396
8497
- name: Build smp-server (postgresql) and tests
85-
shell: docker exec -t builder sh {0}
98+
shell: docker exec -t builder sh -eu {0}
8699
run: |
87100
cabal update
88101
cabal build --jobs=$(nproc) --enable-tests -fserver_postgres
@@ -106,7 +119,7 @@ jobs:
106119
docker cp builder:/out/smp-server ./smp-server-postgres-ubuntu-${{ matrix.platform_name }}
107120
108121
- name: Build everything else (standard)
109-
shell: docker exec -t builder sh {0}
122+
shell: docker exec -t builder sh -eu {0}
110123
run: |
111124
cabal build --jobs=$(nproc)
112125
mkdir -p /out

0 commit comments

Comments
 (0)