From 928f6b9d854974d613080dc220fba7253d2f3a4c Mon Sep 17 00:00:00 2001 From: zhangyunhao Date: Wed, 11 Dec 2024 07:38:25 +0000 Subject: [PATCH] chore(ci): use ubuntu-latest --- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/push-check.yml | 6 ++---- collection/lscq/asm_arm64.go | 17 ++++++++++++++++- collection/lscq/asm_arm64.s | 14 ++++++++++++++ collection/skipmap/bench_test.go | 14 ++++++++++++++ 5 files changed, 48 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b0e3f78f..4cd035f1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -27,7 +27,7 @@ on: jobs: analyze: name: Analyze - runs-on: self-hosted + runs-on: ubuntu-latest permissions: actions: read contents: read @@ -50,7 +50,7 @@ jobs: with: go-version: 1.18 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml index 63bf8611..8865e169 100644 --- a/.github/workflows/push-check.yml +++ b/.github/workflows/push-check.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,7 +19,7 @@ jobs: with: go-version: 1.18 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -36,5 +36,3 @@ jobs: test -z "$(gofmt -s -l .)" go vet -stdmethods=false $(go list ./...) - - name: Unit Test - run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... diff --git a/collection/lscq/asm_arm64.go b/collection/lscq/asm_arm64.go index 9f0e9e31..8e99a499 100644 --- a/collection/lscq/asm_arm64.go +++ b/collection/lscq/asm_arm64.go @@ -1,12 +1,27 @@ +// Copyright 2024 ByteDance Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build arm64 && !gccgo && !appengine // +build arm64,!gccgo,!appengine package lscq import ( - "golang.org/x/sys/cpu" "runtime" "unsafe" + + "golang.org/x/sys/cpu" ) var arm64HasAtomics = detectArm64HasAtomics() diff --git a/collection/lscq/asm_arm64.s b/collection/lscq/asm_arm64.s index d68e19cf..b1fa2595 100644 --- a/collection/lscq/asm_arm64.s +++ b/collection/lscq/asm_arm64.s @@ -1,3 +1,17 @@ +// Copyright 2024 ByteDance Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #include "textflag.h" #include "funcdata.h" diff --git a/collection/skipmap/bench_test.go b/collection/skipmap/bench_test.go index 5e6d872b..ff80a876 100644 --- a/collection/skipmap/bench_test.go +++ b/collection/skipmap/bench_test.go @@ -1,3 +1,17 @@ +// Copyright 2024 ByteDance Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package skipmap import (