mirror of
https://github.com/containers/podman.git
synced 2026-07-13 00:31:45 -04:00
The main gh action is just there to install lima and then call the main
ci.sh script which uses lima to start the right VM and then run the
tests inside there mostly for linux tasks where possible.
Inside the VM we use the runner.sh script to setup the env and launch the
final test.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 399e822ca4)
[fixed merge conflict]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
83 lines
2.9 KiB
YAML
83 lines
2.9 KiB
YAML
name: lima
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
distro:
|
|
required: true
|
|
type: string
|
|
test:
|
|
required: true
|
|
type: string
|
|
priv:
|
|
required: false
|
|
type: string
|
|
mode:
|
|
required: false
|
|
type: string
|
|
runner:
|
|
required: true
|
|
type: string
|
|
timeout:
|
|
required: false
|
|
type: number
|
|
if:
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
lima:
|
|
if: ${{ inputs.if }}
|
|
name: lima # main name is set by who spawns this job
|
|
runs-on: ${{ inputs.runner }}
|
|
timeout-minutes: ${{ inputs.timeout || 20 }} # default to 20m timeout if non specified
|
|
permissions: {}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# TODO: figure out how to cache the binaries from the build job to the actual test tasks
|
|
# - name: Download binaries
|
|
# if: ${{ inputs.test != 'build' }} # Download build binaries for tests to not compile them again.
|
|
# uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
# with:
|
|
# name: "binaries-${{ inputs.distro }}"
|
|
# path: bin/
|
|
|
|
- uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
|
|
id: lima
|
|
with:
|
|
version: v2.1.1
|
|
|
|
# NOTE, we are not using a cache here as documented in the lima action.
|
|
# This is because our VM images are above 5GB and the total github limit is 10 GB which means
|
|
# it will clean out the other image basically right away making the cache useless for other tasks.
|
|
# Also most importantly while testing it the cache was slower, the VM images are hosted in the
|
|
# oracle cloud bucket which is already local to the oracle CI runners unlike the cache which is
|
|
# stored by github somewhere else.
|
|
|
|
- name: Run test on lima
|
|
run: | # zizmor: ignore[template-injection]
|
|
./hack/ci/ci.sh ${{ inputs.test }} ${{ inputs.mode }} ${{ inputs.priv }} ${{ inputs.distro }}
|
|
|
|
# TODO: figure out how to cache the binaries from the build job to the actual test tasks
|
|
# - name: Upload binaries as artifact
|
|
# if: ${{ inputs.test == 'build' }}
|
|
# uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
|
|
# with:
|
|
# name: "binaries-${{ inputs.distro }}"
|
|
# path: "bin/"
|
|
# if-no-files-found: error
|
|
|
|
- name: Upload journal as artifact
|
|
if: always() # always collect the log
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
|
|
with:
|
|
name: "journal-${{ inputs.test }}-${{ inputs.mode }}-${{ inputs.priv }}-${{ inputs.distro }}.log"
|
|
path: "./hack/ci/journal.log"
|
|
if-no-files-found: ignore
|