lib: source build replace the matching release
Instead of having an explicit vX.Y-dev version to be referenced explicitly, a binary built from source replaces the matching version. For instance, if forgejo/build-from-sources contains v9.0, * the development branch is compiled from source * the v9.0 artifact is uploaded * prior to running any test, the artificat is downloaded and used * the v9.0 binary is not downloaded from forgejo/experimental/integration because it is already present The vX.Y release is built daily and the end-to-end tests run on it. If a regression is introduced, it will be spotted within 24h. Compiling from source is used when the Forgejo runs the end-to-end suite on a specific pull request.
This commit is contained in:
parent
427c46dbf9
commit
149c6a545c
5 changed files with 19 additions and 26 deletions
|
@ -31,8 +31,15 @@ jobs:
|
||||||
go-version: "1.22"
|
go-version: "1.22"
|
||||||
- name: lib/build.sh
|
- name: lib/build.sh
|
||||||
run: |
|
run: |
|
||||||
set -x
|
mkdir $d /tmp/forgejo-upload
|
||||||
|
touch /tmp/forgejo-upload/PLACEHOLDER
|
||||||
|
|
||||||
|
if ! test -f forgejo/build-from-sources; then
|
||||||
|
echo forgejo/build-from-sources is not present, do not build any version from source
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
#
|
#
|
||||||
# SQLite needs gcc to be compiled
|
# SQLite needs gcc to be compiled
|
||||||
#
|
#
|
||||||
|
@ -41,13 +48,12 @@ jobs:
|
||||||
apt-get -q install -y -qq build-essential
|
apt-get -q install -y -qq build-essential
|
||||||
|
|
||||||
d=/tmp/forgejo-binaries
|
d=/tmp/forgejo-binaries
|
||||||
mkdir $d /tmp/forgejo-upload
|
|
||||||
|
|
||||||
for version in $(ls forgejo/sources) ; do
|
for version in $(cat forgejo/build-from-sources) ; do
|
||||||
forgejo=$d/forgejo-$version-dev
|
|
||||||
lib/build.sh $version $d
|
lib/build.sh $version $d
|
||||||
|
forgejo=$d/forgejo-$version-dev
|
||||||
$forgejo --version
|
$forgejo --version
|
||||||
mv $forgejo /tmp/forgejo-upload
|
mv $forgejo /tmp/forgejo-upload/forgejo-$version
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|
12
lib/lib.sh
12
lib/lib.sh
|
@ -70,18 +70,6 @@ function dependencies() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_all() {
|
|
||||||
for dev in $RELEASE_NUMBERS; do
|
|
||||||
local forgejo=$DIR_BINARIES/forgejo-$dev-dev
|
|
||||||
if test -f $forgejo; then
|
|
||||||
log_info $dev already exists
|
|
||||||
else
|
|
||||||
$LIB_DIR/build.sh $dev $DIR_BINARIES
|
|
||||||
log_info $dev built from sources
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function retry() {
|
function retry() {
|
||||||
rm -f $DIR/wait-for.out
|
rm -f $DIR/wait-for.out
|
||||||
success=false
|
success=false
|
||||||
|
|
|
@ -17,7 +17,7 @@ function test_packages_alpine_version() {
|
||||||
|
|
||||||
function test_packages_alpine() {
|
function test_packages_alpine() {
|
||||||
for alpine_version in 3.19 3.20; do
|
for alpine_version in 3.19 3.20; do
|
||||||
for forgejo_version in 7.0-dev 9.0-dev; do
|
for forgejo_version in 7.0 9.0; do
|
||||||
test_packages_alpine_version $alpine_version $forgejo_version
|
test_packages_alpine_version $alpine_version $forgejo_version
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
|
@ -28,13 +28,13 @@ function test_forgejo_pprof() {
|
||||||
docker run --name test_pyroscope --rm -d -p 4040:4040 docker.io/grafana/pyroscope
|
docker run --name test_pyroscope --rm -d -p 4040:4040 docker.io/grafana/pyroscope
|
||||||
|
|
||||||
reset_forgejo $UPGRADE_DIR/default-app.ini
|
reset_forgejo $UPGRADE_DIR/default-app.ini
|
||||||
log_info "run 7.0-dev"
|
log_info "run 7.0"
|
||||||
start 7.0-dev
|
start 7.0
|
||||||
test_upload_profiles
|
test_upload_profiles
|
||||||
stop
|
stop
|
||||||
|
|
||||||
log_info "run 9.0-dev"
|
log_info "run 9.0"
|
||||||
start 9.0-dev
|
start 9.0
|
||||||
test_upload_profiles
|
test_upload_profiles
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,9 @@ function test_successful_upgrades() {
|
||||||
function test_gitea_upgrades() {
|
function test_gitea_upgrades() {
|
||||||
local config=$UPGRADE_DIR/default-app.ini
|
local config=$UPGRADE_DIR/default-app.ini
|
||||||
(
|
(
|
||||||
echo gitea 1.21 forgejo 7.0-dev
|
echo gitea 1.21 forgejo 7.0
|
||||||
echo gitea 1.21 forgejo 9.0-dev
|
echo gitea 1.21 forgejo 9.0
|
||||||
echo gitea 1.22 forgejo 9.0-dev
|
echo gitea 1.22 forgejo 9.0
|
||||||
) | while read gitea gitea_version forgejo forgejo_version; do
|
) | while read gitea gitea_version forgejo forgejo_version; do
|
||||||
log_info "upgrading from Gitea $gitea_version to Forgejo $forgejo_version"
|
log_info "upgrading from Gitea $gitea_version to Forgejo $forgejo_version"
|
||||||
stop
|
stop
|
||||||
|
@ -81,7 +81,6 @@ source $UPGRADE_DIR/test-pprof-upload.sh
|
||||||
|
|
||||||
function test_upgrades() {
|
function test_upgrades() {
|
||||||
run dependencies
|
run dependencies
|
||||||
run build_all
|
|
||||||
|
|
||||||
run test_successful_upgrades
|
run test_successful_upgrades
|
||||||
run test_forgejo_pprof
|
run test_forgejo_pprof
|
||||||
|
|
Loading…
Add table
Reference in a new issue