chore: ci.yml - avoid calling brew link libpq --force on macos (#2627)

* ci.yml: avoid calling brew link libpq --force on macos
PRs started to fail due to that but we are not actually running
postgres tests on MacOS

* fix: remove brew linking for test job
* fix: conditional compilation for macos
* fix: remove autoformatted details

---------

Co-authored-by: rymnc <43716372+rymnc@users.noreply.github.com>
This commit is contained in:
Ivan FB 2024-04-26 09:02:58 +02:00 committed by GitHub
parent 843fe217fa
commit 05f332ed9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 16 deletions

View File

@ -34,14 +34,12 @@ jobs:
- 'Makefile' - 'Makefile'
- 'waku.nimble' - 'waku.nimble'
- 'library/**' - 'library/**'
v2: v2:
- 'waku/**' - 'waku/**'
- 'apps/**' - 'apps/**'
- 'tools/**' - 'tools/**'
- 'tests/all_tests_v2.nim' - 'tests/all_tests_v2.nim'
- 'tests/**' - 'tests/**'
docker: docker:
- 'docker/**' - 'docker/**'
@ -55,8 +53,8 @@ jobs:
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }} if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }}
strategy: strategy:
matrix: matrix:
rln_version : [1, 2] rln_version: [1, 2]
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-13]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60 timeout-minutes: 60
@ -86,8 +84,8 @@ jobs:
if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }} if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }}
strategy: strategy:
matrix: matrix:
rln_version : [1, 2] rln_version: [1, 2]
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-13]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60 timeout-minutes: 60
@ -111,16 +109,16 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
if [ ${{ runner.os }} == "macOS" ]; then
brew unlink postgresql@14
brew link libpq --force
fi
if [ ${{ runner.os }} == "Linux" ]; then if [ ${{ runner.os }} == "Linux" ]; then
sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:15.4-alpine3.18 sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:15.4-alpine3.18
fi fi
make RLN_V${{matrix.rln_version}}=true V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 POSTGRES=1 test testwakunode2 postgres_enabled=0
if [ ${{ runner.os }} == "Linux" ]; then
postgres_enabled=1
fi
make RLN_V${{matrix.rln_version}}=true V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 POSTGRES=$postgres_enabled test testwakunode2
build-docker-image: build-docker-image:
needs: changes needs: changes

View File

@ -34,10 +34,10 @@ jobs:
needs: tag-name needs: tag-name
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-13]
arch: [amd64] arch: [amd64]
include: include:
- os: macos-latest - os: macos-13
arch: arm64 arch: arm64
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View File

@ -14,10 +14,10 @@ jobs:
build-and-upload: build-and-upload:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-13]
arch: [amd64] arch: [amd64]
include: include:
- os: macos-latest - os: macos-13
arch: arm64 arch: arm64
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60 timeout-minutes: 60