Skip to content

Commit

Permalink
Try to reproduce lima ci for vz
Browse files Browse the repository at this point in the history
Simplify the job to do what lima ci is doing.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Sep 20, 2024
1 parent 2d7b3ac commit 78d9467
Showing 1 changed file with 7 additions and 58 deletions.
65 changes: 7 additions & 58 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,82 +192,31 @@ jobs:
- "3.12"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout ramen
uses: actions/checkout@v4

- name: Checkout lima
uses: actions/checkout@v4
with:
repository: lima-vm/lima
path: lima

- name: Checkout socket_vmnet
uses: actions/checkout@v4
with:
repository: lima-vm/socket_vmnet
path: socket_vmnet

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Setup go for lima
uses: actions/setup-go@v5
with:
go-version-file: lima/go.mod
go-version: "1.23"

- name: Install lima
run: |
cd lima
# Miniaml build is 3 times faster than full make..
make minimal
# But it adds only the default template, so lets fix it:
rm -rf _output/share/lima/templates
cp -aL examples _output/share/lima/templates
ln -sf templates _output/share/lima/examples
# And install
make
sudo make install
limactl --version
- name: Install socket_vmnet
run: |
cd socket_vmnet
make
sudo make install.bin
sudo make install.launchd
/opt/socket_vmnet/bin/socket_vmnet --version
- name: Install Homebrew packages
run: brew install qemu kubectl

- name: Install python packages
run: pip install -r requirements.txt
run: brew install kubectl bash coreutils jq

- name: Enable coverage for child processes
run: cp coverage.pth $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')

- name: Install drenv
run: pip install -e test

- name: Run flake8
run: make flake8
working-directory: test

- name: Run pylint
run: make pylint
working-directory: test

- name: Run black
run: make black
working-directory: test

- name: Start lima vm
run: limactl start --tty=false --vm-type qemu --cpus 2 --memory 2 --plain template://default
working-directory: test
- name: Start minimal lima vm
# https://github.com/lima-vm/lima/pull/1511#issuecomment-1574937888
# https://github.com/lima-vm/lima/blob/380fe118b448c17f7800a5cd9222233466d0944c/hack/test-templates.sh#L19
run: limactl start --tty=false --vm-type vz --cpus 1 --memory 2 --plain --log-level debug template://default

- name: Show logs on error
if: failure()
Expand Down

0 comments on commit 78d9467

Please sign in to comment.