replace Cirrus with lima-based GHA #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| smoke: | |
| name: "Smoke Test" | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Smoke Test" | |
| runner: cncf-ubuntu-4-16-x86 | |
| test: smoke | |
| distro: fedora-current | |
| timeout: 20 | |
| vendor: | |
| name: "Test Vendoring" | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Test Vendoring" | |
| runner: cncf-ubuntu-4-16-x86 | |
| test: vendor | |
| distro: fedora-current | |
| timeout: 20 | |
| cross: | |
| name: "Cross Compile" | |
| 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] | |
| name: "Unit tests w/ ${{ matrix.storage }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| storage: [vfs, overlay] | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Unit tests w/ ${{ matrix.storage }}" | |
| runner: cncf-ubuntu-4-16-x86 | |
| test: unit | |
| storage: ${{ matrix.storage }} | |
| priv: root | |
| distro: fedora-current | |
| timeout: 60 | |
| conformance: | |
| needs: [smoke, vendor] | |
| name: "Debian Conformance w/ ${{ matrix.storage }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| storage: [vfs, overlay] | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Debian Conformance w/ ${{ matrix.storage }}" | |
| runner: cncf-ubuntu-8-32-x86 | |
| test: conformance | |
| storage: ${{ matrix.storage }} | |
| priv: root | |
| distro: debian-sid | |
| timeout: 40 | |
| integration: | |
| needs: [smoke, vendor] | |
| name: "Integration ${{ matrix.distro }} w/ ${{ matrix.storage }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distro: [fedora-current, fedora-prior, debian-sid] | |
| storage: [vfs, overlay] | |
| include: | |
| - storage: overlay | |
| distro: fedora-rawhide | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Integration ${{ matrix.distro }} w/ ${{ matrix.storage }}" | |
| runner: cncf-ubuntu-8-32-x86 | |
| test: integration | |
| storage: ${{ matrix.storage }} | |
| priv: root | |
| distro: ${{ matrix.distro }} | |
| timeout: 60 | |
| integration_rootless: | |
| needs: [smoke, vendor] | |
| name: "Integration rootless ${{ matrix.distro }} w/ ${{ matrix.storage }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distro: [fedora-current, fedora-prior] | |
| storage: [overlay] | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Integration rootless ${{ matrix.distro }} w/ ${{ matrix.storage }}" | |
| runner: cncf-ubuntu-8-32-x86 | |
| test: integration | |
| storage: ${{ matrix.storage }} | |
| priv: rootless | |
| distro: ${{ matrix.distro }} | |
| timeout: 60 | |
| in_podman: | |
| needs: [smoke, vendor] | |
| name: "Containerized Integration" | |
| uses: ./.github/workflows/lima.yml | |
| with: | |
| name: "Containerized Integration" | |
| 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: | |
| - smoke | |
| - vendor | |
| - cross | |
| - unit | |
| - conformance | |
| - integration | |
| - integration_rootless | |
| - 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" |