|
8 | 8 | RUSTFLAGS: "-Dwarnings"
|
9 | 9 |
|
10 | 10 | jobs:
|
11 |
| - fmt: |
12 |
| - name: Code Formatting Check |
13 |
| - runs-on: ubuntu-latest |
14 |
| - steps: |
15 |
| - - uses: actions/checkout@v4 |
16 |
| - |
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 |
26 | 26 |
|
27 |
| - clippy_check: |
28 |
| - name: Linter Check |
29 |
| - runs-on: ubuntu-latest |
30 |
| - steps: |
31 |
| - - uses: actions/checkout@v4 |
32 |
| - |
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 |
43 | 43 |
|
44 |
| - tests_and_coverage_report: |
45 |
| - name: Tests and Coverage Report |
46 |
| - runs-on: ubuntu-latest |
47 |
| - steps: |
48 |
| - - uses: actions/checkout@v4 |
49 |
| - |
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 }} |
61 | 61 |
|
62 |
| - tests_arm: |
63 |
| - name: Tests (Arm64) |
64 |
| - runs-on: ubuntu-24.04-arm |
65 |
| - steps: |
66 |
| - - uses: actions/checkout@v4 |
67 |
| - |
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 |
70 | 70 |
|
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 |
82 | 82 |
|
83 |
| - bench-build-check: |
84 |
| - name: Check benchmark builds |
85 |
| - runs-on: ubuntu-latest |
86 |
| - steps: |
87 |
| - - uses: actions/checkout@v4 |
88 |
| - |
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 |
91 | 91 |
|
92 | 92 | push-image:
|
93 | 93 | name: Docker Image Build
|
94 | 94 | 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 |
96 | 100 | steps:
|
97 | 101 | - uses: actions/checkout@v4
|
98 | 102 | - uses: docker/login-action@v3
|
99 | 103 | with:
|
100 | 104 | registry: ghcr.io
|
101 | 105 | username: ${{github.actor}}
|
102 | 106 | password: ${{secrets.GITHUB_TOKEN}}
|
103 |
| - - name: Build and push container image |
104 |
| - run: | |
105 |
| - docker build . -f docker/Dockerfile.holod --tag ghcr.io/holo-routing/holod:latest |
106 |
| - docker push ghcr.io/holo-routing/holod:latest |
107 |
| - docker build . -f docker/Dockerfile.holo-bundle --tag ghcr.io/holo-routing/holo-bundle:latest |
108 |
| - docker push ghcr.io/holo-routing/holo-bundle:latest |
| 107 | + |
| 108 | + - name: Build and push holod image |
| 109 | + id: push_holod |
| 110 | + uses: docker/build-push-action@v6 |
| 111 | + with: |
| 112 | + context: . |
| 113 | + file: docker/Dockerfile.holod |
| 114 | + push: true |
| 115 | + tags: ghcr.io/holo-routing/holod:latest |
| 116 | + |
| 117 | + - name: Attest holod image |
| 118 | + uses: actions/attest-build-provenance@v2 |
| 119 | + with: |
| 120 | + subject-name: ghcr.io/holo-routing/holod |
| 121 | + subject-digest: ${{ steps.push_holod.outputs.digest }} |
| 122 | + push-to-registry: true |
| 123 | + |
| 124 | + #- name: Build and push image |
| 125 | + # id: push_holod |
| 126 | + # run: | |
| 127 | + # docker build . -f docker/Dockerfile.holod --tag ghcr.io/holo-routing/holod:latest |
| 128 | + # docker push ghcr.io/holo-routing/holod:latest |
| 129 | + # #docker build . -f docker/Dockerfile.holo-bundle --tag ghcr.io/holo-routing/holo-bundle:latest |
| 130 | + # #docker push ghcr.io/holo-routing/holo-bundle:latest |
| 131 | + #- name: Attest holod image |
| 132 | + # uses: actions/attest-build-provenance@v2 |
| 133 | + # with: |
| 134 | + # subject-name: ghcr.io/holo-routing/holod:latest |
| 135 | + # subject-digest: ${{ steps.push_holod.outputs.digest }} |
| 136 | + # push-to-registry: true |
| 137 | + |
0 commit comments