diff --git a/.github/workflows/action-build.yml b/.github/workflows/action-build.yml index 566ef1348..87cfdaf33 100644 --- a/.github/workflows/action-build.yml +++ b/.github/workflows/action-build.yml @@ -25,6 +25,10 @@ on: sign: default: false type: boolean + binprefix: + default: containerd-shim- + type: string + required: false jobs: build-sign-upload: @@ -73,13 +77,13 @@ jobs: make dist-${{ inputs.runtime }} # Check if there's any files to archive as tar fails otherwise if stat dist/bin/* >/dev/null 2>&1; then - tar -czf dist/containerd-shim-${{ inputs.runtime }}-${{ inputs.slug }}.tar.gz -C dist/bin . + tar -czf dist/${{ inputs.binprefix }}${{ inputs.runtime }}-${{ inputs.slug }}.tar.gz -C dist/bin . else - tar -czf dist/containerd-shim-${{ inputs.runtime }}-${{ inputs.slug }}.tar.gz -T /dev/null + tar -czf dist/${{ inputs.binprefix }}${{ inputs.runtime }}-${{ inputs.slug }}.tar.gz -T /dev/null fi - name: Upload artifacts if: ${{ inputs.runtime != 'common' }} uses: actions/upload-artifact@master with: - name: containerd-shim-${{ inputs.runtime }}-${{ inputs.slug }} - path: dist/containerd-shim-${{ inputs.runtime }}-${{ inputs.slug }}.tar.gz + name: ${{ inputs.binprefix }}${{ inputs.runtime }}-${{ inputs.slug }} + path: dist/${{ inputs.binprefix }}${{ inputs.runtime }}-${{ inputs.slug }}.tar.gz diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a2e3764e..d01dcd07e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,22 @@ jobs: os: ${{ matrix.os }} runtime: ${{ matrix.runtime }} slug: "windows" + + build-oci-tar-builder: + name: oci-tar-builder-${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-22.04"] + arch: ["x86_64", "aarch64"] + uses: ./.github/workflows/action-build.yml + with: + os: ${{ matrix.os }} + runtime: "oci-tar-builder" + target: "${{ matrix.arch }}-unknown-linux-gnu" + slug: "${{ matrix.arch }}-linux-gnu" + arch: ${{ matrix.arch }} + sign: false + binprefix: "" smoke-tests: name: ${{ matrix.runtime }} diff --git a/Makefile b/Makefile index cac7edbf3..a934dd849 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,10 @@ install-%: mkdir -p $(PREFIX)/bin $(INSTALL) $(TARGET_DIR)$(TARGET)/$(OPT_PROFILE)/containerd-shim-$*-v1 $(PREFIX)/bin/ +install-oci-tar-builder: + mkdir -p $(PREFIX)/bin + $(INSTALL) $(TARGET_DIR)$(TARGET)/$(OPT_PROFILE)/oci-tar-builder $(PREFIX)/bin/ + .PHONY: dist dist-% dist: $(RUNTIMES:%=dist-%);