Skip to content

Commit c81cf50

Browse files
committed
Fedora Workflow
1 parent f7a3825 commit c81cf50

1 file changed

Lines changed: 5 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,22 @@ permissions:
1515

1616
jobs:
1717
build-test:
18-
runs-on: ubuntu-latest
18+
runs-on: fedora-latest
19+
container:
20+
image: registry.fedoraproject.org/fedora:latest
1921
timeout-minutes: 15
2022
steps:
21-
- uses: actions/checkout@v4
22-
23-
- uses: actions/setup-go@v5
24-
with:
25-
go-version-file: go.mod
26-
cache: true
27-
28-
- name: Install BPF and CGO dependencies
29-
run: |
30-
sudo apt-get update
31-
sudo apt-get install -y libbpf-dev clang llvm
32-
33-
- name: gofmt
34-
run: |
35-
test -z "$(gofmt -l .)" || (echo "Run: gofmt -w on:" && gofmt -l . && exit 1)
36-
37-
- name: go vet
38-
run: go vet ./...
39-
40-
- name: go test
41-
run: go test ./... -short -count=1
42-
43-
- name: go generate (BPF / bpf2go)
44-
run: go generate ./...
45-
46-
- name: go build (CGO, after generate)
47-
run: |
48-
COMMIT=$(echo "${GITHUB_SHA}" | cut -c1-7)
49-
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
50-
CGO_ENABLED=1 go build -ldflags "-X main.Version=ci -X main.GitCommit=${COMMIT} -X main.BuildTime=${TS}" -o spectral-mesh .
51-
52-
- name: go build spectral-edge (no CGO)
23+
- name: Install git and BPF/CGO dependencies
5324
run: |
54-
COMMIT=$(echo "${GITHUB_SHA}" | cut -c1-7)
55-
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
56-
CGO_ENABLED=0 go build -ldflags "-X main.Version=ci -X main.GitCommit=${COMMIT} -X main.BuildTime=${TS}" -o spectral-edge ./cmd/spectral-edge
25+
dnf install -y git ca-certificates libbpf-devel clang llvm gcc make
5726
58-
test-linux-arm64:
59-
runs-on: ubuntu-24.04-arm
60-
timeout-minutes: 15
61-
steps:
6227
- uses: actions/checkout@v4
6328

6429
- uses: actions/setup-go@v5
6530
with:
6631
go-version-file: go.mod
6732
cache: true
6833

69-
- name: Install BPF and CGO dependencies
70-
run: |
71-
sudo apt-get update
72-
sudo apt-get install -y libbpf-dev clang llvm
73-
7434
- name: gofmt
7535
run: |
7636
test -z "$(gofmt -l .)" || (echo "Run: gofmt -w on:" && gofmt -l . && exit 1)

0 commit comments

Comments
 (0)