From 3f9e9a82dcd89d34e2270b7d3cf02e615b836bb5 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 19:59:30 +0100 Subject: [PATCH] Attempt at building multi-platform builder --- .woodpecker/.build.yml | 1 + .woodpecker/.builder.yml | 6 ++++-- .woodpecker/.lint.yml | 1 + .woodpecker/.publish.yml | 1 + Dockerfile.builder | 22 +++++++++++----------- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml index cc66bc7..12610e4 100644 --- a/.woodpecker/.build.yml +++ b/.woodpecker/.build.yml @@ -1,6 +1,7 @@ # These checks already get performed on the feature branches branches: exclude: [ main, dev ] +platform: linux/amd64 pipeline: vieter: diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml index ec4a36e..8a1329a 100644 --- a/.woodpecker/.builder.yml +++ b/.woodpecker/.builder.yml @@ -1,13 +1,15 @@ -branches: dev +# branches: dev +platform: linux/amd64 pipeline: publish: - image: plugins/docker + image: woodpeckerci/plugin-docker-buildx secrets: [ docker_username, docker_password ] settings: repo: chewingbever/vlang tag: latest dockerfile: Dockerfile.builder + platforms: [ linux/arm/v7, linux/arm64/v8, linux/amd64 ] when: event: push path: Dockerfile.builder diff --git a/.woodpecker/.lint.yml b/.woodpecker/.lint.yml index ae47c32..380b3d4 100644 --- a/.woodpecker/.lint.yml +++ b/.woodpecker/.lint.yml @@ -1,6 +1,7 @@ # These checks already get performed on the feature branches branches: exclude: [ main, dev ] +platform: linux/amd64 pipeline: lint: diff --git a/.woodpecker/.publish.yml b/.woodpecker/.publish.yml index 34a3675..fa958ca 100644 --- a/.woodpecker/.publish.yml +++ b/.woodpecker/.publish.yml @@ -1,4 +1,5 @@ branches: [main, dev] +platform: linux/amd64 pipeline: dev: diff --git a/Dockerfile.builder b/Dockerfile.builder index d45fe83..4691c8e 100644 --- a/Dockerfile.builder +++ b/Dockerfile.builder @@ -8,17 +8,17 @@ ENV VVV /opt/vlang ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV VFLAGS -cc gcc -RUN mkdir -p /opt/vlang && ln -s /opt/vlang/v /usr/bin/v - -RUN apk --no-cache add \ - git make upx gcc bash \ - musl-dev \ - openssl-libs-static openssl-dev \ - zlib-static bzip2-static xz-dev expat-static zstd-static lz4-static \ - sqlite-static sqlite-dev \ - libx11-dev glfw-dev freetype-dev \ - libarchive-static libarchive-dev \ - diffutils +RUN mkdir -p /opt/vlang && \ + ln -s /opt/vlang/v /usr/bin/v && \ + apk --no-cache add \ + git make upx gcc bash \ + musl-dev \ + openssl-libs-static openssl-dev \ + zlib-static bzip2-static xz-dev expat-static zstd-static lz4-static \ + sqlite-static sqlite-dev \ + libx11-dev glfw-dev freetype-dev \ + libarchive-static libarchive-dev \ + diffutils COPY . /vlang-local