Run native arm64 coverage through the same CI and test workflow matrices
as amd64 to avoid a separate workflow.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| ... | ... |
@@ -8,6 +8,15 @@ permissions: |
| 8 | 8 |
|
| 9 | 9 |
on: |
| 10 | 10 |
workflow_call: |
| 11 |
+ inputs: |
|
| 12 |
+ arch: |
|
| 13 |
+ required: false |
|
| 14 |
+ type: string |
|
| 15 |
+ default: amd64 |
|
| 16 |
+ runner: |
|
| 17 |
+ required: false |
|
| 18 |
+ type: string |
|
| 19 |
+ default: ubuntu-24.04 |
|
| 11 | 20 |
secrets: |
| 12 | 21 |
CODECOV_TOKEN: |
| 13 | 22 |
required: false |
| ... | ... |
@@ -21,7 +30,7 @@ env: |
| 21 | 21 |
|
| 22 | 22 |
jobs: |
| 23 | 23 |
unit: |
| 24 |
- runs-on: ubuntu-24.04 |
|
| 24 |
+ runs-on: ${{ inputs.runner }}
|
|
| 25 | 25 |
timeout-minutes: 120 # guardrails timeout for the whole job |
| 26 | 26 |
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
| 27 | 27 |
strategy: |
| ... | ... |
@@ -40,12 +49,13 @@ jobs: |
| 40 | 40 |
- |
| 41 | 41 |
name: Prepare |
| 42 | 42 |
env: |
| 43 |
+ ARCH: ${{ inputs.arch }}
|
|
| 43 | 44 |
MODE: ${{ matrix.mode }}
|
| 44 | 45 |
run: | |
| 45 |
- CACHE_DEV_SCOPE=dev |
|
| 46 |
+ CACHE_DEV_SCOPE=dev-${ARCH}
|
|
| 46 | 47 |
if [[ "$MODE" == *"firewalld"* ]]; then |
| 47 | 48 |
echo "FIREWALLD=true" >> $GITHUB_ENV |
| 48 |
- CACHE_DEV_SCOPE="${CACHE_DEV_SCOPE}firewalld"
|
|
| 49 |
+ CACHE_DEV_SCOPE="dev-firewalld-${ARCH}"
|
|
| 49 | 50 |
fi |
| 50 | 51 |
echo "CACHE_DEV_SCOPE=${CACHE_DEV_SCOPE}" >> $GITHUB_ENV
|
| 51 | 52 |
- |
| ... | ... |
@@ -81,14 +91,14 @@ jobs: |
| 81 | 81 |
with: |
| 82 | 82 |
directory: ./bundles |
| 83 | 83 |
env_vars: RUNNER_OS |
| 84 |
- flags: unit |
|
| 84 |
+ flags: unit,${{ inputs.arch }}
|
|
| 85 | 85 |
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
| 86 | 86 |
- |
| 87 | 87 |
name: Upload reports |
| 88 | 88 |
if: always() |
| 89 | 89 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 90 | 90 |
with: |
| 91 |
- name: test-reports-unit--${{ matrix.mode }}
|
|
| 91 |
+ name: test-reports-unit-${{ inputs.arch }}-${{ matrix.mode }}
|
|
| 92 | 92 |
path: /tmp/reports/* |
| 93 | 93 |
retention-days: 1 |
| 94 | 94 |
- |
| ... | ... |
@@ -96,7 +106,7 @@ jobs: |
| 96 | 96 |
if: always() |
| 97 | 97 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 98 | 98 |
with: |
| 99 |
- name: test-results-unit--${{ matrix.mode }}
|
|
| 99 |
+ name: test-results-unit-${{ inputs.arch }}-${{ matrix.mode }}
|
|
| 100 | 100 |
path: /tmp/reports/**/*go-test-report*.json |
| 101 | 101 |
retention-days: 7 |
| 102 | 102 |
|
| ... | ... |
@@ -118,7 +128,7 @@ jobs: |
| 118 | 118 |
name: Download reports |
| 119 | 119 |
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| 120 | 120 |
with: |
| 121 |
- pattern: test-reports-unit-* |
|
| 121 |
+ pattern: test-reports-unit-${{ inputs.arch }}-*
|
|
| 122 | 122 |
path: /tmp/reports |
| 123 | 123 |
- |
| 124 | 124 |
name: Install teststat |
| ... | ... |
@@ -9,6 +9,14 @@ permissions: |
| 9 | 9 |
on: |
| 10 | 10 |
workflow_call: |
| 11 | 11 |
inputs: |
| 12 |
+ arch: |
|
| 13 |
+ required: false |
|
| 14 |
+ type: string |
|
| 15 |
+ default: amd64 |
|
| 16 |
+ runner: |
|
| 17 |
+ required: false |
|
| 18 |
+ type: string |
|
| 19 |
+ default: ubuntu-24.04 |
|
| 12 | 20 |
storage: |
| 13 | 21 |
required: true |
| 14 | 22 |
type: string |
| ... | ... |
@@ -30,7 +38,7 @@ env: |
| 30 | 30 |
|
| 31 | 31 |
jobs: |
| 32 | 32 |
docker-py: |
| 33 |
- runs-on: ubuntu-24.04 |
|
| 33 |
+ runs-on: ${{ inputs.runner }}
|
|
| 34 | 34 |
timeout-minutes: 120 # guardrails timeout for the whole job |
| 35 | 35 |
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
| 36 | 36 |
steps: |
| ... | ... |
@@ -56,7 +64,7 @@ jobs: |
| 56 | 56 |
with: |
| 57 | 57 |
targets: dev |
| 58 | 58 |
set: | |
| 59 |
- dev.cache-from=type=gha,scope=dev |
|
| 59 |
+ dev.cache-from=type=gha,scope=dev-${{ inputs.arch }}
|
|
| 60 | 60 |
- |
| 61 | 61 |
name: Test |
| 62 | 62 |
run: | |
| ... | ... |
@@ -81,12 +89,12 @@ jobs: |
| 81 | 81 |
if: always() |
| 82 | 82 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 83 | 83 |
with: |
| 84 |
- name: test-reports-docker-py-${{ inputs.storage }}
|
|
| 84 |
+ name: test-reports-docker-py-${{ inputs.arch }}-${{ inputs.storage }}
|
|
| 85 | 85 |
path: /tmp/reports/* |
| 86 | 86 |
retention-days: 1 |
| 87 | 87 |
|
| 88 | 88 |
integration-flaky: |
| 89 |
- runs-on: ubuntu-24.04 |
|
| 89 |
+ runs-on: ${{ inputs.runner }}
|
|
| 90 | 90 |
timeout-minutes: 120 # guardrails timeout for the whole job |
| 91 | 91 |
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
| 92 | 92 |
steps: |
| ... | ... |
@@ -112,7 +120,7 @@ jobs: |
| 112 | 112 |
with: |
| 113 | 113 |
targets: dev |
| 114 | 114 |
set: | |
| 115 |
- dev.cache-from=type=gha,scope=dev |
|
| 115 |
+ dev.cache-from=type=gha,scope=dev-${{ inputs.arch }}
|
|
| 116 | 116 |
- |
| 117 | 117 |
name: Test |
| 118 | 118 |
run: | |
| ... | ... |
@@ -132,9 +140,13 @@ jobs: |
| 132 | 132 |
id: set |
| 133 | 133 |
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 |
| 134 | 134 |
env: |
| 135 |
+ INPUT_ARCH: ${{ inputs.arch }}
|
|
| 136 |
+ INPUT_RUNNER: ${{ inputs.runner }}
|
|
| 135 | 137 |
INPUT_STORAGE: ${{ inputs.storage }}
|
| 136 | 138 |
with: |
| 137 | 139 |
script: | |
| 140 |
+ const arch = core.getInput('arch', { required: true });
|
|
| 141 |
+ const runner = core.getInput('runner', { required: true });
|
|
| 138 | 142 |
const storage = core.getInput('storage', { required: true });
|
| 139 | 143 |
let includes = [ |
| 140 | 144 |
{ os: 'ubuntu-22.04', mode: '' },
|
| ... | ... |
@@ -145,10 +157,13 @@ jobs: |
| 145 | 145 |
{ os: 'ubuntu-24.04', mode: 'systemd' },
|
| 146 | 146 |
// { os: 'ubuntu-24.04', mode: 'rootless-systemd' }, // FIXME: https://github.com/moby/moby/issues/44084
|
| 147 | 147 |
]; |
| 148 |
+ if (arch != "amd64") {
|
|
| 149 |
+ includes = includes.filter(item => item.os == 'ubuntu-24.04').map(item => ({ ...item, os: runner }));
|
|
| 150 |
+ } |
|
| 148 | 151 |
if (storage == "snapshotter") {
|
| 149 |
- includes.push({ os: 'ubuntu-24.04', mode: 'iptables+firewalld' });
|
|
| 150 |
- includes.push({ os: 'ubuntu-24.04', mode: 'nftables' });
|
|
| 151 |
- includes.push({ os: 'ubuntu-24.04', mode: 'nftables+firewalld' });
|
|
| 152 |
+ includes.push({ os: arch == "amd64" ? 'ubuntu-24.04' : runner, mode: 'iptables+firewalld' });
|
|
| 153 |
+ includes.push({ os: arch == "amd64" ? 'ubuntu-24.04' : runner, mode: 'nftables' });
|
|
| 154 |
+ includes.push({ os: arch == "amd64" ? 'ubuntu-24.04' : runner, mode: 'nftables+firewalld' });
|
|
| 152 | 155 |
} |
| 153 | 156 |
await core.group(`Set matrix`, async () => {
|
| 154 | 157 |
core.info(`matrix: ${JSON.stringify(includes)}`);
|
| ... | ... |
@@ -178,19 +193,20 @@ jobs: |
| 178 | 178 |
- |
| 179 | 179 |
name: Prepare |
| 180 | 180 |
env: |
| 181 |
+ ARCH: ${{ inputs.arch }}
|
|
| 181 | 182 |
MODE: ${{ matrix.mode }}
|
| 182 | 183 |
run: | |
| 183 |
- CACHE_DEV_SCOPE=dev |
|
| 184 |
+ CACHE_DEV_SCOPE=dev-${ARCH}
|
|
| 184 | 185 |
if [[ "$MODE" == *"rootless"* ]]; then |
| 185 | 186 |
echo "DOCKER_ROOTLESS=1" >> $GITHUB_ENV |
| 186 | 187 |
fi |
| 187 | 188 |
if [[ "$MODE" == *"systemd"* ]]; then |
| 188 | 189 |
echo "SYSTEMD=true" >> $GITHUB_ENV |
| 189 |
- CACHE_DEV_SCOPE="${CACHE_DEV_SCOPE}systemd"
|
|
| 190 |
+ CACHE_DEV_SCOPE="dev-systemd-${ARCH}"
|
|
| 190 | 191 |
fi |
| 191 | 192 |
if [[ "$MODE" == *"firewalld"* ]]; then |
| 192 | 193 |
echo "FIREWALLD=true" >> $GITHUB_ENV |
| 193 |
- CACHE_DEV_SCOPE="${CACHE_DEV_SCOPE}firewalld"
|
|
| 194 |
+ CACHE_DEV_SCOPE="dev-firewalld-${ARCH}"
|
|
| 194 | 195 |
fi |
| 195 | 196 |
if [[ "$MODE" == *"nftables"* ]]; then |
| 196 | 197 |
echo "DOCKER_FIREWALL_BACKEND=nftables" >> $GITHUB_ENV |
| ... | ... |
@@ -257,7 +273,7 @@ jobs: |
| 257 | 257 |
with: |
| 258 | 258 |
directory: ./bundles/test-integration |
| 259 | 259 |
env_vars: RUNNER_OS |
| 260 |
- flags: integration,${{ matrix.mode }}
|
|
| 260 |
+ flags: integration,${{ inputs.arch }},${{ matrix.mode }}
|
|
| 261 | 261 |
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
| 262 | 262 |
- |
| 263 | 263 |
name: Test daemon logs |
| ... | ... |
@@ -269,7 +285,7 @@ jobs: |
| 269 | 269 |
if: always() |
| 270 | 270 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 271 | 271 |
with: |
| 272 |
- name: test-reports-integration-${{ inputs.storage }}-${{ env.TESTREPORTS_NAME }}
|
|
| 272 |
+ name: test-reports-integration-${{ inputs.arch }}-${{ inputs.storage }}-${{ env.TESTREPORTS_NAME }}
|
|
| 273 | 273 |
path: /tmp/reports/* |
| 274 | 274 |
retention-days: 1 |
| 275 | 275 |
- |
| ... | ... |
@@ -277,7 +293,7 @@ jobs: |
| 277 | 277 |
if: always() |
| 278 | 278 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 279 | 279 |
with: |
| 280 |
- name: test-results-integration-${{ inputs.storage }}-${{ env.TESTREPORTS_NAME }}
|
|
| 280 |
+ name: test-results-integration-${{ inputs.arch }}-${{ inputs.storage }}-${{ env.TESTREPORTS_NAME }}
|
|
| 281 | 281 |
path: /tmp/reports/**/*go-test-report*.json |
| 282 | 282 |
retention-days: 7 |
| 283 | 283 |
|
| ... | ... |
@@ -300,7 +316,7 @@ jobs: |
| 300 | 300 |
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| 301 | 301 |
with: |
| 302 | 302 |
path: /tmp/reports |
| 303 |
- pattern: test-reports-integration-${{ inputs.storage }}-*
|
|
| 303 |
+ pattern: test-reports-integration-${{ inputs.arch }}-${{ inputs.storage }}-*
|
|
| 304 | 304 |
merge-multiple: true |
| 305 | 305 |
- |
| 306 | 306 |
name: Install teststat |
| ... | ... |
@@ -314,7 +330,7 @@ jobs: |
| 314 | 314 |
fi |
| 315 | 315 |
|
| 316 | 316 |
integration-cli-prepare: |
| 317 |
- runs-on: ubuntu-24.04 |
|
| 317 |
+ runs-on: ${{ inputs.runner }}
|
|
| 318 | 318 |
timeout-minutes: 120 # guardrails timeout for the whole job |
| 319 | 319 |
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
| 320 | 320 |
outputs: |
| ... | ... |
@@ -409,7 +425,7 @@ jobs: |
| 409 | 409 |
}); |
| 410 | 410 |
|
| 411 | 411 |
integration-cli: |
| 412 |
- runs-on: ubuntu-24.04 |
|
| 412 |
+ runs-on: ${{ inputs.runner }}
|
|
| 413 | 413 |
timeout-minutes: 120 # guardrails timeout for the whole job |
| 414 | 414 |
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
| 415 | 415 |
needs: |
| ... | ... |
@@ -430,12 +446,13 @@ jobs: |
| 430 | 430 |
- |
| 431 | 431 |
name: Prepare |
| 432 | 432 |
env: |
| 433 |
+ ARCH: ${{ inputs.arch }}
|
|
| 433 | 434 |
MODE: ${{ matrix.mode }}
|
| 434 | 435 |
run: | |
| 435 |
- CACHE_DEV_SCOPE=dev |
|
| 436 |
+ CACHE_DEV_SCOPE=dev-${ARCH}
|
|
| 436 | 437 |
if [[ "$MODE" == *"firewalld"* ]]; then |
| 437 | 438 |
echo "FIREWALLD=true" >> $GITHUB_ENV |
| 438 |
- CACHE_DEV_SCOPE="${CACHE_DEV_SCOPE}firewalld"
|
|
| 439 |
+ CACHE_DEV_SCOPE="dev-firewalld-${ARCH}"
|
|
| 439 | 440 |
fi |
| 440 | 441 |
if [[ "$MODE" == *"nftables"* ]]; then |
| 441 | 442 |
echo "DOCKER_FIREWALL_BACKEND=nftables" >> $GITHUB_ENV |
| ... | ... |
@@ -454,7 +471,7 @@ jobs: |
| 454 | 454 |
with: |
| 455 | 455 |
targets: dev |
| 456 | 456 |
set: | |
| 457 |
- dev.cache-from=type=gha,scope=dev |
|
| 457 |
+ dev.cache-from=type=gha,scope=${{ env.CACHE_DEV_SCOPE }}
|
|
| 458 | 458 |
- |
| 459 | 459 |
name: Test |
| 460 | 460 |
run: | |
| ... | ... |
@@ -487,7 +504,7 @@ jobs: |
| 487 | 487 |
with: |
| 488 | 488 |
directory: ./bundles/test-integration |
| 489 | 489 |
env_vars: RUNNER_OS |
| 490 |
- flags: integration-cli |
|
| 490 |
+ flags: integration-cli,${{ inputs.arch }}
|
|
| 491 | 491 |
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
| 492 | 492 |
- |
| 493 | 493 |
name: Test daemon logs |
| ... | ... |
@@ -499,7 +516,7 @@ jobs: |
| 499 | 499 |
if: always() |
| 500 | 500 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 501 | 501 |
with: |
| 502 |
- name: test-reports-integration-cli-${{ inputs.storage }}-${{ matrix.mode }}-${{ env.TESTREPORTS_NAME }}
|
|
| 502 |
+ name: test-reports-integration-cli-${{ inputs.arch }}-${{ inputs.storage }}-${{ matrix.mode }}-${{ env.TESTREPORTS_NAME }}
|
|
| 503 | 503 |
path: /tmp/reports/* |
| 504 | 504 |
retention-days: 1 |
| 505 | 505 |
- |
| ... | ... |
@@ -507,7 +524,7 @@ jobs: |
| 507 | 507 |
if: always() |
| 508 | 508 |
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 509 | 509 |
with: |
| 510 |
- name: test-results-integration-cli-${{ inputs.storage }}-${{ matrix.mode }}-${{ env.TESTREPORTS_NAME }}
|
|
| 510 |
+ name: test-results-integration-cli-${{ inputs.arch }}-${{ inputs.storage }}-${{ matrix.mode }}-${{ env.TESTREPORTS_NAME }}
|
|
| 511 | 511 |
path: /tmp/reports/**/*go-test-report*.json |
| 512 | 512 |
retention-days: 7 |
| 513 | 513 |
|
| ... | ... |
@@ -530,7 +547,7 @@ jobs: |
| 530 | 530 |
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| 531 | 531 |
with: |
| 532 | 532 |
path: /tmp/reports |
| 533 |
- pattern: test-reports-integration-cli-${{ inputs.storage }}-${{ matrix.mode }}-*
|
|
| 533 |
+ pattern: test-reports-integration-cli-${{ inputs.arch }}-${{ inputs.storage }}-*
|
|
| 534 | 534 |
merge-multiple: true |
| 535 | 535 |
- |
| 536 | 536 |
name: Install teststat |
| 537 | 537 |
deleted file mode 100644 |
| ... | ... |
@@ -1,304 +0,0 @@ |
| 1 |
-name: arm64 |
|
| 2 |
- |
|
| 3 |
-concurrency: |
|
| 4 |
- group: ${{ github.workflow }}-${{ github.ref }}
|
|
| 5 |
- cancel-in-progress: true |
|
| 6 |
- |
|
| 7 |
-permissions: |
|
| 8 |
- contents: read |
|
| 9 |
- |
|
| 10 |
-on: |
|
| 11 |
- workflow_dispatch: |
|
| 12 |
- push: |
|
| 13 |
- branches: |
|
| 14 |
- - 'master' |
|
| 15 |
- - '[0-9]+.[0-9]+' |
|
| 16 |
- - '[0-9]+.x' |
|
| 17 |
- pull_request: |
|
| 18 |
- |
|
| 19 |
-env: |
|
| 20 |
- GO_VERSION: "1.26.4" |
|
| 21 |
- TESTSTAT_VERSION: v0.1.25 |
|
| 22 |
- DESTDIR: ./build |
|
| 23 |
- SETUP_BUILDX_VERSION: edge |
|
| 24 |
- SETUP_BUILDKIT_IMAGE: moby/buildkit:latest |
|
| 25 |
- DOCKER_EXPERIMENTAL: 1 |
|
| 26 |
- |
|
| 27 |
-jobs: |
|
| 28 |
- validate-dco: |
|
| 29 |
- uses: ./.github/workflows/.dco.yml |
|
| 30 |
- |
|
| 31 |
- build: |
|
| 32 |
- runs-on: ubuntu-24.04-arm |
|
| 33 |
- timeout-minutes: 20 # guardrails timeout for the whole job |
|
| 34 |
- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
| 35 |
- needs: |
|
| 36 |
- - validate-dco |
|
| 37 |
- strategy: |
|
| 38 |
- fail-fast: false |
|
| 39 |
- matrix: |
|
| 40 |
- target: |
|
| 41 |
- - binary |
|
| 42 |
- - dynbinary |
|
| 43 |
- steps: |
|
| 44 |
- - |
|
| 45 |
- name: Set up Docker Buildx |
|
| 46 |
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
|
| 47 |
- with: |
|
| 48 |
- version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
| 49 |
- driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
| 50 |
- buildkitd-flags: --debug |
|
| 51 |
- - |
|
| 52 |
- name: Build |
|
| 53 |
- uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0 |
|
| 54 |
- with: |
|
| 55 |
- targets: ${{ matrix.target }}
|
|
| 56 |
- - |
|
| 57 |
- name: List artifacts |
|
| 58 |
- run: | |
|
| 59 |
- tree -nh ${{ env.DESTDIR }}
|
|
| 60 |
- - |
|
| 61 |
- name: Check artifacts |
|
| 62 |
- run: | |
|
| 63 |
- find ${{ env.DESTDIR }} -type f -exec file -e ascii -- {} +
|
|
| 64 |
- |
|
| 65 |
- build-dev: |
|
| 66 |
- runs-on: ubuntu-24.04-arm |
|
| 67 |
- timeout-minutes: 120 # guardrails timeout for the whole job |
|
| 68 |
- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
| 69 |
- needs: |
|
| 70 |
- - validate-dco |
|
| 71 |
- steps: |
|
| 72 |
- - |
|
| 73 |
- name: Set up Docker Buildx |
|
| 74 |
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
|
| 75 |
- with: |
|
| 76 |
- version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
| 77 |
- driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
| 78 |
- buildkitd-flags: --debug |
|
| 79 |
- - |
|
| 80 |
- name: Build dev image |
|
| 81 |
- uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0 |
|
| 82 |
- with: |
|
| 83 |
- targets: dev |
|
| 84 |
- set: | |
|
| 85 |
- *.cache-from=type=gha,scope=dev-arm64 |
|
| 86 |
- *.cache-to=type=gha,scope=dev-arm64 |
|
| 87 |
- *.output=type=cacheonly |
|
| 88 |
- |
|
| 89 |
- test-unit: |
|
| 90 |
- runs-on: ubuntu-24.04-arm |
|
| 91 |
- timeout-minutes: 120 # guardrails timeout for the whole job |
|
| 92 |
- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
| 93 |
- needs: |
|
| 94 |
- - build-dev |
|
| 95 |
- steps: |
|
| 96 |
- - |
|
| 97 |
- name: Checkout |
|
| 98 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
|
| 99 |
- - |
|
| 100 |
- name: Set up runner |
|
| 101 |
- uses: ./.github/actions/setup-runner |
|
| 102 |
- - |
|
| 103 |
- name: Set up Docker Buildx |
|
| 104 |
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
|
| 105 |
- with: |
|
| 106 |
- version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
| 107 |
- driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
| 108 |
- buildkitd-flags: --debug |
|
| 109 |
- - |
|
| 110 |
- name: Set up QEMU |
|
| 111 |
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 |
|
| 112 |
- - |
|
| 113 |
- name: Build dev image |
|
| 114 |
- uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0 |
|
| 115 |
- with: |
|
| 116 |
- targets: dev |
|
| 117 |
- set: | |
|
| 118 |
- dev.cache-from=type=gha,scope=dev-arm64 |
|
| 119 |
- - |
|
| 120 |
- name: Test |
|
| 121 |
- run: | |
|
| 122 |
- make -o build test-unit |
|
| 123 |
- - |
|
| 124 |
- name: Prepare reports |
|
| 125 |
- if: always() |
|
| 126 |
- run: | |
|
| 127 |
- mkdir -p bundles /tmp/reports |
|
| 128 |
- find bundles \( -path '*/root' -o -path '*/root/*' \) -prune -o -type f \( -name '*-report.json' -o -name '*.log' -o -name '*.out' -o -name '*.prof' -o -name '*-report.xml' \) -print0 | sudo tar --null --files-from=- -czf /tmp/reports.tar.gz |
|
| 129 |
- tar -xzf /tmp/reports.tar.gz -C /tmp/reports |
|
| 130 |
- sudo chown -R $(id -u):$(id -g) /tmp/reports |
|
| 131 |
- tree -nh /tmp/reports |
|
| 132 |
- - |
|
| 133 |
- name: Send to Codecov |
|
| 134 |
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 |
|
| 135 |
- with: |
|
| 136 |
- directory: ./bundles |
|
| 137 |
- env_vars: RUNNER_OS |
|
| 138 |
- flags: unit |
|
| 139 |
- token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
|
| 140 |
- - |
|
| 141 |
- name: Upload reports |
|
| 142 |
- if: always() |
|
| 143 |
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
|
| 144 |
- with: |
|
| 145 |
- name: test-reports-unit-arm64-graphdriver |
|
| 146 |
- path: /tmp/reports/* |
|
| 147 |
- retention-days: 1 |
|
| 148 |
- - |
|
| 149 |
- name: Upload test results (gotestsum JSON) |
|
| 150 |
- if: always() |
|
| 151 |
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
|
| 152 |
- with: |
|
| 153 |
- name: test-results-unit-arm64-graphdriver |
|
| 154 |
- path: /tmp/reports/**/*go-test-report*.json |
|
| 155 |
- retention-days: 7 |
|
| 156 |
- |
|
| 157 |
- test-unit-report: |
|
| 158 |
- runs-on: ubuntu-24.04 |
|
| 159 |
- timeout-minutes: 10 |
|
| 160 |
- continue-on-error: ${{ github.event_name != 'pull_request' }}
|
|
| 161 |
- if: always() && (github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only')) |
|
| 162 |
- needs: |
|
| 163 |
- - test-unit |
|
| 164 |
- steps: |
|
| 165 |
- - |
|
| 166 |
- name: Set up Go |
|
| 167 |
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 |
|
| 168 |
- with: |
|
| 169 |
- go-version: ${{ env.GO_VERSION }}
|
|
| 170 |
- cache: false |
|
| 171 |
- - |
|
| 172 |
- name: Download reports |
|
| 173 |
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
|
| 174 |
- with: |
|
| 175 |
- pattern: test-reports-unit-arm64-* |
|
| 176 |
- path: /tmp/reports |
|
| 177 |
- - |
|
| 178 |
- name: Install teststat |
|
| 179 |
- run: | |
|
| 180 |
- go install github.com/vearutop/teststat@${{ env.TESTSTAT_VERSION }}
|
|
| 181 |
- - |
|
| 182 |
- name: Create summary |
|
| 183 |
- run: | |
|
| 184 |
- if [ -d /tmp/reports ]; then |
|
| 185 |
- find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> "$GITHUB_STEP_SUMMARY"
|
|
| 186 |
- fi |
|
| 187 |
- |
|
| 188 |
- test-integration: |
|
| 189 |
- runs-on: ubuntu-24.04-arm |
|
| 190 |
- timeout-minutes: 120 # guardrails timeout for the whole job |
|
| 191 |
- continue-on-error: ${{ github.event_name != 'pull_request' }}
|
|
| 192 |
- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
| 193 |
- needs: |
|
| 194 |
- - build-dev |
|
| 195 |
- steps: |
|
| 196 |
- - |
|
| 197 |
- name: Checkout |
|
| 198 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
|
| 199 |
- - |
|
| 200 |
- name: Set up runner |
|
| 201 |
- uses: ./.github/actions/setup-runner |
|
| 202 |
- - |
|
| 203 |
- name: Set up tracing |
|
| 204 |
- uses: ./.github/actions/setup-tracing |
|
| 205 |
- - |
|
| 206 |
- name: Set up Docker Buildx |
|
| 207 |
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
|
| 208 |
- with: |
|
| 209 |
- version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
| 210 |
- driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
| 211 |
- buildkitd-flags: --debug |
|
| 212 |
- - |
|
| 213 |
- name: Set up QEMU |
|
| 214 |
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 |
|
| 215 |
- - |
|
| 216 |
- name: Build dev image |
|
| 217 |
- uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584 # v7.2.0 |
|
| 218 |
- with: |
|
| 219 |
- targets: dev |
|
| 220 |
- set: | |
|
| 221 |
- dev.cache-from=type=gha,scope=dev-arm64 |
|
| 222 |
- - |
|
| 223 |
- name: Test |
|
| 224 |
- run: | |
|
| 225 |
- make -o build test-integration |
|
| 226 |
- env: |
|
| 227 |
- TEST_SKIP_INTEGRATION_CLI: 1 |
|
| 228 |
- TESTCOVERAGE: 1 |
|
| 229 |
- - |
|
| 230 |
- name: Prepare reports |
|
| 231 |
- if: always() |
|
| 232 |
- run: | |
|
| 233 |
- reportsName=arm64-graphdriver |
|
| 234 |
- reportsPath=/tmp/reports/$reportsName |
|
| 235 |
- echo "TESTREPORTS_NAME=$reportsName" >> $GITHUB_ENV |
|
| 236 |
- |
|
| 237 |
- docker stop otelcol |
|
| 238 |
- mkdir -p bundles $reportsPath |
|
| 239 |
- find bundles \( -path '*/root' -o -path '*/root/*' \) -prune -o -type f \( -name '*-report.json' -o -name '*.log' -o -name '*.out' -o -name '*.prof' -o -name '*-report.xml' \) -print0 | sudo tar --null --files-from=- -czf /tmp/reports.tar.gz |
|
| 240 |
- tar -xzf /tmp/reports.tar.gz -C $reportsPath |
|
| 241 |
- sudo mv /tmp/reports/otel-trace*.jsonl $reportsPath/ 2>/dev/null || true |
|
| 242 |
- sudo chown -R $(id -u):$(id -g) $reportsPath |
|
| 243 |
- tree -nh $reportsPath |
|
| 244 |
- - |
|
| 245 |
- name: Send to Codecov |
|
| 246 |
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 |
|
| 247 |
- with: |
|
| 248 |
- directory: ./bundles/test-integration |
|
| 249 |
- env_vars: RUNNER_OS |
|
| 250 |
- flags: integration |
|
| 251 |
- token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
|
| 252 |
- - |
|
| 253 |
- name: Test daemon logs |
|
| 254 |
- if: always() |
|
| 255 |
- run: | |
|
| 256 |
- cat bundles/test-integration/docker.log |
|
| 257 |
- - |
|
| 258 |
- name: Upload reports |
|
| 259 |
- if: always() |
|
| 260 |
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
|
| 261 |
- with: |
|
| 262 |
- name: test-reports-integration-arm64-graphdriver |
|
| 263 |
- path: /tmp/reports/* |
|
| 264 |
- retention-days: 1 |
|
| 265 |
- - |
|
| 266 |
- name: Upload test results (gotestsum JSON) |
|
| 267 |
- if: always() |
|
| 268 |
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
|
| 269 |
- with: |
|
| 270 |
- name: test-results-integration-arm64-graphdriver |
|
| 271 |
- path: /tmp/reports/**/*go-test-report*.json |
|
| 272 |
- retention-days: 7 |
|
| 273 |
- |
|
| 274 |
- test-integration-report: |
|
| 275 |
- runs-on: ubuntu-24.04 |
|
| 276 |
- timeout-minutes: 10 |
|
| 277 |
- continue-on-error: ${{ github.event_name != 'pull_request' }}
|
|
| 278 |
- if: always() && (github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only')) |
|
| 279 |
- needs: |
|
| 280 |
- - test-integration |
|
| 281 |
- steps: |
|
| 282 |
- - |
|
| 283 |
- name: Set up Go |
|
| 284 |
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 |
|
| 285 |
- with: |
|
| 286 |
- go-version: ${{ env.GO_VERSION }}
|
|
| 287 |
- cache: false |
|
| 288 |
- - |
|
| 289 |
- name: Download reports |
|
| 290 |
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
|
| 291 |
- with: |
|
| 292 |
- path: /tmp/reports |
|
| 293 |
- pattern: test-reports-integration-arm64-* |
|
| 294 |
- merge-multiple: true |
|
| 295 |
- - |
|
| 296 |
- name: Install teststat |
|
| 297 |
- run: | |
|
| 298 |
- go install github.com/vearutop/teststat@${{ env.TESTSTAT_VERSION }}
|
|
| 299 |
- - |
|
| 300 |
- name: Create summary |
|
| 301 |
- run: | |
|
| 302 |
- if [ -d /tmp/reports ]; then |
|
| 303 |
- find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> "$GITHUB_STEP_SUMMARY"
|
|
| 304 |
- fi |
| ... | ... |
@@ -26,16 +26,22 @@ jobs: |
| 26 | 26 |
uses: ./.github/workflows/.dco.yml |
| 27 | 27 |
|
| 28 | 28 |
build: |
| 29 |
- runs-on: ubuntu-24.04 |
|
| 29 |
+ runs-on: ${{ matrix.runner }}
|
|
| 30 | 30 |
timeout-minutes: 20 # guardrails timeout for the whole job |
| 31 | 31 |
needs: |
| 32 | 32 |
- validate-dco |
| 33 | 33 |
strategy: |
| 34 | 34 |
fail-fast: false |
| 35 | 35 |
matrix: |
| 36 |
- target: |
|
| 37 |
- - binary |
|
| 38 |
- - dynbinary |
|
| 36 |
+ include: |
|
| 37 |
+ - runner: ubuntu-24.04 |
|
| 38 |
+ target: binary |
|
| 39 |
+ - runner: ubuntu-24.04 |
|
| 40 |
+ target: dynbinary |
|
| 41 |
+ - runner: ubuntu-24.04-arm |
|
| 42 |
+ target: binary |
|
| 43 |
+ - runner: ubuntu-24.04-arm |
|
| 44 |
+ target: dynbinary |
|
| 39 | 45 |
steps: |
| 40 | 46 |
- |
| 41 | 47 |
name: Set up Docker Buildx |
| ... | ... |
@@ -28,13 +28,16 @@ jobs: |
| 28 | 28 |
uses: ./.github/workflows/.dco.yml |
| 29 | 29 |
|
| 30 | 30 |
build-dev: |
| 31 |
- runs-on: ubuntu-24.04 |
|
| 31 |
+ runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
|
| 32 | 32 |
timeout-minutes: 120 # guardrails timeout for the whole job |
| 33 | 33 |
needs: |
| 34 | 34 |
- validate-dco |
| 35 | 35 |
strategy: |
| 36 | 36 |
fail-fast: false |
| 37 | 37 |
matrix: |
| 38 |
+ arch: |
|
| 39 |
+ - amd64 |
|
| 40 |
+ - arm64 |
|
| 38 | 41 |
mode: |
| 39 | 42 |
- "" |
| 40 | 43 |
- systemd |
| ... | ... |
@@ -61,16 +64,16 @@ jobs: |
| 61 | 61 |
with: |
| 62 | 62 |
targets: dev |
| 63 | 63 |
set: | |
| 64 |
- *.cache-from=type=gha,scope=dev${{ matrix.mode }}
|
|
| 65 |
- *.cache-to=type=gha,scope=dev${{ matrix.mode }}
|
|
| 66 |
- ${{ matrix.mode == '' && '*.output=type=docker,dest=/tmp/dev-image.tar' || '*.output=type=cacheonly' }}
|
|
| 64 |
+ *.cache-from=type=gha,scope=${{ matrix.mode == '' && format('dev-{0}', matrix.arch) || format('dev-{0}-{1}', matrix.mode, matrix.arch) }}
|
|
| 65 |
+ *.cache-to=type=gha,scope=${{ matrix.mode == '' && format('dev-{0}', matrix.arch) || format('dev-{0}-{1}', matrix.mode, matrix.arch) }}
|
|
| 66 |
+ ${{ matrix.mode == '' && format('*.output=type=docker,dest=/tmp/dev-image-{0}.tar', matrix.arch) || '*.output=type=cacheonly' }}
|
|
| 67 | 67 |
- |
| 68 | 68 |
name: Cache dev image |
| 69 | 69 |
if: matrix.mode == '' |
| 70 | 70 |
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 |
| 71 | 71 |
with: |
| 72 |
- key: dev-image-${{ github.run_id }}
|
|
| 73 |
- path: /tmp/dev-image.tar |
|
| 72 |
+ key: dev-image-${{ matrix.arch }}-${{ github.run_id }}
|
|
| 73 |
+ path: /tmp/dev-image-${{ matrix.arch }}.tar
|
|
| 74 | 74 |
|
| 75 | 75 |
test: |
| 76 | 76 |
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
| ... | ... |
@@ -81,10 +84,22 @@ jobs: |
| 81 | 81 |
strategy: |
| 82 | 82 |
fail-fast: false |
| 83 | 83 |
matrix: |
| 84 |
- storage: |
|
| 85 |
- - graphdriver |
|
| 86 |
- - snapshotter |
|
| 84 |
+ include: |
|
| 85 |
+ - arch: amd64 |
|
| 86 |
+ runner: ubuntu-24.04 |
|
| 87 |
+ storage: graphdriver |
|
| 88 |
+ - arch: amd64 |
|
| 89 |
+ runner: ubuntu-24.04 |
|
| 90 |
+ storage: snapshotter |
|
| 91 |
+ - arch: arm64 |
|
| 92 |
+ runner: ubuntu-24.04-arm |
|
| 93 |
+ storage: graphdriver |
|
| 94 |
+ - arch: arm64 |
|
| 95 |
+ runner: ubuntu-24.04-arm |
|
| 96 |
+ storage: snapshotter |
|
| 87 | 97 |
with: |
| 98 |
+ arch: ${{ matrix.arch }}
|
|
| 99 |
+ runner: ${{ matrix.runner }}
|
|
| 88 | 100 |
storage: ${{ matrix.storage }}
|
| 89 | 101 |
secrets: |
| 90 | 102 |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
| ... | ... |
@@ -95,6 +110,17 @@ jobs: |
| 95 | 95 |
- build-dev |
| 96 | 96 |
- validate-dco |
| 97 | 97 |
uses: ./.github/workflows/.test-unit.yml |
| 98 |
+ strategy: |
|
| 99 |
+ fail-fast: false |
|
| 100 |
+ matrix: |
|
| 101 |
+ include: |
|
| 102 |
+ - arch: amd64 |
|
| 103 |
+ runner: ubuntu-24.04 |
|
| 104 |
+ - arch: arm64 |
|
| 105 |
+ runner: ubuntu-24.04-arm |
|
| 106 |
+ with: |
|
| 107 |
+ arch: ${{ matrix.arch }}
|
|
| 108 |
+ runner: ${{ matrix.runner }}
|
|
| 98 | 109 |
secrets: |
| 99 | 110 |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
| 100 | 111 |
|
| ... | ... |
@@ -146,13 +172,13 @@ jobs: |
| 146 | 146 |
name: Restore dev image |
| 147 | 147 |
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 |
| 148 | 148 |
with: |
| 149 |
- key: dev-image-${{ github.run_id }}
|
|
| 150 |
- path: /tmp/dev-image.tar |
|
| 149 |
+ key: dev-image-amd64-${{ github.run_id }}
|
|
| 150 |
+ path: /tmp/dev-image-amd64.tar |
|
| 151 | 151 |
fail-on-cache-miss: true |
| 152 | 152 |
- |
| 153 | 153 |
name: Load dev image |
| 154 | 154 |
run: | |
| 155 |
- docker load -i /tmp/dev-image.tar |
|
| 155 |
+ docker load -i /tmp/dev-image-amd64.tar |
|
| 156 | 156 |
- |
| 157 | 157 |
name: Validate |
| 158 | 158 |
env: |