Skip to content

Commit 1fd5dea

Browse files
committed
attest test
1 parent 92eae0b commit 1fd5dea

File tree

1 file changed

+90
-76
lines changed

1 file changed

+90
-76
lines changed

.github/workflows/ci.yaml

Lines changed: 90 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -8,91 +8,95 @@ env:
88
RUSTFLAGS: "-Dwarnings"
99

1010
jobs:
11-
fmt:
12-
name: Code Formatting Check
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: dtolnay/[email protected]
17-
with:
18-
components: rustfmt
19-
- uses: Swatinem/rust-cache@v2
20-
- name: "rustfmt --check"
21-
run: |
22-
if ! rustfmt --check --edition 2024 $(git ls-files '*.rs'); then
23-
printf "Please run \`rustfmt --edition 2024 \$(git ls-files '*.rs')\` to fix rustfmt errors.\nSee CONTRIBUTING.md for more details.\n" >&2
24-
exit 1
25-
fi
11+
#fmt:
12+
# name: Code Formatting Check
13+
# runs-on: ubuntu-latest
14+
# steps:
15+
# - uses: actions/checkout@v4
16+
# - uses: dtolnay/[email protected]
17+
# with:
18+
# components: rustfmt
19+
# - uses: Swatinem/rust-cache@v2
20+
# - name: "rustfmt --check"
21+
# run: |
22+
# if ! rustfmt --check --edition 2024 $(git ls-files '*.rs'); then
23+
# printf "Please run \`rustfmt --edition 2024 \$(git ls-files '*.rs')\` to fix rustfmt errors.\nSee CONTRIBUTING.md for more details.\n" >&2
24+
# exit 1
25+
# fi
2626

27-
clippy_check:
28-
name: Linter Check
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
- uses: dtolnay/[email protected]
33-
with:
34-
components: clippy
35-
- name: Install Protocol Buffers Compiler
36-
run: sudo apt-get install -y protobuf-compiler
37-
- name: Set PROTOC Environment Variable
38-
run: export PROTOC=/path/to/protoc
39-
- name: Run Clippy
40-
run: cargo clippy
41-
- name: Run Clippy
42-
run: cargo clippy --package holo-tools
27+
#clippy_check:
28+
# name: Linter Check
29+
# runs-on: ubuntu-latest
30+
# steps:
31+
# - uses: actions/checkout@v4
32+
# - uses: dtolnay/[email protected]
33+
# with:
34+
# components: clippy
35+
# - name: Install Protocol Buffers Compiler
36+
# run: sudo apt-get install -y protobuf-compiler
37+
# - name: Set PROTOC Environment Variable
38+
# run: export PROTOC=/path/to/protoc
39+
# - name: Run Clippy
40+
# run: cargo clippy
41+
# - name: Run Clippy
42+
# run: cargo clippy --package holo-tools
4343

44-
tests_and_coverage_report:
45-
name: Tests and Coverage Report
46-
runs-on: ubuntu-latest
47-
steps:
48-
- uses: actions/checkout@v4
49-
- uses: dtolnay/[email protected]
50-
- name: Install cargo-llvm-cov
51-
uses: taiki-e/install-action@cargo-llvm-cov
52-
- name: Generate code coverage
53-
run: cargo llvm-cov --all-features --codecov --output-path codecov.json -p holo-bfd -p holo-bgp -p holo-isis -p holo-ldp -p holo-ospf -p holo-rip -p holo-vrrp
54-
- name: Upload to Codecov
55-
uses: codecov/codecov-action@v4
56-
if: github.event_name != 'pull_request'
57-
with:
58-
files: ./lcov.info
59-
fail_ci_if_error: false
60-
token: ${{ secrets.CODECOV_TOKEN }}
44+
#tests_and_coverage_report:
45+
# name: Tests and Coverage Report
46+
# runs-on: ubuntu-latest
47+
# steps:
48+
# - uses: actions/checkout@v4
49+
# - uses: dtolnay/[email protected]
50+
# - name: Install cargo-llvm-cov
51+
# uses: taiki-e/install-action@cargo-llvm-cov
52+
# - name: Generate code coverage
53+
# run: cargo llvm-cov --all-features --codecov --output-path codecov.json -p holo-bfd -p holo-bgp -p holo-isis -p holo-ldp -p holo-ospf -p holo-rip -p holo-vrrp
54+
# - name: Upload to Codecov
55+
# uses: codecov/codecov-action@v4
56+
# if: github.event_name != 'pull_request'
57+
# with:
58+
# files: ./lcov.info
59+
# fail_ci_if_error: false
60+
# token: ${{ secrets.CODECOV_TOKEN }}
6161

