Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #1311

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Fix CI #1311

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 11 additions & 77 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ concurrency:

jobs:
test-build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
builder:
- docker
- nerdctl
- podman
include:
- os: ubuntu-latest
builder: docker
- os: ubuntu-latest
builder: podman
- os: ubuntu-22.04
builder: nerdctl
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand Down Expand Up @@ -112,18 +116,6 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Kind
shell: bash
run: |
./hack/requirements.sh kind
kind version

- name: Install kubectl
shell: bash
run: |
./hack/requirements.sh kubectl
kubectl version || :

- name: Test Workable
shell: bash
run: |
Expand Down Expand Up @@ -160,7 +152,7 @@ jobs:
kwokctl-runtime: kind
- os: ubuntu-latest
kwokctl-runtime: kind-podman
- os: ubuntu-latest
- os: ubuntu-22.04
kwokctl-runtime: nerdctl

continue-on-error: false
Expand All @@ -178,74 +170,16 @@ jobs:
run: |
brew install coreutils bash

# TODO: workaround for https://github.com/actions/runner-images/issues/7753 (caused by https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394).
# Remove this when this issue is fixed and available in the ubuntu runner image
- name: Setup Podman for Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' && (matrix.kwokctl-runtime == 'podman' || matrix.kwokctl-runtime == 'kind-podman') }}
shell: bash
run: |
sudo apt install podman=3.4.4+ds1-1ubuntu1 --allow-downgrades

- name: Setup Crun on Kind Podman
if: ${{ matrix.os == 'ubuntu-latest' && matrix.kwokctl-runtime == 'kind-podman' }}
shell: bash
run: |
# crun >= 1.9.1 is required on Ubuntu 20.04.6
# https://github.com/kubernetes-sigs/kind/issues/3526
curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64
chmod +x ./crun
sudo mv ./crun /usr/bin/crun

- name: Install Docker for MacOS
if: ${{ startsWith(matrix.os, 'macos-') && ( matrix.kwokctl-runtime == 'docker' || matrix.kwokctl-runtime == 'kind' ) }}
shell: bash
run: |
brew install colima docker || :
colima start --mount $HOME/.kwok/:w --mount $(pwd):w --cpu 4 --memory 8

- name: Install Buildx
if: ${{ matrix.kwokctl-runtime == 'docker' || matrix.kwokctl-runtime == 'kind' }}
shell: bash
run: |
./hack/requirements.sh buildx
docker buildx version

- name: Docker Info
if: ${{ matrix.kwokctl-runtime == 'docker' || matrix.kwokctl-runtime == 'kind' }}
shell: bash
run: |
docker info

- name: Install Nerdctl and Start Containerd
if: ${{ matrix.kwokctl-runtime == 'nerdctl' }}
shell: bash
run: |
sudo mkdir -p /etc/cni/net.d
sudo chmod 777 /etc/cni/net.d
curl -sSL https://github.com/containerd/nerdctl/releases/download/v1.7.7/nerdctl-full-1.7.7-linux-amd64.tar.gz -o - | sudo tar -xz -C /usr/local
sudo systemctl daemon-reload
sudo systemctl enable --now containerd
containerd-rootless-setuptool.sh install
containerd-rootless-setuptool.sh install-buildkit-containerd

- name: Setup Podman for Kind
if: ${{ matrix.kwokctl-runtime == 'kind-podman' }}
shell: bash
run: |
sudo mkdir -p /etc/systemd/system/[email protected]
sudo tee <<EOF /etc/systemd/system/[email protected]/delegate.conf
[Service]
Delegate=yes
EOF
sudo systemctl daemon-reload

- name: Make pki directory
if: ${{ matrix.kwokctl-runtime == 'binary' && matrix.os != 'windows-latest' }}
shell: bash
run: |
sudo mkdir -p /var/run/kubernetes
sudo chmod 777 /var/run/kubernetes

- name: Install kubectl
shell: bash
run: |
Expand All @@ -266,7 +200,7 @@ jobs:
shell: bash
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" && ( "${{ matrix.kwokctl-runtime }}" == "binary" || "${{ matrix.kwokctl-runtime }}" == "docker" ) ]]; then
export LAST_RELEASE_SIZE=20
export LAST_RELEASE_SIZE=18
fi
./hack/e2e-test.sh kwokctl/kwokctl_${{ matrix.kwokctl-runtime }}

Expand Down
Loading