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 1 commit
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
42 changes: 16 additions & 26 deletions .github/workflows/test_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,17 @@ jobs:
- os: macos-latest
size: '32b'

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

steps:
- name: Matrix is ${{matrix.os}} / ${{matrix.size}} - Go is ${{matrix.golang}}
run: date

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

- name: Check out code into the Go module directory
Expand All @@ -64,46 +61,39 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Setup Alpine Linux ${{matrix.size}}
- name: Setup Alpine Linux
uses: jirutka/setup-alpine@v1
if: ${{ matrix.size == '32b' }}
with:
arch: x86
packages: >
go
make
git
gcc
musl-dev

- 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'}}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'windows-latest' }}
run: make test

- name: Test without coverage (Ubuntu x86)
if: ${{matrix.os == 'ubuntu-latest' && matrix.size == '32b'}}
run: make test
if: ${{ matrix.size == '32b' }}
run: |
GOVERSION=${{ matrix.golang == '1.21' && '1.21.10' || '1.22.3' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put 1.21.10 and 1.22.3 in the matrix, so you don't have to test here. This will most probably be overlooked the day somebody will adjust the versions in the matrix above, and then things will start to fail.

cd ..
wget -O go.tgz -nv https://go.dev/dl/go$GOVERSION.linux-386.tar.gz
tar -xzf go.tgz
export PATH=$PATH:$(pwd)/go/bin
cd kyber
make test
shell: alpine.sh {0}

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

- name: SonarCloud scan
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.size == '64b' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
42 changes: 16 additions & 26 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,24 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
size: ['64b', '32b']
golang: ['1.18', '1.22']
golang: ['1.21', '1.22']
exclude:
- os: windows-latest
size: '32b'
- os: macos-latest
size: '32b'

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

steps:
- name: Matrix is ${{matrix.os}} / ${{matrix.size}} - Go is ${{matrix.golang}}
run: date

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

- name: Check out code into the Go module directory
Expand All @@ -45,40 +42,33 @@ jobs:
with:
arch: x86
packages: >
go
make
git
gcc
musl-dev

- 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'}}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'windows-latest' }}
run: make test

- name: Test without coverage (Ubuntu x86)
if: ${{matrix.os == 'ubuntu-latest' && matrix.size == '32b'}}
run: make test
if: ${{ matrix.size == '32b' }}
run: |
GOVERSION=${{ matrix.golang == '1.21' && '1.21.10' || '1.22.3' }}
cd ..
wget -O go.tgz -nv https://go.dev/dl/go$GOVERSION.linux-386.tar.gz
tar -xzf go.tgz
export PATH=$PATH:$(pwd)/go/bin
cd kyber
make test
shell: alpine.sh {0}

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

- name: SonarCloud scan
if: ${{matrix.platform == 'ubuntu-latest' && matrix.size == '64b'}}
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.size == '64b' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading