-
Notifications
You must be signed in to change notification settings - Fork 139
CI: various small improvements #934
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
Changes from all commits
54e86e4
0f2151f
ea28f61
5eadb77
ddbfa72
e53fa8c
1b4b968
726f5d0
7f781b8
042d722
c557c3a
d3b00e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| all: | ||
| - '.github/workflows/ci.yml' | ||
| - '.github/workflows/lima.yml' | ||
| - '.github/filters.yaml' | ||
| - 'hack/ci/**' | ||
| - 'Makefile' | ||
| - 'go.work' | ||
| - 'go.work.sum' | ||
|
|
||
| storage: | ||
| - 'storage/**' | ||
|
|
||
| image: | ||
| - 'image/**' | ||
| # image depends on storage, so any storage change must trigger image tests as well | ||
| - 'storage/**' | ||
|
|
||
| common: | ||
| - 'common/**' | ||
| # see comment above, common depends on both image and storage | ||
| - 'image/**' | ||
| - 'storage/**' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,46 +10,38 @@ on: | |
| - main | ||
| - podman-* | ||
|
|
||
| permissions: read-all | ||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| LIMA_VERSION: "v2.1.1" | ||
|
|
||
| jobs: | ||
| path-filter: | ||
| runs-on: ubuntu-24.04 | ||
| outputs: | ||
| all: ${{ steps.filter.outputs.all }} | ||
| storage: ${{ steps.filter.outputs.storage }} | ||
| image: ${{ steps.filter.outputs.image }} | ||
| common: ${{ steps.filter.outputs.common }} | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | ||
| id: filter | ||
| with: | ||
| filters: | | ||
| storage: | ||
| - '.github/workflows/ci.yml' | ||
| - 'hack/ci/**' | ||
| - 'go.work' | ||
| - 'go.work.sum' | ||
| - 'storage/**' | ||
| image: | ||
| - '.github/workflows/ci.yml' | ||
| - 'hack/ci/**' | ||
| - 'go.work' | ||
| - 'go.work.sum' | ||
| - 'storage/**' | ||
| - 'image/**' | ||
| filters: .github/filters.yaml | ||
|
|
||
| validate: | ||
| uses: ./.github/workflows/validate.yml | ||
|
|
||
| storage-test: | ||
| needs: path-filter | ||
| if: github.event_name == 'push' || needs.path-filter.outputs.storage == 'true' | ||
| runs-on: cncf-ubuntu-8-32-x86 | ||
| timeout-minutes: 30 | ||
| needs: [path-filter, validate] | ||
| if: | | ||
| github.event_name != 'pull_request' || | ||
| needs.path-filter.outputs.all == 'true' || | ||
| needs.path-filter.outputs.storage == 'true' | ||
| name: "storage ${{ matrix.distro }} ${{ matrix.driver }}" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
|
|
@@ -58,36 +50,26 @@ jobs: | |
| exclude: | ||
| - distro: debian-sid | ||
| driver: overlay-transient | ||
| name: "Storage: ${{ matrix.distro }} ${{ matrix.driver }}" | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I now see a pretty unpleasant-looking digest-only dependency PR in #939 . Would using comments with a precise version numbers, not just the major, help here? (I didn’t yet test that.)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh weird, so yes in podman we use full version which works https://github.com/podman-container-tools/podman/pull/29019/changes |
||
| with: | ||
| persist-credentials: false | ||
| - uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0 | ||
| with: | ||
| version: ${{ env.LIMA_VERSION }} | ||
| - name: Run tests | ||
| run: ./hack/ci/ci.sh storage ${{ matrix.distro }} ${{ matrix.driver }} | ||
| - name: Upload logs | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: "logs-storage-${{ matrix.distro }}-${{ matrix.driver }}" | ||
| path: | | ||
| ./hack/ci/journal.log | ||
| ./hack/ci/audit.log | ||
| ./hack/ci/df.log | ||
| if-no-files-found: ignore | ||
| uses: ./.github/workflows/lima.yml | ||
| with: | ||
| runner: cncf-ubuntu-2-8-x86 | ||
| module: storage | ||
| distro: ${{ matrix.distro }} | ||
| variant: ${{ matrix.driver }} | ||
| timeout: 20 | ||
|
|
||
| storage-cross: | ||
| needs: path-filter | ||
| if: github.event_name == 'push' || needs.path-filter.outputs.storage == 'true' | ||
| needs: [path-filter, validate] | ||
| if: | | ||
| github.event_name != 'pull_request' || | ||
| needs.path-filter.outputs.all == 'true' || | ||
| needs.path-filter.outputs.storage == 'true' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| timeout-minutes: 10 | ||
| name: "Storage: Cross" | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version: stable | ||
| cache-dependency-path: "./storage/go.sum" | ||
|
|
@@ -96,14 +78,17 @@ jobs: | |
| run: make cross | ||
|
|
||
| image-cross: | ||
| needs: path-filter | ||
| if: github.event_name == 'push' || needs.path-filter.outputs.image == 'true' | ||
| needs: [path-filter, validate] | ||
| if: | | ||
| github.event_name != 'pull_request' || | ||
| needs.path-filter.outputs.all == 'true' || | ||
| needs.path-filter.outputs.image == 'true' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| timeout-minutes: 10 | ||
| name: "Image: Cross" | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version: stable | ||
| cache-dependency-path: "./image/go.sum" | ||
|
|
@@ -116,99 +101,50 @@ jobs: | |
| run: make cross | ||
|
|
||
| image-test: | ||
| needs: path-filter | ||
| if: github.event_name == 'push' || needs.path-filter.outputs.image == 'true' | ||
| runs-on: cncf-ubuntu-8-32-x86 | ||
| timeout-minutes: 30 | ||
| needs: [path-filter, validate] | ||
| if: | | ||
| github.event_name != 'pull_request' || | ||
| needs.path-filter.outputs.all == 'true' || | ||
| needs.path-filter.outputs.image == 'true' | ||
| name: "${{ matrix.module }} fedora-current ${{ matrix.variant }}" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| variant: [default, openpgp, sequoia] | ||
| name: "Image: Test ${{ matrix.variant }}" | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0 | ||
| with: | ||
| version: ${{ env.LIMA_VERSION }} | ||
| - name: Run tests | ||
| run: ./hack/ci/ci.sh image fedora-current ${{ matrix.variant }} | ||
| - name: Upload logs | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: "logs-image-${{ matrix.variant }}" | ||
| path: | | ||
| ./hack/ci/journal.log | ||
| ./hack/ci/audit.log | ||
| ./hack/ci/df.log | ||
| if-no-files-found: ignore | ||
|
|
||
| image-test-skopeo: | ||
| needs: path-filter | ||
| if: github.event_name == 'push' || needs.path-filter.outputs.image == 'true' | ||
| runs-on: cncf-ubuntu-8-32-x86 | ||
| timeout-minutes: 30 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| variant: [default, openpgp, sequoia] | ||
| name: "Image: Skopeo ${{ matrix.variant }}" | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0 | ||
| with: | ||
| version: ${{ env.LIMA_VERSION }} | ||
| - name: Run tests | ||
| run: ./hack/ci/ci.sh image-skopeo fedora-current ${{ matrix.variant }} | ||
| - name: Upload logs | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: "logs-image-skopeo-${{ matrix.variant }}" | ||
| path: | | ||
| ./hack/ci/journal.log | ||
| ./hack/ci/audit.log | ||
| ./hack/ci/df.log | ||
| if-no-files-found: ignore | ||
| module: [image, image-skopeo] | ||
| uses: ./.github/workflows/lima.yml | ||
| with: | ||
| runner: cncf-ubuntu-2-8-x86 | ||
| module: ${{ matrix.module }} | ||
| distro: fedora-current | ||
| variant: ${{ matrix.variant }} | ||
| timeout: 20 | ||
|
|
||
| common-test: | ||
| runs-on: cncf-ubuntu-8-32-x86 | ||
| timeout-minutes: 45 | ||
| name: "Common: Test" | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0 | ||
| with: | ||
| version: ${{ env.LIMA_VERSION }} | ||
| - name: Run tests | ||
| run: ./hack/ci/ci.sh common fedora-current | ||
| - name: Upload logs | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: "logs-common" | ||
| path: | | ||
| ./hack/ci/journal.log | ||
| ./hack/ci/audit.log | ||
| ./hack/ci/df.log | ||
| if-no-files-found: ignore | ||
| needs: [path-filter, validate] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. true but it feels most consistent, path-filter is fast and if it ever fails no point continuing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, makes for a simpler CI job graph. |
||
| if: | | ||
| github.event_name != 'pull_request' || | ||
| needs.path-filter.outputs.all == 'true' || | ||
| needs.path-filter.outputs.common == 'true' | ||
| name: "common fedora-current" | ||
| uses: ./.github/workflows/lima.yml | ||
| with: | ||
| runner: cncf-ubuntu-2-8-x86 | ||
| module: common | ||
| distro: fedora-current | ||
| timeout: 20 | ||
|
|
||
| # N/B: GitHub merge protection is configured for this exact job name, DO NOT CHANGE IT. | ||
| success: | ||
| name: "Total Success" | ||
| if: always() | ||
| needs: | ||
| - path-filter | ||
| - validate | ||
| - storage-test | ||
| - storage-cross | ||
| - image-cross | ||
| - image-test | ||
| - image-test-skopeo | ||
| - common-test | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: lima | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| module: | ||
| required: true | ||
| type: string | ||
| distro: | ||
| required: true | ||
| type: string | ||
| variant: | ||
| required: false | ||
| type: string | ||
| runner: | ||
| required: true | ||
| type: string | ||
| timeout: | ||
| required: false | ||
| type: number | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lima: | ||
| 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 | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - 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.module }} ${{ inputs.distro }} ${{ inputs.variant }} | ||
|
|
||
| - name: Upload logs | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: "logs-${{ inputs.module }}-${{ inputs.distro }}-${{ inputs.variant }}" | ||
| path: | | ||
| ./hack/ci/journal.log | ||
| ./hack/ci/audit.log | ||
| ./hack/ci/df.log | ||
| if-no-files-found: ignore |
Uh oh!
There was an error while loading. Please reload this page.