Skip to content

replace Cirrus with lima-based GHA #25

replace Cirrus with lima-based GHA

replace Cirrus with lima-based GHA #25

Workflow file for this run

name: "ci"
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
path-filter:
name: path-filter
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- id: filter
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
with:
filters: .github/filters.yaml
smoke:
name: smoke
uses: ./.github/workflows/lima.yml
with:
runner: cncf-ubuntu-4-16-x86
test: smoke
distro: fedora-current
timeout: 20
vendor:
name: vendor
uses: ./.github/workflows/lima.yml
with:
runner: cncf-ubuntu-4-16-x86
test: vendor
distro: fedora-current
timeout: 20
cross:
name: cross
runs-on: cncf-ubuntu-8-32-x86
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- name: Build all cross targets
run: make -j4 cross CGO_ENABLED=0
unit:
needs: [smoke, vendor, path-filter]
if: needs.path-filter.outputs.code == 'true' || github.event_name != 'pull_request'
name: unit ${{ matrix.storage }}
strategy:
fail-fast: false
matrix:
storage: [vfs, overlay]
uses: ./.github/workflows/lima.yml
with:
runner: cncf-ubuntu-4-16-x86
test: unit
storage: ${{ matrix.storage }}
priv: root
distro: fedora-current
timeout: 60
conformance:
needs: [smoke, vendor, path-filter]
if: needs.path-filter.outputs.code == 'true' || github.event_name != 'pull_request'
name: conformance ${{ matrix.storage }}
strategy:
fail-fast: false
matrix:
storage: [vfs, overlay]
uses: ./.github/workflows/lima.yml
with:
runner: cncf-ubuntu-8-32-x86
test: conformance
storage: ${{ matrix.storage }}
priv: root
distro: debian-sid
timeout: 40
integration:
needs: [smoke, vendor, path-filter]
if: needs.path-filter.outputs.code == 'true' || github.event_name != 'pull_request'
name: integration ${{ matrix.storage }} ${{ matrix.priv }} ${{ matrix.distro }}
strategy:
fail-fast: false
matrix:
distro: [fedora-current, fedora-prior, debian-sid]
storage: [vfs, overlay]
priv: [root, rootless]
exclude:
- storage: vfs
priv: rootless
- distro: debian-sid
priv: rootless
# Skip rootless+overlay: upstream Cirrus's PASSTHROUGH_ENV_RE drops
# STORAGE_DRIVER through SSH re-exec to rootlessuser, so their
# "Integration rootless ... w/ overlay" task silently tests vfs.
# When we propagate STORAGE_DRIVER properly, we expose a real
# rootless+overlay cleanup bug in buildah's storage code
# ("replacing mount point .../merged: directory not empty").
# Skip these cells until that's fixed upstream.
- storage: overlay
priv: rootless
include:
- storage: overlay
priv: root
distro: fedora-rawhide
uses: ./.github/workflows/lima.yml
with:
runner: cncf-ubuntu-8-32-x86
test: integration
storage: ${{ matrix.storage }}
priv: ${{ matrix.priv }}
distro: ${{ matrix.distro }}
timeout: 60
in_podman:
needs: [smoke, vendor, path-filter]
if: needs.path-filter.outputs.code == 'true' || github.event_name != 'pull_request'
name: in_podman
uses: ./.github/workflows/lima.yml
with:
runner: cncf-ubuntu-8-32-x86
test: in_podman
storage: vfs
priv: root
distro: fedora-current
timeout: 60
mac:
needs: [smoke, vendor]
name: build (darwin)
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- name: Build darwin/arm64
run: make bin/buildah.darwin.arm64
- name: Build darwin/amd64
run: make bin/buildah.darwin.amd64
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: buildah-darwin
path: bin/buildah.darwin.*
if-no-files-found: error
success:
name: "Total Success"
if: always()
needs:
- path-filter
- smoke
- vendor
- cross
- unit
- conformance
- integration
- in_podman
- mac
runs-on: ubuntu-latest
steps:
- name: Check all required jobs
run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]] || \
[[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled"
exit 1
fi
echo "All required jobs passed or were skipped"