From ff1425cbc5eebcc1ed578626b4393244f90643c0 Mon Sep 17 00:00:00 2001 From: Matteo Suez Date: Thu, 23 May 2024 09:31:22 +0200 Subject: [PATCH] Add CI steps for 32bit architectures (#523) --- .github/workflows/test_on_pr.yml | 80 ++++++++++++++++++++++++---- .github/workflows/test_on_push.yml | 85 ++++++++++++++++++++++++++---- 2 files changed, 145 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_on_pr.yml b/.github/workflows/test_on_pr.yml index 2725036e3..082c14f1e 100644 --- a/.github/workflows/test_on_pr.yml +++ b/.github/workflows/test_on_pr.yml @@ -29,12 +29,9 @@ jobs: echo "::error:: Could not start CI tests due to missing *safe PR* label." exit 1 - test: + test-mac: needs: permission - strategy: - matrix: - platform: [macos-latest, windows-latest, ubuntu-latest] - runs-on: ${{matrix.platform}} + runs-on: macos-latest env: DBGSYNCLOG: trace DBGSYNCON: true @@ -48,18 +45,51 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - name: Test without coverage - if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' run: make test + test-windows: + needs: permission + runs-on: windows-latest + env: + DBGSYNCLOG: trace + DBGSYNCON: true + steps: + - name: Set up Go ^1.13 + uses: actions/setup-go@v3 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Test without coverage + run: make test + + test-ubuntu: + needs: permission + runs-on: ubuntu-latest + env: + DBGSYNCLOG: trace + DBGSYNCON: true + steps: + - name: Set up Go ^1.13 + uses: actions/setup-go@v3 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Test with coverage - if: matrix.platform == 'ubuntu-latest' run: make coverage - name: SonarCloud scan - if: matrix.platform == 'ubuntu-latest' uses: sonarsource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -76,4 +106,34 @@ jobs: -Dsonar.c.file.suffixes=- -Dsonar.cpp.file.suffixes=- -Dsonar.objc.file.suffixes=- - + + test-ubuntu-x86: + needs: permission + runs-on: ubuntu-latest + env: + DBGSYNCLOG: trace + DBGSYNCON: true + steps: + - name: Setup Alpine Linux + uses: jirutka/setup-alpine@v1 + with: + arch: x86 + packages: > + golang + make + git + gcc + musl-dev + + - name: Set up Go ^1.13 for x86 + uses: actions/setup-go@v3 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory for x86 + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Test without coverage for x86 + run: make test \ No newline at end of file diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index d2eacfc8e..c2ae6b69c 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -5,11 +5,9 @@ on: branches: [ master ] jobs: - test_and_coverage: - strategy: - matrix: - platform: [macos-latest, windows-latest, ubuntu-latest] - runs-on: ${{matrix.platform}} + test-mac: + needs: permission + runs-on: macos-latest env: DBGSYNCLOG: trace DBGSYNCON: true @@ -26,15 +24,51 @@ jobs: fetch-depth: 0 - name: Test without coverage - if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' run: make test + test-windows: + needs: permission + runs-on: windows-latest + env: + DBGSYNCLOG: trace + DBGSYNCON: true + steps: + - name: Set up Go ^1.13 + uses: actions/setup-go@v3 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Test without coverage + run: make test + + test-ubuntu: + needs: permission + runs-on: ubuntu-latest + env: + DBGSYNCLOG: trace + DBGSYNCON: true + steps: + - name: Set up Go ^1.13 + uses: actions/setup-go@v3 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Test with coverage - if: matrix.platform == 'ubuntu-latest' run: make coverage - + - name: SonarCloud scan - if: matrix.platform == 'ubuntu-latest' uses: sonarsource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -53,7 +87,38 @@ jobs: -Dsonar.objc.file.suffixes=- - name: Send coverage - if: matrix.platform == 'ubuntu-latest' uses: shogo82148/actions-goveralls@v1 with: path-to-profile: profile.cov + + test-ubuntu-x86: + needs: permission + runs-on: ubuntu-latest + env: + DBGSYNCLOG: trace + DBGSYNCON: true + steps: + - name: Setup Alpine Linux + uses: jirutka/setup-alpine@v1 + with: + arch: x86 + packages: > + golang + make + git + gcc + musl-dev + + - name: Set up Go ^1.13 for x86 + uses: actions/setup-go@v3 + with: + go-version: ^1.13 + + - name: Check out code into the Go module directory for x86 + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Test without coverage for x86 + run: make test \ No newline at end of file