From: Kamalesh Babulal Date: Mon, 31 Oct 2022 17:10:29 +0000 (-0600) Subject: tests: remove github/{actions,workflows} X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43152397e815b69ce422d5559fd883bd224fafff;p=thirdparty%2Flibcgroup.git tests: remove github/{actions,workflows} Remove the GitHub actions and workflows from the tests directory, they are not run anymore after the movement of libcgroup-tests into libcgroup repo. Also, the libcgroup repo covers all the steps executed by libcgroup-test actions/workflows. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka (cherry picked from commit 206f96d01122430c6b48cde93df84ec68f1a3c0a) --- diff --git a/tests/.github/actions/setup-libcgroup/action.yml b/tests/.github/actions/setup-libcgroup/action.yml deleted file mode 100644 index 26c62192..00000000 --- a/tests/.github/actions/setup-libcgroup/action.yml +++ /dev/null @@ -1,70 +0,0 @@ -# -# Action to setup the libcgroup directory -# -# Copyright (c) 2022 Oracle and/or its affiliates. -# Author: Tom Hromatka -# - -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of version 2.1 of the GNU Lesser General Public License as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, see . -# - -name: Setup the libcgroup directory -description: "Install dependencies, git clone, bootstrap, configure, and make libcgroup" -runs: - using: "composite" - steps: - - run: sudo apt-get update - shell: bash - - run: sudo apt-get install libpam-dev lcov python3-pip python3-dev - shell: bash - - run: sudo pip install cython - shell: bash - - run: rm -fr tests/ - shell: bash - - run: | - mkdir -p tests - mv Makefile.am tests/ - mv ftests/ tests/ - mv gunit/ tests/ - mv .gitmodules tests/ - mv .git tests/ - shell: bash - - run: git clone https://github.com/libcgroup/libcgroup libcg - shell: bash - - run: | - rm -rf libcg/.github - rm -fr libcg/tests - mv libcg/* ./ - mv libcg/.gitmodules ./ - mv libcg/.git ./ - shell: bash - - run: | - git submodule update --init --recursive -- googletest - pushd googletest/googletest - git checkout release-1.8.0 - cmake -DBUILD_SHARED_LIBS=ON . - make - popd - shell: bash - - run: | - test -d m4 || mkdir m4 - autoreconf -fi - rm -fr autom4te.cache - shell: bash - - run: CFLAGS="$CFLAGS -g -O0 -Werror" ./configure --sysconfdir=/etc --localstatedir=/var --enable-code-coverage --enable-opaque-hierarchy="name=systemd" --enable-python - shell: bash - - run: make - shell: bash - - run: lcov -i -d . -c -o lcov.base - shell: bash diff --git a/tests/.github/workflows/continuous-integration.yml b/tests/.github/workflows/continuous-integration.yml deleted file mode 100644 index b92d5b19..00000000 --- a/tests/.github/workflows/continuous-integration.yml +++ /dev/null @@ -1,166 +0,0 @@ -# -# Continuous Integration Workflow for libcgroup-tests -# -# Copyright (c) 2022 Oracle and/or its affiliates. -# Author: Tom Hromatka -# - -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of version 2.1 of the GNU Lesser General Public License as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, see . -# - -name: Continuous Integration -on: ["push", "pull_request"] - -jobs: - flake8-lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Check out source repository - uses: actions/checkout@v2 - - name: Set up Python environment - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: flake8 Lint - uses: reviewdog/action-flake8@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - # Thanks to github user @martyrs - # https://github.community/t/how-to-properly-clean-up-self-hosted-runners/128909/3 - cleaner: - name: Delete Self-Hosted Runner Workspaces - runs-on: self-hosted - steps: - - name: Delete workspace path - run: | - echo "Cleaning up previous run" - rm -rf "${{ github.workspace }}" - - unittests: - name: Unit Tests - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - submodules: false - - name: Initialize the directory - uses: ./.github/actions/setup-libcgroup - - name: Run unit tests - run: | - pushd tests/gunit - make check - popd - - name: Display test logs - if: ${{ always() }} - run: cat tests/gunit/test-suite.log - - functionaltestsv1: - name: Cgroup v1 Functional Tests - runs-on: ubuntu-latest - - steps: - - name: Install container dependencies - run: sudo apt-get install lxc lxd - - uses: actions/checkout@v2 - with: - submodules: false - - name: Initialize the directory - uses: ./.github/actions/setup-libcgroup - - name: Run functional tests - run: | - # The cgroup v1 runner hosted by Github Actions doesn't allow - # for exclusive cpusets. Thus, skip the cpuset automated test - pushd src/python/build/lib.* - export PYTHONPATH=$PYTHONPATH:$(pwd) - popd - pushd tests/ftests - ./ftests.py -l 10 -L ftests.log - ./ftests.py -l 10 -L ftests-nocontainer.log --skip 38 --no-container - popd - - functionaltestsv1v2: - name: Cgroup v1/v2 Functional Tests - runs-on: ubuntu-20.04 - - steps: - - name: Mount cpuset cgroup v2 controller - run: | - # unmount the cpuset v1 controller. This should make it available - # in the v2 hierarchy after all references have been freed - sudo umount /sys/fs/cgroup/cpuset - # wait for the references to the cpuset controller to go away - sleep 30 - cat /sys/fs/cgroup/unified/cgroup.controllers - sudo su -c "echo +cpuset > /sys/fs/cgroup/unified/cgroup.subtree_control" - cat /sys/fs/cgroup/unified/cgroup.subtree_control - - name: Install container dependencies - run: sudo apt-get install lxc lxd - - uses: actions/checkout@v2 - with: - submodules: false - - name: Initialize the directory - uses: ./.github/actions/setup-libcgroup - - name: Run functional tests - run: | - pushd src/python/build/lib.* - export PYTHONPATH=$PYTHONPATH:$(pwd) - popd - pushd tests/ftests - make check - popd - - name: Display test logs - if: ${{ always() }} - run: | - cat tests/ftests/ftests.sh.log - cat tests/ftests/ftests-nocontainer.sh.log - - name: Archive test logs - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: Cgroup v1v2 test logs - path: tests/ftests/*.log - - functionaltestsv2: - name: Cgroup v2 Functional Tests - needs: [cleaner] - runs-on: self-hosted - - steps: - - uses: actions/checkout@v2 - with: - submodules: false - - name: Initialize the directory - uses: ./.github/actions/setup-libcgroup - - name: Run functional tests - run: | - pushd src/python/build/lib.* - export PYTHONPATH=$PYTHONPATH:$(pwd) - popd - pushd tests/ftests - make check - popd - - name: Display test logs - if: ${{ always() }} - run: | - cat tests/ftests/ftests.sh.log - cat tests/ftests/ftests-nocontainer.sh.log - - name: Archive test logs - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: Cgroup v2 test logs - path: tests/ftests/*.log