Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI tests for 32bit correction + version of Go update #526

Merged
merged 7 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 55 additions & 72 deletions .github/workflows/test_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,67 +29,81 @@ jobs:
echo "::error:: Could not start CI tests due to missing *safe PR* label."
exit 1

test-mac:
test:
needs: permission
runs-on: macos-latest
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
size: ['64b', '32b']
golang: ['1.18', '1.22']
exclude:
- os: windows-latest
size: '32b'
- os: macos-latest
size: '32b'

runs-on: ${{matrix.os}}
env:
DBGSYNCLOG: trace
DBGSYNCON: true

steps:
- name: Set up Go ^1.13
uses: actions/setup-go@v3
- name: Matrix is ${{matrix.os}} / ${{matrix.size}} - Go is ${{matrix.golang}}
run: date

- name: Set up Go ${{matrix.golang}}
uses: actions/setup-go@v5
if: ${{ matrix.size == '64b' }}
with:
go-version: ^1.13
go-version: ${{matrix.golang}}
check-latest: false

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Test without coverage
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
- name: Setup Alpine Linux ${{matrix.size}}
uses: jirutka/setup-alpine@v1
if: ${{ matrix.size == '32b' }}
with:
go-version: ^1.13
arch: x86
packages: >
go
make
git
gcc
musl-dev

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: getconf x86
if: ${{ matrix.size == '32b' }}
run: |
getconf LONG_BIT
go version
shell: alpine.sh {0}

- name: Test without coverage
run: make test
- name: getconf x64
if: ${{ matrix.size == '64b' }}
run: |
getconf LONG_BIT
go version

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: Test without coverage (Windows, MacOS)
if: ${{matrix.os == 'macos-latest' || matrix.os == 'windows-latest'}}
run: make test

- 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 (Ubuntu x86)
if: ${{matrix.os == 'ubuntu-latest' && matrix.size == '32b'}}
run: make test
shell: alpine.sh {0}

- name: Test with coverage
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
run: make coverage

- name: SonarCloud scan
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -105,35 +119,4 @@ jobs:
-Dsonar.pullrequest.base=${{ github.event.pull_request.base }}
-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: >
go
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
-Dsonar.objc.file.suffixes=-
133 changes: 56 additions & 77 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,70 +5,80 @@ on:
branches: [ master ]

jobs:
test-mac:
needs: permission
runs-on: macos-latest
test_and_coverage:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
size: ['64b', '32b']
golang: ['1.18', '1.22']
exclude:
- os: windows-latest
size: '32b'
- os: macos-latest
size: '32b'

runs-on: ${{matrix.os}}
env:
DBGSYNCLOG: trace
DBGSYNCON: true

steps:
- name: Set up Go ^1.13
uses: actions/setup-go@v3
- name: Matrix is ${{matrix.os}} / ${{matrix.size}} - Go is ${{matrix.golang}}
run: date

- name: Set up Go ${{matrix.golang}}
uses: actions/setup-go@v5
if: ${{ matrix.size == '64b' }}
with:
go-version: ^1.13
go-version: ${{matrix.golang}}
check-latest: false

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Test without coverage
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
- name: Setup Alpine Linux ${{matrix.size}}
uses: jirutka/setup-alpine@v1
if: ${{ matrix.size == '32b' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
arch: x86
packages: >
go
make
git
gcc
musl-dev

- name: Test without coverage
- name: getconf x86
if: ${{ matrix.size == '32b' }}
run: |
getconf LONG_BIT
go version
shell: alpine.sh {0}

- name: getconf x64
if: ${{ matrix.size == '64b' }}
run: |
getconf LONG_BIT
go version

- name: Test without coverage (Windows, MacOS)
if: ${{matrix.os == 'macos-latest' || matrix.os == 'windows-latest'}}
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 without coverage (Ubuntu x86)
if: ${{matrix.os == 'ubuntu-latest' && matrix.size == '32b'}}
run: make test
shell: alpine.sh {0}

- name: Test with coverage
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
run: make coverage

- name: SonarCloud scan
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -87,38 +97,7 @@ jobs:
-Dsonar.objc.file.suffixes=-

- name: Send coverage
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
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: >
go
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
path-to-profile: profile.cov
Loading