From 05f332ed9b2fb7d19a8da34ff1feb754e57cbc7b Mon Sep 17 00:00:00 2001 From: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> Date: Fri, 26 Apr 2024 09:02:58 +0200 Subject: [PATCH] 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> --- .github/workflows/ci.yml | 22 ++++++++++------------ .github/workflows/pre-release.yml | 4 ++-- .github/workflows/release-assets.yml | 4 ++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92ba10568..14f715a7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,14 +34,12 @@ jobs: - 'Makefile' - 'waku.nimble' - 'library/**' - v2: - 'waku/**' - 'apps/**' - 'tools/**' - 'tests/all_tests_v2.nim' - 'tests/**' - docker: - 'docker/**' @@ -55,8 +53,8 @@ jobs: if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }} strategy: matrix: - rln_version : [1, 2] - os: [ubuntu-latest, macos-latest] + rln_version: [1, 2] + os: [ubuntu-latest, macos-13] runs-on: ${{ matrix.os }} timeout-minutes: 60 @@ -86,8 +84,8 @@ jobs: if: ${{ needs.changes.outputs.v2 == 'true' || needs.changes.outputs.common == 'true' }} strategy: matrix: - rln_version : [1, 2] - os: [ubuntu-latest, macos-latest] + rln_version: [1, 2] + os: [ubuntu-latest, macos-13] runs-on: ${{ matrix.os }} timeout-minutes: 60 @@ -111,16 +109,16 @@ jobs: - name: Run tests run: | - if [ ${{ runner.os }} == "macOS" ]; then - brew unlink postgresql@14 - brew link libpq --force - fi - if [ ${{ runner.os }} == "Linux" ]; then sudo docker run --rm -d -e POSTGRES_PASSWORD=test123 -p 5432:5432 postgres:15.4-alpine3.18 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: needs: changes diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index fb6156e25..c93e0513b 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -34,10 +34,10 @@ jobs: needs: tag-name strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] arch: [amd64] include: - - os: macos-latest + - os: macos-13 arch: arm64 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml index eafd04e21..bf68e33a9 100644 --- a/.github/workflows/release-assets.yml +++ b/.github/workflows/release-assets.yml @@ -14,10 +14,10 @@ jobs: build-and-upload: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] arch: [amd64] include: - - os: macos-latest + - os: macos-13 arch: arm64 runs-on: ${{ matrix.os }} timeout-minutes: 60