mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-03-18 10:44:10 +00:00
Per the decision taken in the 6/27 AC meeting, this PR temporarily disables kata-deploy and GARM tests until we secure further Azure CI funding. In the meantime, I'll transition the GARM tests to free runners and reenable them to regain that coverage without affecting spending (see #9940). If it turns out the free runners are too slow, we'll switch back to GARM. After funding is secured, we'll reenable the kata-deploy tests (see #9939). Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
114 lines
3.6 KiB
YAML
114 lines
3.6 KiB
YAML
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- synchronize
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
name: Static checks
|
|
jobs:
|
|
check-kernel-config-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Ensure the kernel config version has been updated
|
|
run: |
|
|
kernel_dir="tools/packaging/kernel/"
|
|
kernel_version_file="${kernel_dir}kata_config_version"
|
|
modified_files=$(git diff --name-only origin/$GITHUB_BASE_REF..HEAD)
|
|
if git diff --name-only origin/$GITHUB_BASE_REF..HEAD "${kernel_dir}" | grep "${kernel_dir}"; then
|
|
echo "Kernel directory has changed, checking if $kernel_version_file has been updated"
|
|
if echo "$modified_files" | grep -v "README.md" | grep "${kernel_dir}" >>"/dev/null"; then
|
|
echo "$modified_files" | grep "$kernel_version_file" >>/dev/null || ( echo "Please bump version in $kernel_version_file" && exit 1)
|
|
else
|
|
echo "Readme file changed, no need for kernel config version update."
|
|
fi
|
|
echo "Check passed"
|
|
fi
|
|
|
|
build-checks:
|
|
uses: ./.github/workflows/build-checks.yaml
|
|
with:
|
|
instance: ubuntu-20.04
|
|
|
|
build-checks-depending-on-kvm:
|
|
# TODO: Transition to free runner (see #9940).
|
|
if: false
|
|
runs-on: garm-ubuntu-2004-smaller
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
component:
|
|
- runtime-rs
|
|
include:
|
|
- component: runtime-rs
|
|
command: "sudo -E env PATH=$PATH LIBC=gnu SUPPORT_VIRTUALIZATION=true make test"
|
|
- component: runtime-rs
|
|
component-path: src/dragonball
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install system deps
|
|
run: |
|
|
sudo apt-get install -y build-essential musl-tools
|
|
- name: Install yq
|
|
run: |
|
|
sudo -E ./ci/install_yq.sh
|
|
env:
|
|
INSTALL_IN_GOPATH: false
|
|
- name: Install rust
|
|
run: |
|
|
export PATH="$PATH:/usr/local/bin"
|
|
./tests/install_rust.sh
|
|
- name: Running `${{ matrix.command }}` for ${{ matrix.component }}
|
|
run: |
|
|
export PATH="$PATH:${HOME}/.cargo/bin"
|
|
cd ${{ matrix.component-path }}
|
|
${{ matrix.command }}
|
|
env:
|
|
RUST_BACKTRACE: "1"
|
|
|
|
static-checks:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
cmd:
|
|
- "make static-checks"
|
|
env:
|
|
GOPATH: ${{ github.workspace }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
path: ./src/github.com/${{ github.repository }}
|
|
- name: Install yq
|
|
run: |
|
|
cd ${GOPATH}/src/github.com/${{ github.repository }}
|
|
./ci/install_yq.sh
|
|
env:
|
|
INSTALL_IN_GOPATH: false
|
|
- name: Install golang
|
|
run: |
|
|
cd ${GOPATH}/src/github.com/${{ github.repository }}
|
|
./tests/install_go.sh -f -p
|
|
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get -y install moreutils hunspell hunspell-en-gb hunspell-en-us pandoc
|
|
- name: Run check
|
|
run: |
|
|
export PATH=${PATH}:${GOPATH}/bin
|
|
cd ${GOPATH}/src/github.com/${{ github.repository }} && ${{ matrix.cmd }}
|