Skip to content

Commit d0dd3a2

Browse files
authored
Merge pull request #401 from dave-tucker/ovn-kubernetes
chore: Update import paths
2 parents ce19516 + e6c1d56 commit d0dd3a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+270
-351
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,71 @@ name: libovsdb-ci
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
build:
1111
name: Build & Unit Test
1212
runs-on: ubuntu-latest
1313
steps:
14+
- name: Set up Go 1.18
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: 1.18
18+
id: go
1419

15-
- name: Set up Go 1.18
16-
uses: actions/setup-go@v2
17-
with:
18-
go-version: 1.18
19-
id: go
20+
- name: Install benchstat
21+
run: go install golang.org/x/perf/cmd/benchstat@35ce918200397a6ae0d8cf3f7699c1a965346eda
2022

21-
- name: Install benchstat
22-
run: go install golang.org/x/perf/cmd/benchstat@latest
23+
- name: Check out code into the Go module directory
24+
uses: actions/checkout@v4
2325

24-
- name: Check out code into the Go module directory
25-
uses: actions/checkout@v2
26+
- name: Generate Code
27+
run: make prebuild
2628

27-
- name: Generate Code
28-
run: make prebuild
29+
# This cannot be run in parallel because we require running go-generate first
30+
# We need to skip the go installation and caching to avoid "File exists" errors in tbe logs
31+
- name: Lint
32+
run: make lint
2933

30-
# This cannot be run in parallel because we require running go-generate first
31-
# We need to skip the go installation and caching to avoid "File exists" errors in tbe logs
32-
- name: Lint
33-
run: make lint
34+
- name: Build
35+
run: make build
3436

35-
- name: Build
36-
run: make build
37+
- name: Test
38+
run: make test
3739

38-
- name: Test
39-
run: make test
40+
- name: Test
41+
run: make integration-test
4042

41-
- name: Test
42-
run: make integration-test
43+
- name: Generate coverage
44+
run: make coverage
4345

44-
- name: Generate coverage
45-
run: make coverage
46+
- name: Upload test coverage
47+
uses: shogo82148/actions-goveralls@v1
48+
with:
49+
path-to-profile: profile.cov
4650

47-
- name: Upload test coverage
48-
uses: shogo82148/actions-goveralls@v1
49-
with:
50-
path-to-profile: profile.cov
51+
- name: Benchmark
52+
run: make bench
5153

52-
- name: Benchmark
53-
run: make bench
54+
- name: Restore Latest Main Benchmark
55+
id: old-benchmark
56+
uses: actions/cache@v4
57+
with:
58+
path: bench-main.out
59+
key: benchmark-main-${{ hashfiles('**/*.go') }}
60+
restore-keys: |
61+
benchmark-main-
5462
55-
- name: Restore Latest Main Benchmark
56-
id: old-benchmark
57-
uses: actions/cache@v2
58-
with:
59-
path: bench-main.out
60-
key: benchmark-main-${{ hashfiles('**/*.go') }}
61-
restore-keys: |
62-
benchmark-main-
63+
- name: Compare Benchmarks
64+
if: hashFiles('bench-main.out') != ''
65+
run: benchstat bench-main.out bench.out
6366

64-
- name: Compare Benchmarks
65-
if: hashFiles('bench-main.out') != ''
66-
run: benchstat bench-main.out bench.out
67-
68-
- name: Create New Main Benchmark On Cache Miss
69-
if: steps.old-benchmark.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
70-
run: cp -f bench.out bench-main.out
67+
- name: Create New Main Benchmark On Cache Miss
68+
if: steps.old-benchmark.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
69+
run: cp -f bench.out bench-main.out
7170

7271
test:
7372
name: Integration Test
@@ -80,18 +79,18 @@ jobs:
8079
- 2.13.0
8180

8281
runs-on: ubuntu-latest
83-
82+
8483
steps:
85-
- name: Set up Go 1.18
86-
uses: actions/setup-go@v1
87-
with:
88-
go-version: 1.18
89-
id: go
90-
91-
- name: Check out code into the Go module directory
92-
uses: actions/checkout@v2
93-
94-
- name: Integration Test
95-
run: make integration-test
96-
env:
97-
OVS_IMAGE_TAG: ${{ matrix.ovs_version }}
84+
- name: Set up Go 1.18
85+
uses: actions/setup-go@v5
86+
with:
87+
go-version: 1.18
88+
id: go
89+
90+
- name: Check out code into the Go module directory
91+
uses: actions/checkout@v4
92+
93+
- name: Integration Test
94+
run: make integration-test
95+
env:
96+
OVS_IMAGE_TAG: ${{ matrix.ovs_version }}

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/images.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,53 @@ name: libovsdb-images
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
schedule:
77
# run weekly to ensure our copy of ovs is up-to-date
8-
- cron: '42 0 * * 0'
8+
- cron: "42 0 * * 0"
99

