adding windocker stuff from bsys6 on this branch

This commit is contained in:
Bert van der Weerd 2023-02-05 12:18:46 +01:00
parent 8506c341d2
commit 643e08734d
No known key found for this signature in database
GPG key ID: 73370A0B9E5516B0
4 changed files with 53 additions and 0 deletions

View file

@ -9,6 +9,7 @@ Build Docker Images:
when: manual
only:
- master
- windocker
image: registry.gitlab.com/librewolf-community/browser/bsys5/dind
# Needed because we aren't using our custom runners here
services:
@ -27,6 +28,7 @@ Build Docker Images:
- fedora36
- macos-x86_64
- macos-aarch64
- windows
- dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.gitlab.com
@ -49,6 +51,7 @@ Build:
- fedora36
- macos-x86_64
- macos-aarch64
- windows
image: registry.gitlab.com/librewolf-community/browser/bsys5/dind
tags:
- autoscale
@ -68,6 +71,10 @@ Build:
- librewolf-*.rpm.sha256sum
- librewolf-*.dmg
- librewolf-*.dmg.sha256sum
- librewolf-*-setup.exe
- librewolf-*-setup.exe.sha256sum
- librewolf-*-portable.zip
- librewolf-*-portable.zip.sha256sum
reports:
dotenv: variables.env

View file

@ -19,6 +19,7 @@ help :
@echo " [docker-macos-x86_64], [docker-macos-aarch64]"
@echo " [docker-tumbleweed]"
@echo " [docker-dind]"
@echo " [docker-windows]"
@echo ""
@echo "build targets:"
@echo " [debian11], [mint20], [mint21], [ubuntu20], [ubuntu21]"
@ -26,6 +27,7 @@ help :
@echo " [fedora37], [fedora36]"
@echo " [macos-x64_64], [macos-aarch64]"
@echo " [tumbleweed]"
@echo " [windows]"
@echo " [tarball]"
@echo ""
@ -70,6 +72,8 @@ build :
${MAKE} clean
${MAKE} macos-aarch64
${MAKE} clean
${MAKE} windows
${MAKE} clean
push :
docker push registry.gitlab.com/librewolf-community/browser/bsys5/debian11
@ -210,6 +214,11 @@ docker-macos-aarch64 :
macos-aarch64 :
${MAKE} -f assets/macos.mk arch=aarch64 build
## windows
docker-windows :
${MAKE} -f assets/windows.mk docker
windows :
${MAKE} -f assets/windows.mk build
#
# Docker in Docker (for GitLab CI)

10
assets/windows.Dockerfile Normal file
View file

@ -0,0 +1,10 @@
FROM ubuntu:latest
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install bash git wget build-essential zip
WORKDIR /root
RUN git clone https://gitlab.com/librewolf-community/browser/windows.git
WORKDIR /root/windows/linux
RUN make setup-debian
RUN make fetch
RUN make bootstrap

27
assets/windows.mk Normal file
View file

@ -0,0 +1,27 @@
# windows.mk - build windows docker image and do build phase
.PHONY : docker build
version:=$(shell cat version)
release:=$(shell cat release)
source_release:=$(shell cat source_release)
full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)")
outfile-exe=librewolf-$(full_version).en-US.win64-setup.exe
outfile-zip=librewolf-$(full_version).en-US.win64-portable.zip
outfiles=$(outfile-exe) $(outfile-zip)
distro=windows
image=registry.gitlab.com/librewolf-community/browser/bsys5/$(distro):latest
docker :
docker build -t $(image) - < assets/windows.Dockerfile
build :
pwd
make all
cp -v $(outfiles) /
( cd / && sha256sum $(outfile-exe) > $(outfile-exe).sha256sum )
cat /$(outfile-exe).sha256sum
( cd / && sha256sum $(outfile-zip) > $(outfile-zip).sha256sum )
cat /$(outfile-zip).sha256sum