nexthop: generalize type handling in preparation for L2 #1083
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: BSD-3-Clause | |
| # Copyright (c) 2025 Robin Jarry | |
| --- | |
| name: Package | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_call: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| deb: | |
| if: ${{ github.actor != 'grout-bot' }} | |
| permissions: | |
| actions: write | |
| runs-on: ubuntu-24.04 | |
| container: "debian:stable" | |
| steps: | |
| - name: install system dependencies | |
| run: | | |
| set -xe | |
| apt-get update -qy | |
| apt-get install -qy --no-install-recommends \ | |
| autoconf automake bash-completion bison build-essential debhelper \ | |
| ccache curl devscripts flex git scdoc libarchive-dev libcap-dev \ | |
| libcmocka-dev libedit-dev libelf-dev libevent-dev libibverbs-dev \ | |
| libjson-c-dev libmnl-dev libnuma-dev libprotobuf-c-dev libreadline-dev \ | |
| librtr-dev libsmartcols-dev libtool libyang-dev meson ninja-build \ | |
| patch pkg-config protobuf-c-compiler python3-dev python3-pyelftools \ | |
| systemd-dev texinfo | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # force fetch all history | |
| persist-credentials: false | |
| - run: git config --global --add safe.directory $PWD | |
| - run: git fetch --force origin 'refs/tags/v*:refs/tags/v*' | |
| - run: echo "CCACHE_DIR=$(ccache -k cache_dir)" >> $GITHUB_ENV | |
| - uses: actions/cache/restore@v4 | |
| id: cache | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-x86_64-deb | |
| - run: ccache -z | |
| - uses: ./.github/actions/frr-install | |
| with: | |
| sysconfdir: /etc | |
| libdir: /usr/lib/x86_64-linux-gnu | |
| libexecdir: /usr/libexec/frr | |
| sbindir: /usr/lib/frr | |
| localstatedir: /run/frr | |
| yangmodelsdir: /usr/share/frr-yang | |
| - run: make deb CC="ccache gcc" | |
| - run: ccache -sv | |
| - name: delete old cache | |
| if: ${{ ! github.event.pull_request }} | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| try { | |
| await github.rest.actions.deleteActionsCacheByKey({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| key: "${{ steps.cache.outputs.cache-primary-key }}" | |
| }); | |
| } catch (error) { | |
| if (error.status !== 404) throw error; | |
| } | |
| - uses: actions/cache/save@v4 | |
| if: ${{ ! github.event.pull_request }} | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ${{ steps.cache.outputs.cache-primary-key }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: deb-packages | |
| path: grout*.deb | |
| retention-days: 5 | |
| rpm: | |
| if: ${{ github.actor != 'grout-bot' }} | |
| permissions: | |
| actions: write | |
| runs-on: ubuntu-24.04 | |
| container: "quay.io/centos/centos:stream9" | |
| steps: | |
| - name: install system dependencies | |
| run: | | |
| set -xe | |
| dnf install -y https://rpm.frrouting.org/repo/frr-10-repo.el9.noarch.rpm | |
| dnf install -y epel-release | |
| dnf --enablerepo=crb install -y --nodocs --setopt=install_weak_deps=0 \ | |
| autoconf automake bison ccache elfutils-libelf-devel flex gcc-toolset-13 \ | |
| git scdoc json-c-devel libarchive-devel \ | |
| libcap-devel libcmocka-devel libedit-devel libevent-devel libmnl-devel \ | |
| libsmartcols-devel libyang-devel libtool make meson ninja-build \ | |
| numactl-devel pkgconf protobuf-c-compiler protobuf-c-devel \ | |
| python3-pyelftools python3-devel rdma-core-devel readline-devel \ | |
| rpm-build scl-utils systemd | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # force fetch all history | |
| persist-credentials: false | |
| - run: git config --global --add safe.directory $PWD | |
| - run: git fetch --force origin 'refs/tags/v*:refs/tags/v*' | |
| - run: echo "CCACHE_DIR=$(ccache -k cache_dir)" >> $GITHUB_ENV | |
| - uses: actions/cache/restore@v4 | |
| id: cache | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ccache-x86_64-rpm | |
| - run: ccache -z | |
| - uses: ./.github/actions/frr-install | |
| with: | |
| sysconfdir: /etc | |
| libdir: /usr/lib64 | |
| libexecdir: /usr/libexec/frr | |
| sbindir: /usr/lib64/frr | |
| localstatedir: /var | |
| yangmodelsdir: /usr/share/frr-yang | |
| - run: scl run gcc-toolset-13 -- make rpm CC="ccache gcc" | |
| - run: ccache -sv | |
| - name: delete old cache | |
| if: ${{ ! github.event.pull_request }} | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| try { | |
| await github.rest.actions.deleteActionsCacheByKey({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| key: "${{ steps.cache.outputs.cache-primary-key }}" | |
| }); | |
| } catch (error) { | |
| if (error.status !== 404) throw error; | |
| } | |
| - uses: actions/cache/save@v4 | |
| if: ${{ ! github.event.pull_request }} | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ${{ steps.cache.outputs.cache-primary-key }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpm-packages | |
| path: grout*.rpm | |
| retention-days: 5 |