diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f1566e..8c6dd0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -152,7 +152,7 @@ jobs: install: | apt-get -y update; apt-get install -q -y git golang-go; - apt-get install -y bats golang make openssl swtpm tpm2-tools \ + apt-get install -y bats curl golang make openssl swtpm tpm2-tools \ libcryptsetup-dev libgpgme-dev libcap-dev qemu-kvm \ libdevmapper-dev libacl1-dev libarchive-tools pip python3-yaml \ sbsigntool squashfs-tools wget @@ -169,7 +169,7 @@ jobs: pwd git describe --always --dirty go version - make trust + make make test-trust - name: Rename Binary run: | diff --git a/Makefile b/Makefile index ffb8c1c..043fbc9 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,15 @@ TOPDIR := $(shell git rev-parse --show-toplevel) BOOTKIT_VERSION ?= "v0.0.15.230901" ROOTFS_VERSION = $(BOOTKIT_VERSION) +archout = $(shell arch) +ifeq ("$(archout)", "aarch64") +arch = arm64 +else ifeq ("$(archout)", "x86_64") +arch = amd64 +else +#error "Unsupported architecture: $(archout)" +endif + MAIN_VERSION ?= $(shell git describe --always --dirty || echo no-git) ifeq ($(MAIN_VERSION),$(filter $(MAIN_VERSION), "", no-git)) $(error "Bad value for MAIN_VERSION: '$(MAIN_VERSION)'") @@ -38,18 +47,18 @@ trust: .made-gofmt $(GO_SRC) $(ZOT): mkdir -p $(TOOLSDIR)/bin - curl -Lo $(ZOT) https://github.com/project-zot/zot/releases/download/v$(ZOT_VERSION)/zot-linux-amd64-minimal + curl -Lo $(ZOT) https://github.com/project-zot/zot/releases/download/v$(ZOT_VERSION)/zot-linux-${arch}-minimal chmod +x $(ZOT) $(ORAS): mkdir -p $(TOOLSDIR)/bin - curl -Lo oras.tar.gz https://github.com/oras-project/oras/releases/download/v$(ORAS_VERSION)/oras_$(ORAS_VERSION)_linux_amd64.tar.gz + curl -Lo oras.tar.gz https://github.com/oras-project/oras/releases/download/v$(ORAS_VERSION)/oras_$(ORAS_VERSION)_linux_$(arch).tar.gz tar xvzf oras.tar.gz -C $(TOOLSDIR)/bin oras rm oras.tar.gz $(REGCTL): mkdir -p $(TOOLSDIR)/bin - curl -Lo $(REGCTL) https://github.com/regclient/regclient/releases/download/v$(REGCTL_VERSION)/regctl-linux-amd64 + curl -Lo $(REGCTL) https://github.com/regclient/regclient/releases/download/v$(REGCTL_VERSION)/regctl-linux-$(arch) chmod +x $(REGCTL) .PHONY: gofmt