1010
jobs:
11-
1211
build:
1312
name: Build
1413
if: github.repository == 'ovn-org/libovsdb'
1514
runs-on: ubuntu-latest
1615
strategy:
1716
matrix:
1817
image:
19-
- ovs_version: master
20-
tag: latest
21-
- ovs_version: v2.15.0
22-
tag: 2.15.0
23-
- ovs_version: v2.14.0
24-
tag: 2.14.0
25-
- ovs_version: v2.13.0
26-
tag: 2.13.0
27-
18+
- ovs_version: master
19+
tag: latest
20+
- ovs_version: v2.15.0
21+
tag: 2.15.0
22+
- ovs_version: v2.14.0
23+
tag: 2.14.0
24+
- ovs_version: v2.13.0
25+
tag: 2.13.0
2826

2927
steps:
3028
- name: Check Out Repo
31-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3230

3331
- name: Set up Docker Buildx
3432
id: buildx
35-
uses: docker/setup-buildx-action@v1
33+
uses: docker/setup-buildx-action@v3
3634

3735
- name: Cache Docker layers
38-
uses: actions/cache@v2
36+
uses: actions/cache@v4
3937
with:
4038
path: /tmp/.buildx-cache
4139
key: ${{ runner.os }}-buildx-${{ github.sha }}
4240
restore-keys: |
4341
${{ runner.os }}-buildx-
4442
4543
- name: Login to Docker Hub
46-
uses: docker/login-action@v1
44+
uses: docker/login-action@v3
4745
with:
4846
username: ${{ secrets.DOCKER_HUB_USERNAME }}
4947
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
5048

5149
- name: Build and push
5250
id: docker_build
53-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
5452
with:
5553
context: ovs
5654
builder: ${{ steps.buildx.outputs.name }}
@@ -61,4 +59,4 @@ jobs:
6159
cache-to: type=local,dest=/tmp/.buildx-cache
6260

6361
- name: Image digest
64-
run: echo ${{ steps.docker_build.outputs.digest }}
62+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: 'libovsdb-release'
1+
name: "libovsdb-release"
22
on:
33
push:
44
tags:
5-
- '*'
5+
- "*"
66

77
jobs:
88
release:
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- name: Build Changelog
1313
id: github_release
14-
uses: mikepenz/release-changelog-builder-action@v2
14+
uses: mikepenz/release-changelog-builder-action@v5
1515
env:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1717

@@ -22,4 +22,4 @@ jobs:
2222
release_name: ${{ github.ref }}
2323
body: ${{steps.github_release.outputs.changelog}}
2424
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

HACKING.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
HACKING
2-
=======
1+
# HACKING
32

43
## Getting Set Up
54

65
Assuming you already have a Go environment set up.
76

8-
go get github.com/ovn-org/libovsdb
9-
cd $GOPATH/src/github.com/ovn-org/libovsdb
7+
go get github.com/ovn-kubernetes/libovsdb
8+
cd $GOPATH/src/github.com/ovn-kubernetes/libovsdb
109

1110
You can use [`hub`](https://hub.github.com) to fork the repo
1211

@@ -19,9 +18,7 @@ You can use [`hub`](https://hub.github.com) to fork the repo
1918
## Hacking
2019

2120
Pull a local branch before you start developing.
22-
Convention for branches is
23-
- `bug/1234` for a branch that addresses a specific bug
24-
- `feature/awesome` for a branch that implements an awesome feature
21+
Convention for branches is - `bug/1234` for a branch that addresses a specific bug - `feature/awesome` for a branch that implements an awesome feature
2522

2623
If your work is a minor, you can call the branch whatever you like (within reason).
2724

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test: prebuild
2626
.PHONY: integration-test
2727
integration-test:
2828
@echo "+ $@"
29-
@go test -race -coverprofile=integration.cov -coverpkg=github.com/ovn-org/libovsdb/... -timeout 60s -v ./test/ovs
29+
@go test -race -coverprofile=integration.cov -coverpkg=github.com/ovn-kubernetes/libovsdb/... -timeout 60s -v ./test/ovs
3030

3131
.PHONY: coverage
3232
coverage: test integration-test
@@ -44,7 +44,7 @@ install-deps:
4444
@echo "+ $@"
4545
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0
4646
@golangci-lint --version
47-
@go install golang.org/x/perf/cmd/benchstat@latest
47+
@go install golang.org/x/perf/cmd/benchstat@35ce918200397a6ae0d8cf3f7699c1a965346eda
4848

4949
.PHONY: lint
5050
lint: install-deps prebuild

0 commit comments

Comments
 (0)