62-
tests_arm:
63-
name: Tests (Arm64)
64-
runs-on: ubuntu-24.04-arm
65-
steps:
66-
- uses: actions/checkout@v4
67-
- uses: dtolnay/[email protected]
68-
- name: Run tests
69-
run: cargo test --all-features -p holo-bfd -p holo-bgp -p holo-isis -p holo-ldp -p holo-ospf -p holo-rip -p holo-vrrp
62+
#tests_arm:
63+
# name: Tests (Arm64)
64+
# runs-on: ubuntu-24.04-arm
65+
# steps:
66+
# - uses: actions/checkout@v4
67+
# - uses: dtolnay/[email protected]
68+
# - name: Run tests
69+
# run: cargo test --all-features -p holo-bfd -p holo-bgp -p holo-isis -p holo-ldp -p holo-ospf -p holo-rip -p holo-vrrp
7070

71-
fuzz-build-check:
72-
name: Check fuzz targets build
73-
runs-on: ubuntu-latest
74-
steps:
75-
- uses: actions/checkout@v4
76-
# cargo-fuzz requires nightly Rust due to LLVM sanitizer support
77-
- uses: dtolnay/rust-toolchain@nightly
78-
- name: Install cargo-fuzz
79-
run: cargo install cargo-fuzz
80-
- name: Check fuzz targets
81-
run: cargo fuzz check
71+
#fuzz-build-check:
72+
# name: Check fuzz targets build
73+
# runs-on: ubuntu-latest
74+
# steps:
75+
# - uses: actions/checkout@v4
76+
# # cargo-fuzz requires nightly Rust due to LLVM sanitizer support
77+
# - uses: dtolnay/rust-toolchain@nightly
78+
# - name: Install cargo-fuzz
79+
# run: cargo install cargo-fuzz
80+
# - name: Check fuzz targets
81+
# run: cargo fuzz check
8282

83-
bench-build-check:
84-
name: Check benchmark builds
85-
runs-on: ubuntu-latest
86-
steps:
87-
- uses: actions/checkout@v4
88-
- uses: dtolnay/[email protected]
89-
- name: Check benchmark builds
90-
run: cargo bench --no-run -p holo-bgp -p holo-ldp -p holo-ospf
83+
#bench-build-check:
84+
# name: Check benchmark builds
85+
# runs-on: ubuntu-latest
86+
# steps:
87+
# - uses: actions/checkout@v4
88+
# - uses: dtolnay/[email protected]
89+
# - name: Check benchmark builds
90+
# run: cargo bench --no-run -p holo-bgp -p holo-ldp -p holo-ospf
9191

9292
push-image:
9393
name: Docker Image Build
9494
runs-on: ubuntu-latest
95-
if: github.ref == 'refs/heads/master' && github.repository_owner == 'holo-routing'
95+
#if: github.ref == 'refs/heads/master' && github.repository_owner == 'holo-routing'
96+
permissions:
97+
id-token: write
98+
attestations: write
99+
packages: write
96100
steps:
97101
- uses: actions/checkout@v4
98102
- uses: docker/login-action@v3
@@ -106,3 +110,13 @@ jobs:
106110
docker push ghcr.io/holo-routing/holod:latest
107111
docker build . -f docker/Dockerfile.holo-bundle --tag ghcr.io/holo-routing/holo-bundle:latest
108112
docker push ghcr.io/holo-routing/holo-bundle:latest
113+
- name: Attest holod image
114+
uses: actions/attest-build-provenance@v2
115+
with:
116+
subject-name: ghcr.io/holo-routing/holod:latest
117+
push-to-registry: true
118+
- name: Attest holo-bundle image
119+
uses: actions/attest-build-provenance@v2
120+
with:
121+
subject-name: ghcr.io/holo-routing/holo-bundle:latest
122+
push-to-registry: true

0 commit comments

Comments
 (0)