Merge pull request 'lib: source build replace the matching release' (#239) from earl-warren/end-to-end:wip-optimize into main

Reviewed-on: https://code.forgejo.org///forgejo/end-to-end/pulls/239
This commit is contained in:
earl-warren 2024-08-08 16:09:23 +00:00
commit 5ad828b7a2
18 changed files with 24 additions and 33 deletions

View file

@ -31,8 +31,15 @@ jobs:
go-version: "1.22"
- name: lib/build.sh
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
#
@ -41,13 +48,12 @@ jobs:
apt-get -q install -y -qq build-essential
d=/tmp/forgejo-binaries
mkdir $d /tmp/forgejo-upload
for version in $(ls forgejo/sources) ; do
forgejo=$d/forgejo-$version-dev
for version in $(cat forgejo/build-from-sources) ; do
lib/build.sh $version $d
forgejo=$d/forgejo-$version-dev
$forgejo --version
mv $forgejo /tmp/forgejo-upload
mv $forgejo /tmp/forgejo-upload/forgejo-$version
done
- uses: actions/upload-artifact@v3
with:

View file

@ -88,7 +88,7 @@ function actions_runner_version() {
}
function test_actions() {
local versions="${1:-$RELEASE_NUMBERS_AND_DEV}"
local versions="${1:-$RELEASE_NUMBERS}"
for version in $versions; do

View file

@ -69,7 +69,7 @@ function test_federation() {
# start_gitlab octobus/heptapod:1.5.3
federation_setup_variables
local versions="${1:-$RELEASE_NUMBERS_AND_DEV}"
local versions="${1:-$RELEASE_NUMBERS}"
for version in $versions; do

View file

@ -35,7 +35,6 @@ export DOT_FORGEJO_CURL=$DIR/forgejo-curl
export DOT=$DOT_FORGEJO_CURL # for backward compatibility with forgejo-curl.sh 1.0.0
: ${FORGEJO_USER:=root}
: ${FORGEJO_PASSWORD:=admin1234}
: ${RELEASE_NUMBERS_AND_DEV:="$(for r in $RELEASE_NUMBERS; do echo -n "$r $r-dev "; done)"}
ORGANIZATIONS=$(cat $LIB_DIR/ORGANIZATIONS)
function log_info() {
@ -71,18 +70,6 @@ function dependencies() {
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() {
rm -f $DIR/wait-for.out
success=false

View file

@ -1 +0,0 @@
alpine-7.0-test

1
packages/alpine-9.0 Symbolic link
View file

@ -0,0 +1 @@
alpine-7.0

View file

@ -1 +0,0 @@
alpine-7.0-test

View file

@ -17,7 +17,7 @@ function test_packages_alpine_version() {
function test_packages_alpine() {
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
done
done

View file

@ -31,7 +31,7 @@ function test_storage_stable_s3() {
local work_path=$DIR/forgejo-work-path
local s3_backend=${1:-minio}
for version in $RELEASE_NUMBERS_AND_DEV; do
for version in $RELEASE_NUMBERS; do
log_info "Forgejo $version & $s3_backend"
stop
storage_reset stable-s3

View file

@ -28,13 +28,13 @@ function test_forgejo_pprof() {
docker run --name test_pyroscope --rm -d -p 4040:4040 docker.io/grafana/pyroscope
reset_forgejo $UPGRADE_DIR/default-app.ini
log_info "run 7.0-dev"
start 7.0-dev
log_info "run 7.0"
start 7.0
test_upload_profiles
stop
log_info "run 9.0-dev"
start 9.0-dev
log_info "run 9.0"
start 9.0
test_upload_profiles
stop

View file

@ -38,7 +38,7 @@ function test_successful_upgrades() {
fixture_assert
doctor_run $config
for version in $RELEASE_NUMBERS_AND_DEV; do
for version in $RELEASE_NUMBERS; do
stop
log_info "run $version"
start $version
@ -52,9 +52,9 @@ function test_successful_upgrades() {
function test_gitea_upgrades() {
local config=$UPGRADE_DIR/default-app.ini
(
echo gitea 1.21 forgejo 7.0-dev
echo gitea 1.21 forgejo 9.0-dev
echo gitea 1.22 forgejo 9.0-dev
echo gitea 1.21 forgejo 7.0
echo gitea 1.21 forgejo 9.0
echo gitea 1.22 forgejo 9.0
) | while read gitea gitea_version forgejo forgejo_version; do
log_info "upgrading from Gitea $gitea_version to Forgejo $forgejo_version"
stop
@ -81,7 +81,6 @@ source $UPGRADE_DIR/test-pprof-upload.sh
function test_upgrades() {
run dependencies
run build_all
run test_successful_upgrades
run test_forgejo_pprof