mirror of
https://github.com/ii64/sonic.git
synced 2026-06-23 01:46:44 +08:00
chore(ci): setup self-hosted runner for ci (#158)
This commit is contained in:
parent
8203bbac35
commit
188e829dd7
6 changed files with 25 additions and 16 deletions
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -23,7 +23,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.17
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
14
.github/workflows/license-check.yml
vendored
Normal file
14
.github/workflows/license-check.yml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
name: License Check
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Check License Header
|
||||||
|
uses: apache/skywalking-eyes@main
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
6
.github/workflows/pr-check.yml
vendored
6
.github/workflows/pr-check.yml
vendored
|
|
@ -4,7 +4,7 @@ on: pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.17
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -24,4 +24,4 @@ jobs:
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Benchmark
|
- name: Benchmark
|
||||||
run: go test -bench=. -benchmem -run=none ./...
|
run: GOMAXPROCS=4 go test -bench=. -benchmem -run=none ./...
|
||||||
|
|
|
||||||
4
.github/workflows/push-check-go115.yml
vendored
4
.github/workflows/push-check-go115.yml
vendored
|
|
@ -4,7 +4,7 @@ on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
@ -21,4 +21,4 @@ jobs:
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Unit Test
|
- name: Unit Test
|
||||||
run: go test -v -covermode=atomic -coverprofile=coverage.out ./...
|
run: GOMAXPROCS=4 go test -v -covermode=atomic -coverprofile=coverage.out ./...
|
||||||
|
|
|
||||||
4
.github/workflows/push-check-go116.yml
vendored
4
.github/workflows/push-check-go116.yml
vendored
|
|
@ -4,7 +4,7 @@ on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
@ -21,4 +21,4 @@ jobs:
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Unit Test
|
- name: Unit Test
|
||||||
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
|
run: GOMAXPROCS=4 go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
|
||||||
|
|
|
||||||
9
.github/workflows/push-check-go117.yml
vendored
9
.github/workflows/push-check-go117.yml
vendored
|
|
@ -4,7 +4,7 @@ on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
@ -20,10 +20,5 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Check License Header
|
|
||||||
uses: apache/skywalking-eyes@main
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Unit Test
|
- name: Unit Test
|
||||||
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
|
run: GOMAXPROCS=4 go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue