mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 05:34:46 +00:00
ci: static-checks: Clean up static-checks job
Now that the static-checks job only takes care of running the static-checks, let's clean it up, remove all the unneeded steps, make sure that we're using the actions in their latest version, and have it running in a cost free runner. At some point I'd like to see those tests done in parallel, in the same way that I've organised the build-checks, but that's something for someone else, at some other time. Fixes: #7974 -- part 0 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
2c5ca2eaf8
commit
8b1e9b0c75
57
.github/workflows/static-checks.yaml
vendored
57
.github/workflows/static-checks.yaml
vendored
@ -160,64 +160,35 @@ jobs:
|
|||||||
RUST_BACKTRACE: "1"
|
RUST_BACKTRACE: "1"
|
||||||
|
|
||||||
static-checks:
|
static-checks:
|
||||||
runs-on: garm-ubuntu-2004
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
# We can set this to true whenever we're 100% sure that
|
|
||||||
# the all the tests are not flaky, otherwise we'll fail
|
|
||||||
# all the tests due to a single flaky instance.
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
cmd:
|
cmd:
|
||||||
- "make static-checks"
|
- "make static-checks"
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: "1"
|
|
||||||
target_branch: ${{ github.base_ref }}
|
|
||||||
GOPATH: ${{ github.workspace }}
|
GOPATH: ${{ github.workspace }}
|
||||||
steps:
|
steps:
|
||||||
- name: Free disk space
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /usr/share/dotnet
|
|
||||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
path: ./src/github.com/${{ github.repository }}
|
path: ./src/github.com/${{ github.repository }}
|
||||||
- name: Install dependencies
|
- name: Install yq
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
cd ${GOPATH}/src/github.com/${{ github.repository }}
|
||||||
sudo apt-get install -y --no-install-recommends build-essential haveged
|
./ci/install_yq.sh
|
||||||
- name: Install Go
|
env:
|
||||||
uses: actions/setup-go@v3
|
INSTALL_IN_GOPATH: false
|
||||||
with:
|
- name: Install golang
|
||||||
go-version: 1.19.3
|
|
||||||
- name: Set PATH
|
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
||||||
run: |
|
run: |
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
cd ${GOPATH}/src/github.com/${{ github.repository }}
|
||||||
- name: Setup
|
./tests/install_go.sh -f -p
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||||
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
cd ${GOPATH}/src/github.com/${{ github.repository }} && ./ci/setup.sh
|
sudo apt-get -y install moreutils
|
||||||
- name: Installing rust
|
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
||||||
run: |
|
|
||||||
cd ${GOPATH}/src/github.com/${{ github.repository }} && ./ci/install_rust.sh
|
|
||||||
PATH=$PATH:"$HOME/.cargo/bin"
|
|
||||||
rustup target add x86_64-unknown-linux-musl
|
|
||||||
rustup component add rustfmt clippy
|
|
||||||
- name: Setup seccomp
|
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
||||||
run: |
|
|
||||||
libseccomp_install_dir=$(mktemp -d -t libseccomp.XXXXXXXXXX)
|
|
||||||
gperf_install_dir=$(mktemp -d -t gperf.XXXXXXXXXX)
|
|
||||||
cd ${GOPATH}/src/github.com/${{ github.repository }} && ./ci/install_libseccomp.sh "${libseccomp_install_dir}" "${gperf_install_dir}"
|
|
||||||
echo "Set environment variables for the libseccomp crate to link the libseccomp library statically"
|
|
||||||
echo "LIBSECCOMP_LINK_TYPE=static" >> $GITHUB_ENV
|
|
||||||
echo "LIBSECCOMP_LIB_PATH=${libseccomp_install_dir}/lib" >> $GITHUB_ENV
|
|
||||||
- name: Run check
|
- name: Run check
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
||||||
run: |
|
run: |
|
||||||
export PATH=$PATH:"$HOME/.cargo/bin"
|
export PATH=${PATH}:${GOPATH}/bin
|
||||||
export XDG_RUNTIME_DIR=$(mktemp -d /tmp/kata-tests-$USER.XXX | tee >(xargs chmod 0700))
|
|
||||||
cd ${GOPATH}/src/github.com/${{ github.repository }} && ${{ matrix.cmd }}
|
cd ${GOPATH}/src/github.com/${{ github.repository }} && ${{ matrix.cmd }}
|
||||||
|
Loading…
Reference in New Issue
Block a user