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

feat: support golang 1.24 #741

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: support golang 1.24 #741

wants to merge 12 commits into from

Conversation

liuq19
Copy link
Collaborator

@liuq19 liuq19 commented Feb 13, 2025

Main Changes:

  1. adjust the GoMapIterator as Golang
  2. add the omitzero field in resolved fields
  3. remove many duplicated linkname
  4. add go1.24 ci

Comment on lines 8 to 45
strategy:
matrix:
go-version: [1.24.x]
runner_arch: [ubuntu-24.04-arm]

runs-on: ${{ matrix.runner_arch }}

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
${{ github.workspace }}/go.sum
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

- name: Unit Test
run: |
GOMAXPROCS=4 go test -ldflags=-checklinkname=0 -race -covermode=atomic -coverprofile=coverage.txt $(go list ./... | grep -v -E 'loader|jit|avx|x86|sse')

- name: Data Race
run: |
./scripts/test_race.sh

- name: Generic Test
if: ${{ !startsWith(matrix.go-version, '1.17.') }}
run: GOMAXPROCS=4 go test -ldflags=-checklinkname=0 -v -race ./generic_test

- name: Codecov
run: bash <(curl -s https://codecov.io/bash)

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium library test

Actions Job or Workflow does not set permissions
Comment on lines +8 to +63
strategy:
matrix:
go-version: [1.24.x]
runner_arch: [ubuntu-latest]

runs-on: ${{ matrix.runner_arch }}

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: true

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
${{ github.workspace }}/go.sum
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

- name: Unit Test JIT
run: |
GOMAXPROCS=4 go test -ldflags=-checklinkname=0 -race -covermode=atomic -coverprofile=coverage.txt ./...

- name: Unit Test VM
run: |
SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 GOMAXPROCS=4 go test -ldflags=-checklinkname=0 -race -covermode=atomic -coverprofile=coverage.txt ./...

- name: Loader Test
run: |
cd ./loader
go test -ldflags=-checklinkname=0 -v -race ./...

- name: Data Race
run: |
./scripts/test_race.sh

- name: PCSP Test
env:
GOVERSION: ${{ matrix.go-version }}
run: python3 ./scripts/test_pcsp.py

- name: Generic Test JIT
if: ${{ !startsWith(matrix.go-version, '1.17.') }}
run: GOMAXPROCS=4 go test -ldflags=-checklinkname=0 -v -race ./generic_test

- name: Generic Test VM
if: ${{ !startsWith(matrix.go-version, '1.17.') }}
run: GOMAXPROCS=4 SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 go test -ldflags=-checklinkname=0 -v -race ./generic_test

- name: Codecov
run: bash <(curl -s https://codecov.io/bash)

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions Job or Workflow does not set permissions
@liuq19 liuq19 changed the title Feat/go1.24 feat: support golang 1.24 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant