jigasi: build on arm

pull/1295/head^2
Saúl Ibarra Corretgé 2 years ago
parent c04f658974
commit fec78e4be6
  1. 6
      .github/workflows/unstable.yml
  2. 28
      Makefile

@ -237,8 +237,7 @@ jobs:
build-args: |
JITSI_REPO=${{ secrets.JITSI_REPO }}
BASE_TAG=${{ needs.version.outputs.base }}
# FIXME jigasi does not support linux/arm64
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Dryrun
@ -252,8 +251,7 @@ jobs:
build-args: |
JITSI_REPO=jitsi
BASE_TAG=${{ needs.version.outputs.base }}
# FIXME jigasi does not support linux/arm64
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

@ -4,18 +4,14 @@ JITSI_BUILD ?= unstable
JITSI_REPO ?= jitsi
NATIVE_ARCH ?= $(shell uname -m)
JITSI_MULTIARCH_SERVICES := base base-java web prosody jicofo jvb jibri
JITSI_AMD64ONLY_SERVICES := jigasi
JITSI_SERVICES := base base-java web prosody jicofo jvb jigasi jibri
ifeq ($(NATIVE_ARCH),x86_64)
TARGETPLATFORM := linux/amd64
JITSI_SERVICES := base base-java web prosody jicofo jvb jigasi jibri
else ifeq ($(NATIVE_ARCH),aarch64)
TARGETPLATFORM := linux/arm64
JITSI_SERVICES := base base-java web prosody jicofo jvb jibri
else
TARGETPLATFORM := unsupported
JITSI_SERVICES := dummy
endif
BUILD_ARGS := \
@ -30,10 +26,9 @@ endif
all: build-all
release:
@$(foreach SERVICE, $(JITSI_MULTIARCH_SERVICES), $(MAKE) --no-print-directory JITSI_SERVICE=$(SERVICE) _buildx_multiarch;)
@$(foreach SERVICE, $(JITSI_AMD64ONLY_SERVICES), $(MAKE) --no-print-directory JITSI_SERVICE=$(SERVICE) _buildx_amd64;)
@$(foreach SERVICE, $(JITSI_SERVICES), $(MAKE) --no-print-directory JITSI_SERVICE=$(SERVICE) buildx;)
_buildx_multiarch:
buildx:
docker buildx build \
--platform linux/amd64,linux/arm64 \
--progress=plain \
@ -43,15 +38,8 @@ _buildx_multiarch:
--tag $(JITSI_REPO)/$(JITSI_SERVICE):$(JITSI_RELEASE) \
$(JITSI_SERVICE)
_buildx_amd64:
docker buildx build \
--platform linux/amd64 \
--progress=plain \
$(BUILD_ARGS) --build-arg BASE_TAG=$(JITSI_BUILD) \
--pull --push \
--tag $(JITSI_REPO)/$(JITSI_SERVICE):$(JITSI_BUILD) \
--tag $(JITSI_REPO)/$(JITSI_SERVICE):$(JITSI_RELEASE) \
$(JITSI_SERVICE)
$(addprefix buildx_,$(JITSI_SERVICES)):
$(MAKE) --no-print-directory JITSI_SERVICE=$(patsubst buildx_%,%,$@) buildx
ifeq ($(TARGETPLATFORM), unsupported)
build:
@ -60,7 +48,11 @@ build:
else
build:
@echo "Building for $(TARGETPLATFORM)"
docker build $(BUILD_ARGS) --build-arg TARGETPLATFORM=$(TARGETPLATFORM) --progress plain --tag $(JITSI_REPO)/$(JITSI_SERVICE) $(JITSI_SERVICE)/
docker build \
$(BUILD_ARGS) --build-arg TARGETPLATFORM=$(TARGETPLATFORM) \
--progress plain \
--tag $(JITSI_REPO)/$(JITSI_SERVICE) \
$(JITSI_SERVICE)
endif
$(addprefix build_,$(JITSI_SERVICES)):

Loading…
Cancel
Save