On 4/21/23 15:22, Ales Musil wrote: > On Fri, Apr 21, 2023 at 3:09 PM Dumitru Ceara <[email protected]> wrote: > >> On 4/17/23 16:47, Ales Musil wrote: >>> Move the ci.sh script into .ci folder >>> and remove the linux-prepare.sh as it >>> is no longer needed with all the requirements >>> installed in container. >>> >>> Signed-off-by: Ales Musil <[email protected]> >>> --- >>> {utilities/containers => .ci}/ci.sh | 0 >>> .ci/linux-prepare.sh | 21 ----------- >>> .github/workflows/test.yml | 54 ++--------------------------- >>> Makefile.am | 2 +- >>> utilities/automake.mk | 1 - >>> 5 files changed, 3 insertions(+), 75 deletions(-) >>> rename {utilities/containers => .ci}/ci.sh (100%) >>> delete mode 100755 .ci/linux-prepare.sh >>> >>> diff --git a/utilities/containers/ci.sh b/.ci/ci.sh >>> similarity index 100% >>> rename from utilities/containers/ci.sh >>> rename to .ci/ci.sh >>> diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh >>> deleted file mode 100755 >>> index 6617d0c42..000000000 >>> --- a/.ci/linux-prepare.sh >>> +++ /dev/null >>> @@ -1,21 +0,0 @@ >>> -#!/bin/bash >>> - >>> -set -ev >>> - >>> -# Build and install sparse. >>> -# >>> -# Explicitly disable sparse support for llvm because some travis >>> -# environments claim to have LLVM (llvm-config exists and works) but >>> -# linking against it fails. >>> -# Disabling sqlite support because sindex build fails and we don't >>> -# really need this utility being installed. >>> -git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git >>> -cd sparse && make -j4 HAVE_LLVM= HAVE_SQLITE= install && cd .. >>> - >>> -# Installing wheel separately because it may be needed to build some >>> -# of the packages during dependency backtracking and pip >= 22.0 will >>> -# abort backtracking on build failures: >>> -# https://github.com/pypa/pip/issues/10655 >>> -pip3 install --disable-pip-version-check --user wheel >>> -pip3 install --disable-pip-version-check --user \ >>> --r utilities/containers/py-requirements.txt >>> diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml >>> index b41f95936..3251d2385 100644 >>> --- a/.github/workflows/test.yml >>> +++ b/.github/workflows/test.yml >>> @@ -14,12 +14,7 @@ concurrency: >>> jobs: >>> build-linux: >>> env: >>> - dependencies: | >>> - automake libtool gcc bc libjemalloc2 libjemalloc-dev \ >>> - libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev \ >>> - selinux-policy-dev ncat python3-scapy isc-dhcp-server \ >>> - iputils-arping >>> - m32_dependecies: gcc-multilib >>> + IMAGE_NAME: ghcr.io/ovn-org/ovn-tests:ubuntu >>> ARCH: ${{ matrix.cfg.arch }} >>> CC: ${{ matrix.cfg.compiler }} >>> LIBS: ${{ matrix.cfg.libs }} >>> @@ -89,53 +84,8 @@ jobs: >>> sort -V | tail -1) >>> working-directory: ovs >>> >>> - - name: update APT cache >>> - run: sudo apt update >>> - >>> - - name: remove netcat-openbsd >>> - run: sudo apt remove -y netcat-openbsd >>> - >>> - - name: install required dependencies >>> - run: sudo apt install -y ${{ env.dependencies }} >>> - >>> - - name: install libunbound libunwind >>> - if: matrix.cfg.arch != 'x86' >>> - run: sudo apt install -y libunbound-dev libunwind-dev >>> - >>> - - name: install 32-bit dependencies >>> - if: matrix.cfg.arch == 'x86' >>> - run: sudo apt install -y ${{ env.m32_dependecies }} >>> - >>> - - name: update PATH >>> - run: | >>> - echo "$HOME/bin" >> $GITHUB_PATH >>> - echo "$HOME/.local/bin" >> $GITHUB_PATH >>> - >>> - - name: set up python >>> - uses: actions/setup-python@v4 >>> - with: >>> - python-version: '3.x' >>> - >>> - - name: prepare >>> - run: ./.ci/linux-prepare.sh >>> - >>> - name: build >>> - run: ./.ci/linux-build.sh >>> - >>> - - name: copy logs on failure >>> - if: failure() || cancelled() >>> - run: | >>> - # upload-artifact@v3 throws exceptions if it tries to upload >> socket >>> - # files and we could have some socket files in testsuite.dir. >>> - # Also, upload-artifact@v3 doesn't work well enough with >> wildcards. >>> - # So, we're just archiving everything here to avoid any issues. >>> - mkdir logs >>> - cp config.log ./logs/ >>> - cp -r ./*/_build/sub/tests/testsuite.* ./logs/ || true >>> - # System tests are run as root, need to adjust permissions. >>> - sudo chmod -R +r ./tests/system-kmod-testsuite.* || true >>> - cp -r ./tests/system-kmod-testsuite.* ./logs/ || true >>> - tar -czvf logs.tgz logs/ >>> + run: sudo -E ./.ci/ci.sh --archive-logs >> >> Like this we lose the (minor) side effect that we were running self >> tests as non-root in CI. This is what usually people do too on their >> dev machines. >> >> I think I'd prefer if we could keep that. >> >> What do you think of this incremental change? I can fold it in if it >> looks OK to you: >> >> diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml >> index a89f8a6df1..1d0996ceff 100644 >> --- a/.github/workflows/test.yml >> +++ b/.github/workflows/test.yml >> @@ -85,8 +85,13 @@ jobs: >> working-directory: ovs >> >> - name: build >> + if: ${{ startsWith(matrix.cfg.testsuite, 'system-test') }} >> run: sudo -E ./.ci/ci.sh --archive-logs >> >> + - name: build >> + if: ${{ !startsWith(matrix.cfg.testsuite, 'system-test') }} >> + run: ./.ci/ci.sh --archive-logs >> + >> - name: upload logs on failure >> if: failure() || cancelled() >> uses: actions/upload-artifact@v3 >> --- >> >> > Looks good, thank you. >
I folded the change in and applied the patch to main, thanks! _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
