Hello Ilya, On Wed, May 3, 2023 at 8:06 PM Ilya Maximets <i.maxim...@ovn.org> wrote: > > +function build_dpdk() > > +{ > > + local VERSION_FILE="dpdk-dir/cached-version" > > + local DPDK_VER=$1 > > + local DPDK_OPTS="" > > + > > + rm -rf dpdk-dir > > + > > + if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then > > + git clone --single-branch $DPDK_GIT dpdk-dir -b > > "${DPDK_VER##refs/*/}" > > + git log -1 --oneline > > This git log call should be after we enter dpdk-dir, otherwise > it prints the latest OVS commit, which wasn't the intention.
Indeed. I will restore pushd in both branches. > > > + else > > + wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz > > + tar xvf dpdk-$1.tar.xz > /dev/null > > + DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/") > > + mv ${DIR_NAME} dpdk-dir > > + fi > > + > > + pushd dpdk-dir > > + [snip] > > diff --git a/.github/workflows/build-and-test.yml > > b/.github/workflows/build-and-test.yml > > index 39649c1b5c..45bebefd51 100644 > > --- a/.github/workflows/build-and-test.yml > > +++ b/.github/workflows/build-and-test.yml > > @@ -3,12 +3,79 @@ name: Build and Test > > on: [push, pull_request] > > > > jobs: > > + build-dpdk: > > + env: > > + dependencies: gcc libnuma-dev ninja-build > > + CC: gcc > > + DPDK_VER: 22.11.1 > > + name: dpdk gcc > > + outputs: > > + dpdk_key: ${{ steps.gen_dpdk_key.outputs.key }} > > + runs-on: ubuntu-20.04 > > + timeout-minutes: 30 > > + > > + steps: > > + - name: checkout > > + uses: actions/checkout@v3 > > + > > + - name: update PATH > > + run: | > > + echo "$HOME/bin" >> $GITHUB_PATH > > + echo "$HOME/.local/bin" >> $GITHUB_PATH > > + > > + - name: create ci signature file for the dpdk cache key > > + # This will collect most of DPDK related lines, so hash will be > > different > > + # if something changed in a way we're building DPDK including > > DPDK_VER. > > + # This also allows us to use cache from any branch as long as version > > + # and a way we're building DPDK stays the same. > > + run: | > > + grep -irE 'RTE_|DPDK|meson|ninja' .ci/dpdk-* > dpdk-ci-signature > > + grep -rwE 'DPDK_GIT|DPDK_VER' .github/ >> dpdk-ci-signature > > + if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then > > + git ls-remote --heads $DPDK_GIT $DPDK_VER >> dpdk-ci-signature > > DPDK_GIT is not defined anywhere. This only affects the dpdk-latest branch, > so it can be argued that it should be defined only there. But since this > is part of the code, and someone can technically change the DPDK_VER for > some local branch for testing purposes, I think, we need to define it on > the master branch. What do you think? This will be more explicit, ok for me. -- David Marchand _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev