Skip to content

Commit

Permalink
Merge pull request #3508 from nalind/cross-all
Browse files Browse the repository at this point in the history
Makefile: update cross targets
  • Loading branch information
openshift-merge-robot committed Sep 10, 2021
2 parents 83cc5a3 + 9560ff5 commit e656823
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .cirrus.yml
Expand Up @@ -177,7 +177,7 @@ conformance_task:
conformance_test_script: '${SCRIPT_BASE}/test.sh conformance |& ${_TIMESTAMP}'


# Confirm cross-compile ALL archetectures on a Mac OS-X VM.
# Confirm cross-compile ALL architectures on a Mac OS-X VM.
cross_build_task:
name: "Cross Compile"
alias: cross_build
Expand All @@ -186,13 +186,14 @@ cross_build_task:
- unit

osx_instance:
image: 'catalina-base'
image: 'big-sur-base'

script:
- brew update
- brew install go
- brew install go-md2man
- brew install gpgme
- go version
- make cross CGO_ENABLED=0

binary_artifacts:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -70,8 +70,11 @@ bin/buildah: $(SOURCES) cmd/buildah/*.go
.PHONY: buildah
buildah: bin/buildah

LINUX_CROSS_TARGETS = $(addprefix bin/buildah.,$(subst /,.,$(shell $(GO) tool dist list | grep ^linux/)))
DARWIN_CROSS_TARGETS = $(addprefix bin/buildah.,$(subst /,.,$(shell $(GO) tool dist list | grep ^darwin/)))
WINDOWS_CROSS_TARGETS = $(addsuffix .exe,$(addprefix bin/buildah.,$(subst /,.,$(shell $(GO) tool dist list | grep ^windows/))))
.PHONY: cross
cross: bin/buildah.darwin.amd64 bin/buildah.linux.386 bin/buildah.linux.amd64 bin/buildah.linux.arm64 bin/buildah.linux.arm bin/buildah.linux.mips64 bin/buildah.linux.mips64le bin/buildah.linux.mips bin/buildah.linux.mipsle bin/buildah.linux.ppc64 bin/buildah.linux.ppc64le bin/buildah.linux.riscv64 bin/buildah.linux.s390x bin/buildah.windows.amd64.exe
cross: $(LINUX_CROSS_TARGETS) $(DARWIN_CROSS_TARGETS) $(WINDOWS_CROSS_TARGETS)

bin/buildah.%:
mkdir -p ./bin
Expand Down

0 comments on commit e656823

Please sign in to comment.