Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 18 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,50 +128,35 @@ jobs:
run: | # Runners must provide default credentials
docker login

- name: Arch Runner is Matrix
id: arch_runner_equals_matrix
run: |
RUNNER_ARCH=${{ runner.arch }}
[ "$RUNNER_ARCH" = "X64" ] && RUNNER_ARCH="amd64"
[ "$RUNNER_ARCH" = "ARM64" ] && RUNNER_ARCH="arm64"
[ "$RUNNER_ARCH" = "X86" ] && RUNNER_ARCH="i386"
[ "$RUNNER_ARCH" = "ARM" ] && RUNNER_ARCH="arm"
MATCHED="false"
[ "$RUNNER_ARCH" = "${{ matrix.arch }}" ] && MATCHED="true"
# report for good measure
echo "runner_arch=${RUNNER_ARCH}"
echo "matrix_arch=${{ matrix.arch }}"
echo "matched=${MATCHED}"
echo "matched=${MATCHED}" >> "$GITHUB_OUTPUT"
# the next three steps - cache_for_docker, load images, and cache_for_packages -
# having nothing to do with the content of the final eve image. Instead, it is because we are running
# on amd64, and we need some of the tools in order to compose the final eve image for the target arch.
# These tools are in pkg/, and therefore are part of packages, and we need them in docker.
# Rather than build them again, we just restore the cache for our runner architecture,
# load them into docker, and then clear the cache so we can load the cache for the target arch.
- name: update linuxkit cache for runner arch so we can get desired images
id: cache_for_docker
# For riscv64, we cross-build on amd64 runners. We need amd64 tool images
# (mkconf, mkimage-raw-efi, etc.) in docker, but riscv64 packages in the cache.
# So: restore amd64 cache -> load tools -> clear -> restore riscv64 cache.
- name: load amd64 tool images for riscv64 cross-build
if: ${{ matrix.arch == 'riscv64' }}
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.linuxkit/cache
key: linuxkit-amd64-${{ github.event.pull_request.head.sha }}-generic
fail-on-cache-miss: true
- name: load images we need from linuxkit cache into docker
- name: load amd64 tools into docker for riscv64 cross-build
if: ${{ matrix.arch == 'riscv64' }}
run: |
make cache-export-docker-load-all
- name: clear linuxkit cache so we can load for target arch
if: ${{ steps.arch_runner_equals_matrix.outputs.matched != 'true' }}
run: |
rm -rf ~/.linuxkit
# With the "load into docker" complete, now we can restore the packages into the cache for the target arch (as opposed to the runner arch)
- name: update linuxkit cache for our arch
id: cache_for_packages
if: ${{ steps.arch_runner_equals_matrix.outputs.matched != 'true' }}
# Restore the target arch/platform cache. For native builds (amd64, arm64),
# this cache also contains the tool images we need.
# The 'rt' platform has no platform-specific packages, so it uses the generic cache.
- name: update linuxkit cache for target arch
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.linuxkit/cache
key: linuxkit-${{ matrix.arch }}-${{ github.event.pull_request.head.sha }}-${{ matrix.platform }}
key: linuxkit-${{ matrix.arch }}-${{ github.event.pull_request.head.sha }}-${{ matrix.platform == 'rt' && 'generic' || matrix.platform }}
fail-on-cache-miss: true
# For native builds, load tool images from the target cache we just restored.
- name: load tool images into docker
if: ${{ matrix.arch != 'riscv64' }}
run: |
make cache-export-docker-load-all
- name: set environment
env:
PR_ID: ${{ github.event.pull_request.number }}
Expand All @@ -183,7 +168,7 @@ jobs:

- name: Build EVE ${{ matrix.hv }}-${{ matrix.arch }}-${{ matrix.platform }}
run: |
make V=1 ROOTFS_VERSION="$VERSION" PLATFORM=${{ matrix.platform }} HV=${{ matrix.hv }} ZARCH=${{ matrix.arch }} pkgs eve # note that this already loads it into docker
make V=1 ROOTFS_VERSION="$VERSION" PLATFORM=${{ matrix.platform }} HV=${{ matrix.hv }} ZARCH=${{ matrix.arch }} eve
- name: Post eve build report
run: |
echo Disk usage
Expand Down
1 change: 1 addition & 0 deletions pkg/pillar/cmd/zedagent/zedagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ func queueInfoToDest(ctx *zedagentContext, dest destinationBitset,
key string, buf *bytes.Buffer, bailOnHTTPErr,
withNetTracing, forcePeriodic bool, itemType interface{}) {

// nothing ever changes
var locURL string
if ctx.getconfigCtx.locConfig != nil {
locURL = ctx.getconfigCtx.locConfig.LocURL
Expand Down
Loading