0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-21 21:23:08 -05:00

first commit

This commit is contained in:
Bert van der Weerd 2023-11-04 11:34:24 +01:00
parent 71d46d3154
commit 5f12539b24
No known key found for this signature in database
GPG key ID: 73370A0B9E5516B0
3 changed files with 72 additions and 2 deletions

View file

@ -1,4 +1,5 @@
stages:
- test
- build
- release
@ -23,6 +24,20 @@ Build:
reports:
dotenv: variables.env
Test:
stage: test
when: manual
allow_failure: false
image: debian
tags:
- autoscale
script:
- make check-patchfail
- make test
artifacts:
paths:
- librewolf-*.tar.bz2
Release:
stage: release
when: manual

View file

@ -1,6 +1,7 @@
docker_targets=docker-build-image docker-run-build-job docker-remove-image
woodpecker_targets=fetch-upstream-woodpecker check-patchfail-woodpecker
.PHONY : help check all clean veryclean dir bootstrap fetch build package run update setup-wasi check-patchfail check-fuzz fixfuzz $(docker_targets) $(woodpecker_targets)
testing_targets=full-test test
.PHONY : help check all clean veryclean dir bootstrap fetch build package run update setup-wasi check-patchfail check-fuzz fixfuzz $(docker_targets) $(woodpecker_targets) $(testing_targets)
version:=$(shell cat ./version)
release:=$(shell cat ./release)
@ -63,7 +64,7 @@ all : $(lw_source_tarball)
clean :
rm -rf *~ public_key.asc $(ff_source_dir) $(lw_source_dir) $(lw_source_tarball) $(lw_source_tarball).sha256sum $(lw_source_tarball).sha512sum firefox-$(version) patchfail.out patchfail-fuzz.out
rm -rf *~ public_key.asc $(ff_source_dir) $(lw_source_dir) $(lw_source_tarball) $(lw_source_tarball).sha256sum $(lw_source_tarball).sha512sum firefox-$(version) patchfail.out patchfail-fuzz.out bsys6
veryclean : clean
rm -f $(ff_source_tarball) $(ff_source_tarball).asc
@ -183,3 +184,14 @@ check-patchfail-woodpecker :
cat patchfail.out ; rm -f patchfail.out ; exit $$exit_code )
fetch-upstream-woodpecker : fetch
#
# testing_targets=full-test test
#
test : full-test
# full-test: produce the bz2 artifact using bsys6 from scratch
full-test : $(lw_source_tarball)
${MAKE} -f assets/testing.mk bsys6_x86_64_linux_bz2_artifact

43
assets/testing.mk Normal file
View file

@ -0,0 +1,43 @@
.PHONY : bsys6_x86_64_linux_bz2_artifact full_build_stage2
#
# This makefile just uses bsys6 to build the package
#
# we implicitly fully test that his source builds
# with the latest version of bsys6.
#
# so we also know that our docker images builds
# will succeed if this test succeeds.
#
bsys6_x86_64_linux_bz2_artifact :
rm -rf bsys6
git clone "https://codeberg.org/librewolf/bsys6.git"
(cd bsys6 && ${MAKE} -f ../assets/testing.mk full_build_stage2)
cp -v bsys6/*.bz2 .
rm -rf bsys6
full_build_stage2:
echo "[debug] Starting full_build_stage2"
echo "VERSION=$$(cat ../version)-$$(cat ../release)" > env.sh
echo "WORKDIR=$$(pwd)/WORKDIR" >> env.sh
echo "TARGET=linux" >> env.sh
echo "ARCH=x86_64" >> env.sh
echo "SOURCEDIR=$$(pwd)/SOURCEDIR/librewolf-$$(cat ../version)-$$(cat ../release)" >> env.sh
cat env.sh
mkdir WORKDIR
mkdir SOURCEDIR
(cd SOURCEDIR && tar xf ../../librewolf*.tar.gz)
ARCH=x86_64 ./bsys6 prepare
ARCH=x86_64 ./bsys6 package
@echo "[debug] Done full_build_stage2"