lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
October 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
1 participants
25 discussions
Start a n
N
ew thread
[geany/infrastructure] 3859e2: Add nightly and CI build scripts to create Windows installers
by Enrico Tröger
29 Oct '22
29 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sat, 29 Oct 2022 14:55:04 UTC Commit: 3859e2cba6b3308ec89249ec127f69e4485ce5dd
https://github.com/geany/infrastructure/commit/3859e2cba6b3308ec89249ec127f…
Log Message: ----------- Add nightly and CI build scripts to create Windows installers The scripts, mainly start_build.sh, can be used for nightly builds and for CI builds. The Windows scripts use a Docker image containing a full cross compilation environment for mingw64-x86_64. They create fully working installer files for Geany and Geany-Plugins, optionally even signed if a certificate is provided. The Debian build scripts are yet to be tested and finalized. Modified Paths: -------------- .github/workflows/docker.yml README.md builders/.dockerignore builders/Dockerfile.mingw64 builders/README.md builders/certificates/.gitkeep builders/mingw64/bin/mingw-w64-i686-wine builders/mingw64/bin/mingw-w64-x86_64-wine builders/mingw64/etc/pacman.conf builders/mingw64/etc/pacman.d/mirrorlist.mingw64 builders/mingw64/etc/pacman.d/mirrorlist.msys builders/output/.gitkeep builders/start_build.sh Modified: .github/workflows/docker.yml 49 lines changed, 49 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,49 @@ +# +# Copyright: 2022, The Geany contributors +# License: GNU GPL v2 or later + +name: Build CI Docker Images + +on: + push: + branches: + - master + workflow_dispatch: + schedule: + # Run weekly on Friday + - cron: '34 5 * * FRI' + +# cancel already running builds of the same branch or pull request +concurrency: + group: ci-${{ github.head_ref }} || concat(${{ github.ref }} + cancel-in-progress: true + +jobs: + mingw64: + name: Build Docker image for mingw664 CI builds + runs-on: ubuntu-22.04 + permissions: + packages: write + + env: + DOCKER_REGISTRY: "ghcr.io" + DOCKER_IMAGE_NAME: "geany-mingw64-ci" + DOCKER_IMAGE_TAG: "ghcr.io/geany/geany-mingw64-ci:latest" + + steps: + - name: Checkout Build Scripts + uses: actions/checkout@v3 + + - name: Log In To The Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build And Push Docker Image + run: | + cd builders + bash start_build.sh --log-to-stdout --mingw64 --rebuild-images + docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_TAG }} + docker push ${{ env.DOCKER_IMAGE_TAG }} Modified: README.md 12 lines changed, 11 insertions(+), 1 deletions(-) =================================================================== @@ -50,7 +50,17 @@ If you want to add or remove a repository maintained by these scripts, follow th * Open
http://git.geany.org/
in your browser and check whether the new repository is visible and has files. + +CI / Nightly-Builders +===================== + +The `builders` directory contains Dockerfiles and scripts to create Debian packages +as well as a cross-compiled Windows installer for Geany and Geany-Plugins. +These scripts are used for the nightly builds, for details see +[builders/README.md](builders/README.md). + + License -=============== +======= Unless stated otherwise all code in this repository is licensed of under the terms of the GNU General Public License version 2 (see COPYING in this repository). Modified: builders/.dockerignore 5 lines changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,5 @@ +/.git +/certificates +/output +/scripts +/start_build.sh Modified: builders/Dockerfile.mingw64 119 lines changed, 119 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,119 @@ +# +# Copyright 2022 The Geany contributors +# License: GPLv2 +# +# Docker image for Geany and Geany-Plugins cross-build to Windows +# The image contains a self-compiled Pacman to install mingw-w64 +# packages and all other dependencies necessary to build the code +# and create a ready-use installer. +# For more details, see build_mingw64_geany.sh where this image is used. +# +# Intermediate container for building pacman +FROM debian:bullseye as build-pacman + +ENV PACMAN_VERSION=6.0.1 +ENV PACMAN_SHA256="0db61456e56aa49e260e891c0b025be210319e62b15521f29d3e93b00d3bf731" +ENV MSYS2_KEYRING_PKG="msys2-keyring-1~20220623-1-any.pkg.tar.zst" +ENV MSYS2_KEYRING_PKG_SHA256="3508c7fca2f8b9722139666459eb8716f2413fd6daaf997abf0df41d7f285dc9" + +RUN set -ex && \ + apt-get update && \ + apt-get install --no-install-recommends --assume-yes \ + build-essential meson wget xz-utils zstd gnupg2 file zstd ca-certificates \ + pkg-config m4 libarchive-dev libssl-dev libcurl4-gnutls-dev libgpgme-dev \ + python3-setuptools + +# compile Pacman +RUN set -ex && \ + wget --no-verbose
https://sources.archlinux.org/other/pacman/pacman-${PACMAN_VERSION}.tar.xz
&& \ + echo "${PACMAN_SHA256} *pacman-${PACMAN_VERSION}.tar.xz" | sha256sum --check --strict - && \ + tar xf pacman-${PACMAN_VERSION}.tar.xz && \ + cd /pacman-${PACMAN_VERSION} && \ + meson \ + --prefix /usr/local \ + --sysconfdir=/windows/etc \ + --localstatedir=/windows/var \ + --buildtype release \ + --strip \ + -Dscriptlet-shell='/bin/bash' \ + -Ddoc='disabled' \ + -Ddoxygen='disabled' \ + -Ddoc='disabled' \ + -Di18n=false \ + build && \ + ninja -C build && \ + ninja -C build install && \ + ldconfig + +COPY mingw64/etc/ /windows/etc/ + +# setup pacman-key +RUN set -ex && \ + # download MSYS2 keyring + mkdir -p /usr/local/share/pacman/keyrings/ && \ + wget --no-verbose "
https://repo.msys2.org/msys/x86_64/${MSYS2_KEYRING_PKG}
" && \ + echo "${MSYS2_KEYRING_PKG_SHA256} *${MSYS2_KEYRING_PKG}" | sha256sum --check --strict - && \ + tar -x -C /usr/local/share/pacman/keyrings/ -f "${MSYS2_KEYRING_PKG}" --strip-components 4 usr && \ + # initialize keyring + pacman-key --init && \ + pacman-key --populate msys2 + + +# Main image +FROM debian:bullseye + +LABEL org.opencontainers.image.title="Geany-Mingw-w64-CI" +LABEL org.opencontainers.image.description="Build image for Geany CI to support automatic building of Windows installers." +LABEL org.opencontainers.image.url="
https://github.com/geany/infrastructure
" +LABEL org.opencontainers.image.source="
https://github.com/geany/infrastructure
" +LABEL org.opencontainers.image.authors="The Geany contributors" +LABEL org.opencontainers.image.licenses="GPL-2.0" + +# install native tools and libraries +RUN set -ex && \ + dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get install --no-install-recommends --assume-yes \ + # libraries \ + libcurl3-gnutls libgpgme11 libarchive13 libssl1.1 \ + # common useful utilities \ + wget curl less nano git gnupg2 file ca-certificates dos2unix \ + zip unzip xz-utils zstd \ + # build tools \ + build-essential automake autoconf autopoint gettext libtool check cppcheck \ + # genay-plugins autogen.sh requirements + intltool libglib2.0-dev \ + # mingw-w64 \ + gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-x86-64-dev mingw-w64-tools \ + # install wine to test installer and created binaries + wine wine32 wine64 \ + # install NSIS and exiftool to inspect binary metadata + nsis libimage-exiftool-perl osslsigncode \ + # Geany build dependencies \ + python3-lxml python3-docutils + + +# copy pacman and scripts +COPY --from=build-pacman /windows /windows +COPY --from=build-pacman /usr/local /usr/local +COPY mingw64/bin/ /usr/local/bin/ +RUN mkdir /build + +WORKDIR /build + +# start wine to initially create config directory +RUN /usr/local/bin/mingw-w64-i686-wine hostname.exe && \ + /usr/local/bin/mingw-w64-x86_64-wine hostname.exe && \ + # install GTK3 and all its dependencies + ldconfig && \ + pacman --noconfirm -Sy mingw-w64-x86_64-gtk3 && \ + # cleanup + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + yes | pacman -Scc && \ + rm -r /usr/share/doc \ + /usr/share/locale \ + /usr/share/man \ + /windows/mingw64/share/icons \ + /windows/mingw64/share/locale \ + /windows/mingw64/share/doc Modified: builders/README.md 102 lines changed, 102 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,102 @@ +CI / Nightly-Builders +===================== + +## About + +Scripts and Dockerfiles for Geany and Geany-Plugins nightly builds. +`start_build.sh` will create (if missing) a Docker image for +Mingw-w64 cross-compilaton to Windows. + +## Scripts and files + + ├── Dockerfile.mingw64 -> Dockerfile for Mingw-64 build image + ├── README.md + ├── certificates -> Certificate for signing Windows binaries and installer + │ ├── cert.pem -> Certificate public key (the filename is important) + │ └── key.pem -> Certificate secret key (the filename is important) + │ + ├── mingw64 -> Helpers and configuration for Pacman and Windows builds + │ ├── bin (these files will be built into the Windows Docker image) + │ │ ├── mingw-w64-i686-wine + │ │ └── mingw-w64-x86_64-wine + │ └── etc + │ ├── pacman.conf + │ └── pacman.d + │ └── mirrorlist.mingw64 + ├── output -> Directory where all build results are stored + │ + └── start_build.sh -> Run Windows build containers and start builds + +## Geany sources + +All of the scripts can either use an existing source distribution +of Geany (and Geany-Plugins) if it is mounted into the build Docker +container (as `/geany-source` resp. `/geany-plugins-source`). +If no existing source distribution is found, the scripts will clone +Geany resp. Geany-Plugins from GIT master. + +## start_build.sh + +Main entry point to (re-)build the necessary Docker images and trigger +the builds of Geany and Geany-Plugins for the various targets. + + usage: start_build.sh [-m|--mingw64] [-r|--rebuild-images] + -f, --force-rebuild Force rebuilding of immages even if not necessary + -g, --geany Build Geany + --geany-script Path to the script to be executed to build Geany + --geany-source Path to a Geany source directory (optional, cloned from GIT if missing) + --geany-plugins-script Path to the script to be executed to build Geany-Plugins + --geany-plugins-source Path to a Geany-Plugins source directory (optional, cloned from GIT if missing) + -h Show this help screen + -l, --log-to-stdout Log build output additionally to stdout + -m, --mingw64 Build for target Mingw-w64 + -p, --geany-plugins Build Geany-Plugins + -r, --rebuild-images Rebuild Docker images before start building + (images are rebuilt automatically every 30 days) + -s, --sudo Use "sudo" for Docker commands + + +Example to build Geany and Geany-Plugins for Windows: + + bash start_build.sh --geany --geany-plugins --mingw64 + +## Windows (Mingw64) build + +Geany and Geany-Plugins are built for Windows by cross-compiling them in a Docker container +containing all necessary tools. + +If the build was started via Github Actions from a pull request, the pull request number +will be appended to the resulting installer filename. For all other builds, the used GIT +commit short hash is used. + +The created installer for Geany will contain the +[Geany-Themes](https://github.com/geany/geany-themes) collection as well as the GTK +runtime with all necessary dependencies. + +The created installer for Geany-Plugins will contain all necessary dependencies +for the plugins to work. + +For more details, see the scripts `scripts/ci_mingw64_geany.sh` and `build/ci_mingw64_geany_plugins.sh` +in the Geany resp. Geany-Plugins repository. + +In theory, it is also possible to create release installers with this method. + +### Docker image + +The Docker image for the Windows build is based on a Debian image but has the full toolchain +for cross-compiling to mingw64 included. Additionally, the image contains a self-compiled +Pacman package manager to install packages from the MSYS2 repositories. + +A Github Action workflow is configured in this repository to build and push the image +to the Github Docker image registry as ghcr.io/geany/geany-mingw64-ci:latest. The workflow +is triggered once a week automatically. + +### Code sign certificate + +If the directory `certificates` contains the two files `cert.pem` and `key.pem`, +then they will be used to digitally sign all created binary files (all built +`.exe` and `.dll` files). + +If the directory is empty, code signing will be skipped. + +The certificate should be in the PEM format and the key should not require a passphrase. Modified: builders/certificates/.gitkeep 0 lines changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online Modified: builders/mingw64/bin/mingw-w64-i686-wine 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,4 @@ +#!/bin/sh -e + +WINEPATH="${WINEPATH};/windows/mingw32/bin" wine $@ + Modified: builders/mingw64/bin/mingw-w64-x86_64-wine 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,3 @@ +#!/bin/sh -e + +WINEPATH="${WINEPATH};/windows/mingw64/bin" wine64 $@ Modified: builders/mingw64/etc/pacman.conf 40 lines changed, 40 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,40 @@ + +[options] +RootDir = /windows +DBPath = /windows/var/lib/pacman/ +CacheDir = /windows/var/cache/pacman/pkg/ +LogFile = /windows/var/log/pacman.log +GPGDir = /windows/etc/pacman.d/gnupg/ +HoldPkg = pacman +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +#UseDelta = 0.7 +Architecture = x86_64 + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +#Color +#TotalDownload +CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +#SigLevel = Never +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +[mingw64] +Include = /windows/etc/pacman.d/mirrorlist.mingw64 + +[msys] +Include = /windows/etc/pacman.d/mirrorlist.msys Modified: builders/mingw64/etc/pacman.d/mirrorlist.mingw64 6 lines changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,6 @@ +## +## 64-bit Mingw-w64 repository mirrorlist +## + +Server =
http://repo.msys2.org/mingw/x86_64
+Server =
http://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64
Modified: builders/mingw64/etc/pacman.d/mirrorlist.msys 6 lines changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,6 @@ +## +## MSYS repository mirrorlist +## + +Server =
http://repo.msys2.org/msys/$arch/
+Server =
http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
Modified: builders/output/.gitkeep 0 lines changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online Modified: builders/start_build.sh 231 lines changed, 231 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,231 @@ +#!/bin/bash +# +# Copyright 2022 The Geany contributors +# License: GPLv2 +# +# Run Windows build containers and start builds within. +# The Docker image for the containers are rebuilt automatically +# every 30 days to keep them up to date. +# +# This script has to be run outside of the containers. +# +# usage: start_build.sh [-m|--mingw64] [-r|--rebuild-images] +# -f, --force-rebuild Force rebuilding of immages even if not necessary +# -g, --geany Build Geany +# --geany-source Path to a Geany source directory (optional, cloned from GIT if missing) +# --geany-plugins-source Path to a Geany-Plugins source directory (optional, cloned from GIT if missing) +# -h Show this help screen +# -l, --log-to-stdout Log build output additionally to stdout +# -m, --mingw64 Build for target Mingw-w64 +# -p, --geany-plugins Build Geany-Plugins +# -r, --rebuild-images Rebuild Docker images before start building +# (images are rebuilt automatically every 30 days) +# -s, --sudo Use "sudo" for Docker commands + + +DOCKER_IMAGE_MAX_AGE_DAYS=30 + +BASE_OUTPUT_DIRECTORY="${PWD}/output/" +DOCKER_CMD="docker" +GEANY_BUILD_SCRIPT=/geany-source/scripts/ci_mingw64_geany.sh +GEANY_SOURCE= +GEANY_PLUGINS_BUILD_SCRIPT=/geany-plugins-source/build/ci_mingw64_geany_plugins.sh +GEANY_PLUGINS_SOURCE= + +# stop on errors +set -e +set -o pipefail + + +log() { + log_filename="$1" + shift + if [ "${log_filename}" = "-" ]; then + echo "========== $(date '+%Y-%m-%d %H:%M:%S %Z') $@ ==========" + else + if [ -n "${DO_LOG_TO_STDOUT}" ]; then + $@ 2>&1 | tee "${log_filename}" + else + $@ > "${log_filename}" 2>&1 + fi + fi +} + + +rebuild_image() { + image_name="$1" + dockerfile="$2" + build_args="$3" + # query image created date or use 0 if the image does not exist to trigger a build + image_date=$(${DOCKER_CMD} image inspect --format='{{.Created}}' "${image_name}" 2>/dev/null || echo -n 1970-01-01) + image_date=$(echo "${image_date}" | xargs) # trim leading and trailing whitespace + image_date_seconds=$(date --date="${image_date}" "+%s") + expire_date_seconds=$(date --date="${DOCKER_IMAGE_MAX_AGE_DAYS} days ago" "+%s") + if [ "${image_date_seconds}" -lt "${expire_date_seconds}" ] || [ -n "${DO_FORCE_IMAGE_REBUILD}" ]; then + log - "Building image ${image_name} (last build: ${image_date})" + log "${BASE_OUTPUT_DIRECTORY}/docker_image_build_${image_name}_$(date '+%Y_%m_%d_%H_%M_%S').log" \ + ${DOCKER_CMD} build \ + --no-cache \ + --file "${dockerfile}" \ + --label "org.opencontainers.image.created=$(date --iso-8601=seconds)" \ + --tag "${image_name}" \ + ${build_args} \ + . + fi +} + + +build_mingw64() { + IMAGE_NAME_WINDOWS="geany-mingw64-ci" + MINGW64_OUTPUT_DIRECTORY=${BASE_OUTPUT_DIRECTORY}/mingw64 + LOGFILE_MINGW64_GEANY=${MINGW64_OUTPUT_DIRECTORY}/build_mingw64_geany_$(date '+%Y_%m_%d_%H_%M_%S').log + LOGFILE_MINGW64_GEANY_PLUGINS=${MINGW64_OUTPUT_DIRECTORY}/build_mingw64_geany_plugins_$(date '+%Y_%m_%d_%H_%M_%S').log + mkdir -p "${MINGW64_OUTPUT_DIRECTORY}" + + # (re)build Docker image + rebuild_image ${IMAGE_NAME_WINDOWS} Dockerfile.mingw64 + + # Build Geany + if [ -n "${DO_GEANY}" ]; then + log - "Building Geany for Windows" + if [ -n "${GEANY_SOURCE}" ]; then + source_volume="--volume ${GEANY_SOURCE}:/geany-source/:ro" + else + source_volume= + fi + log "${LOGFILE_MINGW64_GEANY}" \ + ${DOCKER_CMD} run \ + --rm \ + --env=GITHUB_PULL_REQUEST="${GITHUB_PULL_REQUEST}" \ + --env=CI="${CI}" \ + ${source_volume} \ + --volume "${PWD}/scripts:/scripts/" \ + --volume "${PWD}/certificates/:/certificates/" \ + --volume "${MINGW64_OUTPUT_DIRECTORY}:/output/" \ + "${IMAGE_NAME_WINDOWS}:latest" \ + bash ${GEANY_BUILD_SCRIPT} + fi + + # Build Geany-Plugins + if [ -n "${DO_GEANY_PLUGINS}" ]; then + log - "Building Geany-Plugins for Windows" + if [ -n "${GEANY_PLUGINS_SOURCE}" ]; then + source_volume="--volume ${GEANY_PLUGINS_SOURCE}:/geany-plugins-source/:ro" + else + source_volume= + fi + log "${LOGFILE_MINGW64_GEANY_PLUGINS}" \ + ${DOCKER_CMD} run \ + --rm \ + --env=GITHUB_PULL_REQUEST="${GITHUB_PULL_REQUEST}" \ + --env=CI="${CI}" \ + ${source_volume} \ + --volume "${PWD}/scripts:/scripts/" \ + --volume "${PWD}/certificates/:/certificates/" \ + --volume "${MINGW64_OUTPUT_DIRECTORY}:/output/" \ + "${IMAGE_NAME_WINDOWS}:latest" \ + bash ${GEANY_PLUGINS_BUILD_SCRIPT} + fi +} + + +usage() { + echo "usage: start_build.sh [-m|--mingw64]" + echo " [-r|--rebuild-images]" + echo " -g, --geany Build Geany" + echo "--geany-script Path to the script to be executed to build Geany" + echo "--geany-source Path to a Geany source directory (optional, cloned from GIT if missing)" + echo "--geany-plugins-script Path to the script to be executed to build Geany-Plugins" + echo "--geany-plugins-source Path to a Geany-Plugins source directory (optional, cloned from GIT if missing)" + echo " -h Show this help screen" + echo " -l, --log-to-stdout Log build output additionally to stdout" + echo " -m, --mingw64 Build for target Mingw-w64" + echo " -p, --geany-plugins Build Geany-Plugins" + echo " -r, --rebuild-images Rebuild Docker images before start building" + echo " (images are rebuilt automatically every ${DOCKER_IMAGE_MAX_AGE_DAYS} days)" + echo " -s, --sudo Use \"sudo\" for Docker commands" + exit 1 +} + + +parse_command_line_options() { + if [ $# -eq 0 ]; then + usage + fi + for opt in "$@"; do + case "$opt" in + -f|--force-rebuild) + DO_FORCE_IMAGE_REBUILD=1 + shift + ;; + -g|--geany) + DO_GEANY=1 + shift + ;; + --geany-script) + GEANY_BUILD_SCRIPT="${2}" + shift + shift + ;; + --geany-source) + GEANY_SOURCE="${2}" + shift + shift + ;; + --geany-plugins-script) + GEANY_PLUGINS_BUILD_SCRIPT="${2}" + shift + shift + ;; + --geany-plugins-source) + GEANY_PLUGINS_SOURCE="${2}" + shift + shift + ;; + -l|--log-to-stdout) + DO_LOG_TO_STDOUT=1 + shift + ;; + -m|--mingw64) + DO_MINGW64=1 + shift + ;; + -p|--geany-plugins) + DO_GEANY_PLUGINS=1 + shift + ;; + -r|--rebuild-images) + DO_IMAGE_REBUILD=1 + shift + ;; + -s|--sudo) + DOCKER_CMD="sudo docker" + shift + ;; + -h|--help) + usage + ;; + esac + done +} + + +DO_MINGW64= +DO_IMAGE_REBUILD= +DO_FORCE_IMAGE_REBUILD= +DO_GEANY= +DO_GEANY_PLUGINS= +DO_LOG_TO_STDOUT= +GEANY_SOURCE= +GEANY_PLUGINS_SOURCE= + + +main() { + if [ -n "${DO_MINGW64}" ]; then + build_mingw64 + fi +} + + +parse_command_line_options $@ +main -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] 2d9af0: Enable pipeline on push and schedule
by Enrico Tröger
28 Oct '22
28 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Thu, 27 Oct 2022 22:44:35 UTC Commit: 2d9af0c771bd64254fd62fb368f7f44923d04daa
https://github.com/geany/infrastructure/commit/2d9af0c771bd64254fd62fb368f7…
Log Message: ----------- Enable pipeline on push and schedule Modified Paths: -------------- .github/workflows/docker.yml Modified: .github/workflows/docker.yml 8 lines changed, 5 insertions(+), 3 deletions(-) =================================================================== @@ -6,10 +6,12 @@ name: Build CI Docker Images on: push: + branches: + - master workflow_dispatch: -# schedule: -# # Run weekly on Friday -# - cron: '34 5 * * FRI' + schedule: + # Run weekly on Friday + - cron: '34 5 * * FRI' # cancel already running builds of the same branch or pull request concurrency: -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] 77f945: Use ldconfig to update ldcache
by Enrico Tröger
28 Oct '22
28 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Thu, 27 Oct 2022 22:37:42 UTC Commit: 77f945c0de8a01bc40f44fde3cf26707205de2fc
https://github.com/geany/infrastructure/commit/77f945c0de8a01bc40f44fde3cf2…
Log Message: ----------- Use ldconfig to update ldcache Modified Paths: -------------- builders/Dockerfile.mingw64 Modified: builders/Dockerfile.mingw64 6 lines changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -15,7 +15,6 @@ ENV PACMAN_VERSION=6.0.1 ENV PACMAN_SHA256="0db61456e56aa49e260e891c0b025be210319e62b15521f29d3e93b00d3bf731" ENV MSYS2_KEYRING_PKG="msys2-keyring-1~20220623-1-any.pkg.tar.zst" ENV MSYS2_KEYRING_PKG_SHA256="3508c7fca2f8b9722139666459eb8716f2413fd6daaf997abf0df41d7f285dc9" -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu RUN set -ex && \ apt-get update && \ @@ -43,7 +42,8 @@ RUN set -ex && \ -Di18n=false \ build && \ ninja -C build && \ - ninja -C build install + ninja -C build install && \ + ldconfig COPY mingw64/etc/ /windows/etc/ @@ -100,12 +100,12 @@ COPY mingw64/bin/ /usr/local/bin/ RUN mkdir /build WORKDIR /build -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu # start wine to initially create config directory RUN /usr/local/bin/mingw-w64-i686-wine hostname.exe && \ /usr/local/bin/mingw-w64-x86_64-wine hostname.exe && \ # install GTK3 and all its dependencies + ldconfig && \ pacman --noconfirm -Sy mingw-w64-x86_64-gtk3 && \ # cleanup apt-get clean && \ -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] fa386a: Install pacman into /usr/local
by Enrico Tröger
27 Oct '22
27 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Thu, 27 Oct 2022 12:14:06 UTC Commit: fa386a7474bf8561b6cb3724ec8fe2a4c68271e6
https://github.com/geany/infrastructure/commit/fa386a7474bf8561b6cb3724ec8f…
Log Message: ----------- Install pacman into /usr/local Not that it would make anything better... Modified Paths: -------------- builders/Dockerfile.mingw64 Modified: builders/Dockerfile.mingw64 18 lines changed, 8 insertions(+), 10 deletions(-) =================================================================== @@ -15,7 +15,7 @@ ENV PACMAN_VERSION=6.0.1 ENV PACMAN_SHA256="0db61456e56aa49e260e891c0b025be210319e62b15521f29d3e93b00d3bf731" ENV MSYS2_KEYRING_PKG="msys2-keyring-1~20220623-1-any.pkg.tar.zst" ENV MSYS2_KEYRING_PKG_SHA256="3508c7fca2f8b9722139666459eb8716f2413fd6daaf997abf0df41d7f285dc9" -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pacman/lib/x86_64-linux-gnu +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu RUN set -ex && \ apt-get update && \ @@ -31,7 +31,7 @@ RUN set -ex && \ tar xf pacman-${PACMAN_VERSION}.tar.xz && \ cd /pacman-${PACMAN_VERSION} && \ meson \ - --prefix /usr/local/pacman \ + --prefix /usr/local \ --sysconfdir=/windows/etc \ --localstatedir=/windows/var \ --buildtype release \ @@ -43,18 +43,17 @@ RUN set -ex && \ -Di18n=false \ build && \ ninja -C build && \ - ninja -C build install && \ - ln -s /usr/local/pacman/bin/* /usr/local/bin/ + ninja -C build install COPY mingw64/etc/ /windows/etc/ # setup pacman-key RUN set -ex && \ # download MSYS2 keyring - mkdir -p /usr/local/pacman/share/pacman/keyrings/ && \ + mkdir -p /usr/local/share/pacman/keyrings/ && \ wget --no-verbose "
https://repo.msys2.org/msys/x86_64/${MSYS2_KEYRING_PKG}
" && \ echo "${MSYS2_KEYRING_PKG_SHA256} *${MSYS2_KEYRING_PKG}" | sha256sum --check --strict - && \ - tar -x -C /usr/local/pacman/share/pacman/keyrings/ -f "${MSYS2_KEYRING_PKG}" --strip-components 4 usr && \ + tar -x -C /usr/local/share/pacman/keyrings/ -f "${MSYS2_KEYRING_PKG}" --strip-components 4 usr && \ # initialize keyring pacman-key --init && \ pacman-key --populate msys2 @@ -96,13 +95,12 @@ RUN set -ex && \ # copy pacman and scripts COPY --from=build-pacman /windows /windows -COPY --from=build-pacman /usr/local/pacman /usr/local/pacman +COPY --from=build-pacman /usr/local /usr/local COPY mingw64/bin/ /usr/local/bin/ -RUN ln -s /usr/local/pacman/bin/* /usr/local/bin/ && \ - mkdir /build +RUN mkdir /build WORKDIR /build -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pacman/lib/x86_64-linux-gnu +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu # start wine to initially create config directory RUN /usr/local/bin/mingw-w64-i686-wine hostname.exe && \ -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] 9727d9: Remove Debian parts as these are still in WIP
by Enrico Tröger
27 Oct '22
27 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Thu, 27 Oct 2022 10:13:31 UTC Commit: 9727d956fc284077df99c9aa41560c9e842707b7
https://github.com/geany/infrastructure/commit/9727d956fc284077df99c9aa4156…
Log Message: ----------- Remove Debian parts as these are still in WIP Modified Paths: -------------- builders/Dockerfile.debian builders/README.md builders/scripts/build_debian_geany.sh builders/scripts/build_debian_geany_plugins.sh builders/scripts/update_debian_repositories.sh builders/start_build.sh Modified: builders/Dockerfile.debian 32 lines changed, 0 insertions(+), 32 deletions(-) =================================================================== @@ -1,32 +0,0 @@ -# -# Copyright 2022 The Geany contributors -# License: GPLv2 -# -# Docker image for Geany and Geany-Plugins for building Debian packages. -# - -ARG BASE_IMAGE_NAME=debian:bullseye -FROM $BASE_IMAGE_NAME - -LABEL org.opencontainers.image.title="Geany-Debian-CI" -LABEL org.opencontainers.image.description="Build image for Geany CI to support automatic building of Debian packages." -LABEL org.opencontainers.image.url="
https://github.com/geany/infrastructure
" -LABEL org.opencontainers.image.source="
https://github.com/geany/infrastructure
" -LABEL org.opencontainers.image.authors="The Geany contributors" -LABEL org.opencontainers.image.licenses="GPL-2.0" - -ENV DEBIAN_FRONTEND=noninteractive - -RUN set -ex && \ - apt-get update && \ - apt-get dist-upgrade --assume-yes && \ - apt-get install --assume-yes --no-install-recommends \ - ca-certificates wget gnupg build-essential git \ - devscripts dpkg-dev equivs fakeroot git-buildpackage \ - intltool libdistro-info-perl reprepro \ - # pre-install a few basic dependencies we probably need to reduce build time - libgtk-3-dev python3 python3-docutils python3-lxml \ - # pre-install some geany-plugins dependencies - cppcheck valac libgpgme-dev libctpl-dev liblua5.1-0-dev libmarkdown2-dev \ - # tools not necessary for build but useful for debugging - nano less Modified: builders/README.md 50 lines changed, 6 insertions(+), 44 deletions(-) =================================================================== @@ -4,15 +4,11 @@ CI / Nightly-Builders ## About Scripts and Dockerfiles for Geany and Geany-Plugins nightly builds. -`start_build.sh` will create (if missing) Docker images for -Debian stable and unstable as well as a Docker image for Mingw-w64 -cross-compilaton to Windows. -For the created Debian packages repositories for the distributions -(stable and unstable) will be created. +`start_build.sh` will create (if missing) a Docker image for +Mingw-w64 cross-compilaton to Windows. ## Scripts and files - ├── Dockerfile.debian -> Dockerfile for Debian build image ├── Dockerfile.mingw64 -> Dockerfile for Mingw-64 build image ├── README.md ├── certificates -> Certificate for signing Windows binaries and installer @@ -29,12 +25,7 @@ For the created Debian packages repositories for the distributions │ └── mirrorlist.mingw64 ├── output -> Directory where all build results are stored │ - ├── scripts -> Build scripts to be executed within Docker containers - │ ├── build_debian_geany.sh -> Build Geany Debian packages - │ ├── build_debian_geany_plugins.sh -> Build Geany-Plugins Debian packages - │ └── update_debian_repositories.sh -> Build repositories for Debian packages - │ - └── start_build.sh -> Run Debian and Windows build containers and start builds + └── start_build.sh -> Run Windows build containers and start builds ## Geany sources @@ -49,10 +40,7 @@ Geany resp. Geany-Plugins from GIT master. Main entry point to (re-)build the necessary Docker images and trigger the builds of Geany and Geany-Plugins for the various targets. - usage: start_build.sh [-d|--distro DISTRO] [-m|--mingw64] - [-r|--rebuild-images] - -d, --distro DISTRO Build for target Debian DISTRO (e.g. "bullseye", - can be specified multiple times + usage: start_build.sh [-m|--mingw64] [-r|--rebuild-images] -f, --force-rebuild Force rebuilding of immages even if not necessary -g, --geany Build Geany --geany-script Path to the script to be executed to build Geany @@ -68,35 +56,9 @@ the builds of Geany and Geany-Plugins for the various targets. -s, --sudo Use "sudo" for Docker commands -Example to build Geany and Geany-Plugins for Debian Bullseye, Debian Sid and Windows: - - bash start_build.sh --geany --geany-plugins --mingw64 --distro sid --distro bullseye - -## Debian package build - -The Debian based builds use as much as possible the official Debian package sources -from
https://salsa.debian.org/geany-team/geany.git
(and resp. for Geany-Plugins). - -Within the Debian based Docker images, packages are built from a GIT clone of Geany (unless -a source tree is provided into the container via a volume). - -### Docker image - -The Debian based Docker image is pretty straight-forward and just extends the official -"debian:$distro" images. The base image can be passed as build argument on image building and -so images for different Debian distributions (stable, sid, ...) can be built for later use. - -The Dockerfile just installs a couple of development tools and libraries which are required for -building Geany and Geany-Plugins. This is mainly to prepopulate the image with commonly used -tools and libraries. - -### Repository creation - -TBW - WIP - -#### GnuPG key +Example to build Geany and Geany-Plugins for Windows: -TBW - WIP + bash start_build.sh --geany --geany-plugins --mingw64 ## Windows (Mingw64) build Modified: builders/scripts/build_debian_geany.sh 182 lines changed, 0 insertions(+), 182 deletions(-) =================================================================== @@ -1,182 +0,0 @@ -#!/bin/bash -# -# Copyright 2022 The Geany contributors -# License: GPLv2 -# -# Helper script to build Debian packages for Geany. -# -# This script has to be executed within the Docker container. -# The Docker container should have a bind-mount for ${OUTPUT_DIRECTORY} -# where the resulting packages is stored. -# -# This script is meant to be run in a Docker container. -# - - -GEANY_VERSION= # will be set below from configure.ac -GEANY_GIT_REVISION= # will be set below from configure.ac -PACKAGE_VERSION= # will be set below -OUTPUT_DIRECTORY="/output" -GEANY_GIT_REPOSITORY="
https://github.com/geany/geany.git
" -GEANY_DEBIAN_REPOSITORY="
https://salsa.debian.org/geany-team/geany.git
" - -# rather static values, unlikely to be changed -GEANY_SOURCE_DIR="/geany-source" -GEANY_BUILD_DIR="/tmp/geany-build" -GEANY_DEBIAN_DIR="/tmp/geany-debian" - -# for "dch" (debian changelog) -export DEBEMAIL="devel(a)lists.geany.org" -export DEBFULLNAME="The Geany contributors" - -# stop on errors -set -e - - -log() { - echo "=========== $(date '+%Y-%m-%d %H:%M:%S %Z') $* ===========" -} - - -git_clone_geany_if_necessary() { - log "Clone Geany repository (if necessary)" - mkdir -p "$(dirname ${GEANY_BUILD_DIR})" - if [ -d ${GEANY_SOURCE_DIR} ]; then - log "Copying Geany source" - cp --archive ${GEANY_SOURCE_DIR}/ ${GEANY_BUILD_DIR}/ - else - log "Cloning Geany repository from ${GEANY_GIT_REPOSITORY}" - git clone --depth 1 ${GEANY_GIT_REPOSITORY} ${GEANY_BUILD_DIR} - fi -} - - -parse_geany_version() { - log "Parse Geany version" - GEANY_VERSION=$(sed -n -E -e 's/^AC_INIT\(\[Geany\], \[(.+)\],/\1/p' ${GEANY_BUILD_DIR}/configure.ac) - GEANY_GIT_REVISION=$(cd ${GEANY_BUILD_DIR} && git rev-parse --short --revs-only HEAD 2>/dev/null || true) - PACKAGE_VERSION="${GEANY_VERSION}-1~$(date '+%Y%m%d')git${GEANY_GIT_REVISION}" -} - - -run_autogen_sh() { - log "Run ./autogen.sh" - cd ${GEANY_BUILD_DIR} - # run ./autogen.sh as the Debian package won't run ./autogen.sh for us - NOCONFIGURE=1 ./autogen.sh -} - -create_tarball_for_debuild() { - log "Create source tarball" - cd ${GEANY_BUILD_DIR} - # create a source tarball, keep .git included on purpose for Geany GIT build detection - tar --transform "s,^,geany-${GEANY_VERSION}/,S" \ - --create \ - --gzip \ - --file "../geany_${GEANY_VERSION}.orig.tar.gz" \ - . -} - - -git_clone_debian_geany() { - log "Clone Geany Debian repository" - git clone --depth 1 ${GEANY_DEBIAN_REPOSITORY} ${GEANY_DEBIAN_DIR} - # move debian package files to Geany GIT checkout - mv ${GEANY_DEBIAN_DIR}/debian ${GEANY_BUILD_DIR} -} - - -install_build_dependencies() { - log "Install build dependencies" - cd ${GEANY_BUILD_DIR} - apt-get --assume-yes update - apt-get --assume-yes dist-upgrade - mk-build-deps \ - --install \ - --remove \ - --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --assume-yes" - # mk-build-deps leave the following files which then break 'debuild' later on - rm -f geany-build-deps_*-?_amd64.buildinfo geany-build-deps_*-?_amd64.changes -} - - -add_changelog_entry() { - log "Add ChangeLog entry for Debian package" - cd ${GEANY_BUILD_DIR} - dch \ - --urgency low \ - --distribution unstable \ - --newversion "${PACKAGE_VERSION}" \ - "Autobuilt by CI or nightly build." -} - - -build_package() { - log "Build Debian package" - cd ${GEANY_BUILD_DIR} - - debuild -uc -us -} - - -copy_results() { - log "Copy build artefacts" - - BUILD_DIR_DIRNAME=$(dirname ${GEANY_BUILD_DIR}) - - rm -rf ${OUTPUT_DIRECTORY}/geany/* - - cp --verbose ${BUILD_DIR_DIRNAME}/geany_* ${OUTPUT_DIRECTORY}/geany - cp --verbose ${BUILD_DIR_DIRNAME}/geany-common_* ${OUTPUT_DIRECTORY}/geany - cp --verbose ${BUILD_DIR_DIRNAME}/geany-dbgsym_* ${OUTPUT_DIRECTORY}/geany -} - - -log_and_store_build_environment() { - log "Using environment" - - GTK_VERSION=$(pkg-config --modversion gtk+-3.0) - GLIB_VERSION=$(pkg-config --modversion glib-2.0) - COMPILER_VERSION=$(gcc -dumpfullversion) - - echo "Debian Distribution : $(grep PRETTY_NAME /etc/os-release | cut -d '=' -f 2)" - echo "Geany version : ${GEANY_VERSION}" - echo "Geany GIT revision : ${GEANY_GIT_REVISION}" - echo "GLib version : ${GLIB_VERSION}" - echo "GTK version : ${GTK_VERSION}" - echo "GCC version : ${COMPILER_VERSION}" - - cat <<EOT > ${OUTPUT_DIRECTORY}/geany/versions.json - { - "glib_version": "${GLIB_VERSION}", - "gtk_version": "${GTK_VERSION}", - "gcc_version": "${COMPILER_VERSION}", - } -EOT - - # dump and copy test suite log otherwise it would be lost - cat ${GEANY_BUILD_DIR}/tests/ctags/test-suite.log - cp ${GEANY_BUILD_DIR}/tests/ctags/test-suite.log ${OUTPUT_DIRECTORY}/geany -} - - -main() { - git_clone_geany_if_necessary - parse_geany_version - run_autogen_sh - create_tarball_for_debuild - - git_clone_debian_geany - install_build_dependencies - add_changelog_entry - - build_package - copy_results - - log_and_store_build_environment - - log "Done." -} - - -main Modified: builders/scripts/build_debian_geany_plugins.sh 183 lines changed, 0 insertions(+), 183 deletions(-) =================================================================== @@ -1,183 +0,0 @@ -#!/bin/bash -# -# Copyright 2022 The Geany contributors -# License: GPLv2 -# -# Helper script to build Debian packages for Geany-Plugins. -# -# This script has to be executed within the Docker container. -# The Docker container should have a bind-mount for ${OUTPUT_DIRECTORY} -# where the resulting packages is stored. -# -# This script is meant to be run in a Docker container. -# - - -GEANY_PLUGINS_VERSION= # will be set below from configure.ac -GEANY_PLUGINS_GIT_REVISION= # will be set below from configure.ac -PACKAGE_VERSION= # will be set below -OUTPUT_DIRECTORY="/output" -GEANY_PLUGINS_GIT_REPOSITORY="
https://github.com/geany/geany-plugins.git
" -GEANY_PLUGINS_DEBIAN_REPOSITORY="
https://salsa.debian.org/geany-team/geany-plugins.git
" - -# rather static values, unlikely to be changed -GEANY_PLUGINS_SOURCE_DIR="/geany-plugins-source" -GEANY_PLUGINS_BUILD_DIR="/tmp/geany-plugins-build" -GEANY_PLUGINS_DEBIAN_DIR="/tmp/geany-plugins-debian" - -# for "dch" (debian changelog) -export DEBEMAIL="devel(a)lists.geany.org" -export DEBFULLNAME="The Geany contributors" - -# stop on errors -set -e - - -log() { - echo "=========== $(date '+%Y-%m-%d %H:%M:%S %Z') $* ===========" -} - - -git_clone_geany_if_necessary() { - log "Clone Geany-Plugins repository (if necessary)" - mkdir -p "$(dirname ${GEANY_PLUGINS_BUILD_DIR})" - if [ -d ${GEANY_PLUGINS_SOURCE_DIR} ]; then - log "Copying Geany-Plugins source" - cp --archive ${GEANY_PLUGINS_SOURCE_DIR}/ ${GEANY_PLUGINS_BUILD_DIR}/ - else - log "Cloning Geany-Plugins repository from ${GEANY_PLUGINS_GIT_REPOSITORY}" - git clone --depth 1 ${GEANY_PLUGINS_GIT_REPOSITORY} ${GEANY_PLUGINS_BUILD_DIR} - fi -} - - -parse_geany_plugins_version() { - log "Parse Geany-Plugins version" - GEANY_PLUGINS_VERSION=$(sed -n -E -e 's/^AC_INIT\(\[geany-plugins\], \[(.+)\]\)/\1/p' ${GEANY_PLUGINS_BUILD_DIR}/configure.ac) - GEANY_PLUGINS_GIT_REVISION=$(cd ${GEANY_PLUGINS_BUILD_DIR} && git rev-parse --short --revs-only HEAD 2>/dev/null || true) - PACKAGE_VERSION="${GEANY_PLUGINS_VERSION}-1~$(date '+%Y%m%d')git${GEANY_PLUGINS_GIT_REVISION}" -} - - -run_autogen_sh() { - log "Run ./autogen.sh" - cd ${GEANY_PLUGINS_BUILD_DIR} - # run ./autogen.sh as the Debian package won't run ./autogen.sh for us - NOCONFIGURE=1 ./autogen.sh -} - - -create_tarball_for_debuild() { - log "Create source tarball" - cd ${GEANY_PLUGINS_BUILD_DIR} - tar --transform "s,^,geany-plugins-${GEANY_PLUGINS_VERSION}/,S" \ - --create \ - --gzip \ - --file "../geany-plugins_${GEANY_PLUGINS_VERSION}.orig.tar.gz" \ - . -} - - -git_clone_debian_geany() { - log "Clone Geany-Plugins Debian repository" - git clone --depth 1 ${GEANY_PLUGINS_DEBIAN_REPOSITORY} ${GEANY_PLUGINS_DEBIAN_DIR} - # move debian package files to Geany GIT checkout - mv ${GEANY_PLUGINS_DEBIAN_DIR}/debian ${GEANY_PLUGINS_BUILD_DIR} -} - - -install_build_dependencies() { - log "Install build dependencies" - cd ${GEANY_PLUGINS_BUILD_DIR} - # install Geany from previous build - dpkg -i \ - ${OUTPUT_DIRECTORY}/geany/geany-common_*git*_all.deb \ - ${OUTPUT_DIRECTORY}/geany/geany_*git*_amd64.deb - - apt-get --assume-yes update - apt-get --assume-yes dist-upgrade - mk-build-deps \ - --install \ - --remove \ - --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --assume-yes" - # mk-build-deps leave the following files which then break 'debuild' later on - rm -f geany-plugins-build-deps_*-?_amd64.buildinfo geany-plugins-build-deps_*-?_amd64.changes -} - - -add_changelog_entry() { - log "Add ChangeLog entry for Debian package" - cd ${GEANY_PLUGINS_BUILD_DIR} - dch \ - --urgency low \ - --distribution unstable \ - --newversion "${PACKAGE_VERSION}" \ - "Autobuilt by CI or nightly build." -} - - -build_package() { - log "Build Debian package" - cd ${GEANY_PLUGINS_BUILD_DIR} - - debuild -uc -us -} - - -copy_results() { - log "Copy build artefacts" - - BUILD_DIR_DIRNAME=$(dirname ${GEANY_PLUGINS_BUILD_DIR}) - - rm -rf ${OUTPUT_DIRECTORY}/geany-plugins/* - - cp --verbose ${BUILD_DIR_DIRNAME}/geany-plugins_* ${OUTPUT_DIRECTORY}/geany-plugins - cp --verbose ${BUILD_DIR_DIRNAME}/geany-plugins-*_* ${OUTPUT_DIRECTORY}/geany-plugins - cp --verbose ${BUILD_DIR_DIRNAME}/geany-plugin-*_* ${OUTPUT_DIRECTORY}/geany-plugins -} - - -log_and_store_build_environment() { - log "Using environment" - - GTK_VERSION=$(pkg-config --modversion gtk+-3.0) - GLIB_VERSION=$(pkg-config --modversion glib-2.0) - COMPILER_VERSION=$(gcc -dumpfullversion) - - echo "Debian Distribution : $(grep PRETTY_NAME /etc/os-release | cut -d '=' -f 2)" - echo "Geany-Plugins version : ${GEANY_PLUGINS_VERSION}" - echo "Geany-Plugins GIT revision : ${GEANY_PLUGINS_GIT_REVISION}" - echo "GLib version : ${GLIB_VERSION}" - echo "GTK version : ${GTK_VERSION}" - echo "GCC version : ${COMPILER_VERSION}" - - cat <<EOT > ${OUTPUT_DIRECTORY}/geany-plugins/versions.json - { - "glib_version": "${GLIB_VERSION}", - "gtk_version": "${GTK_VERSION}", - "gcc_version": "${COMPILER_VERSION}", - } -EOT -} - - -main() { - git_clone_geany_if_necessary - parse_geany_plugins_version - run_autogen_sh - create_tarball_for_debuild - - git_clone_debian_geany - install_build_dependencies - add_changelog_entry - - build_package - copy_results - - log_and_store_build_environment - - log "Done." -} - - -main Modified: builders/scripts/update_debian_repositories.sh 49 lines changed, 0 insertions(+), 49 deletions(-) =================================================================== @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Copyright 2022 The Geany contributors -# License: GPLv2 -# -# Create a Debian repository for the Debian distribution -# requested in the environment variable ${DISTRO}. -# The repository will be signed with the GnuPG key as found -# in /gnupg (which must be provided from the caller). -# -# This script is meant to be run in a Docker container. -# - - -# codename -> suite mapping -declare -A SUITES=([bullseye]=stable [sid]=unstable) - -# stop on errors -set -e - -# cleanup -rm -rf /repository/conf -rm -rf /repository/db -rm -rf /repository/dists -rm -rf /repository/pool - -# create repository config -mkdir /repository/conf -cat << CONF > /repository/conf/distributions -Codename: ${DISTRO} -Suite: ${SUITES[${DISTRO}]} -Components: main -Architectures: amd64 source -SignWith: ${GNUPG_KEYID} -CONF - -# create repository -reprepro --silent --gnupghome /gnupg -b /repository createsymlinks -package_paths=`find /output -name '*.deb'` -for package in ${package_paths} -do - reprepro --silent --gnupghome /gnupg -b /repository includedeb ${DISTRO} ${package} -done -# add source packages -dsc_paths=`find /output -name '*.dsc'` -for dsc in ${dsc_paths} -do - reprepro --silent --gnupghome /gnupg -b /repository includedsc ${DISTRO} ${dsc} -done Modified: builders/start_build.sh 83 lines changed, 3 insertions(+), 80 deletions(-) =================================================================== @@ -3,16 +3,13 @@ # Copyright 2022 The Geany contributors # License: GPLv2 # -# Run Debian and Windows build containers and start builds within. +# Run Windows build containers and start builds within. # The Docker image for the containers are rebuilt automatically # every 30 days to keep them up to date. # # This script has to be run outside of the containers. # -# usage: start_build.sh [-d|--distro DISTRO] [-m|--mingw64] -# [-r|--rebuild-images] -# -d, --distro DISTRO Build for target Debian DISTRO (e.g. "bullseye", -# can be specified multiple times +# usage: start_build.sh [-m|--mingw64] [-r|--rebuild-images] # -f, --force-rebuild Force rebuilding of immages even if not necessary # -g, --geany Build Geany # --geany-source Path to a Geany source directory (optional, cloned from GIT if missing) @@ -27,9 +24,6 @@ DOCKER_IMAGE_MAX_AGE_DAYS=30 -# GNUPG config for the Debian repository, path and key must exist on the local machine -GNUPG_HOME=${GNUPG_HOME:-~/.gnupg} -GNUPG_KEYID=${GNUPG_KEYID:-0EE5B5AD} BASE_OUTPUT_DIRECTORY="${PWD}/output/" DOCKER_CMD="docker" @@ -81,64 +75,6 @@ rebuild_image() { } -build_for_debian_distro() { - distro=${1} - IMAGE_NAME_DEBIAN="geany-debian-${distro}-ci" - OUTPUT_DIRECTORY=${BASE_OUTPUT_DIRECTORY}/${distro} - LOGFILE_GEANY=${OUTPUT_DIRECTORY}/build_debian_${distro}_geany_$(date '+%Y_%m_%d_%H_%M_%S').log - LOGFILE_GEANY_PLUGINS=${OUTPUT_DIRECTORY}/build_debian_${distro}_geany_plugins_$(date '+%Y_%m_%d_%H_%M_%S').log - - mkdir -p "${OUTPUT_DIRECTORY}/geany" "${OUTPUT_DIRECTORY}/geany-plugins" - - # (re)build Docker image - rebuild_image "${IMAGE_NAME_DEBIAN}" Dockerfile.debian "--build-arg BASE_IMAGE_NAME=debian:${distro}" - - # build Geany - if [ -n "${DO_GEANY}" ]; then - log - "Building Geany for ${distro}" - log "${LOGFILE_GEANY}" \ - ${DOCKER_CMD} run \ - --rm \ - --env=GITHUB_PULL_REQUEST="${GITHUB_PULL_REQUEST}" \ - --env=CI="${CI}" \ - --volume "${PWD}/scripts:/scripts/" \ - --volume "${OUTPUT_DIRECTORY}:/output/" \ - --tmpfs /tmp:rw,exec,size=1024m \ - "${IMAGE_NAME_DEBIAN}:latest" \ - bash /scripts/build_debian_geany.sh - fi - - # build Geany-Plugins - if [ -n "${DO_GEANY_PLUGINS}" ]; then - log - "Building Geany-Plugins for ${distro}" - log "${LOGFILE_GEANY_PLUGINS}" \ - ${DOCKER_CMD} run \ - --rm \ - --env=GITHUB_PULL_REQUEST="${GITHUB_PULL_REQUEST}" \ - --env=CI="${CI}" \ - --volume "${PWD}/scripts:/scripts/" \ - --volume "${OUTPUT_DIRECTORY}:/output/" \ - --tmpfs /tmp:rw,exec,size=1024m \ - "${IMAGE_NAME_DEBIAN}:latest" \ - bash /scripts/build_debian_geany_plugins.sh - fi - - # build/update Debian repository - log - "Update Debian repository for ${distro}" - log "${OUTPUT_DIRECTORY}/build_debian_repository_$(date '+%Y_%m_%d_%H_%M_%S').log" \ - ${DOCKER_CMD} run \ - --rm \ - --env GNUPG_KEYID="${GNUPG_KEYID}" \ - --env DISTRO="${distro}" \ - --volume "${PWD}/scripts:/scripts/" \ - --volume "${GNUPG_HOME}:/gnupg/" \ - --volume "${OUTPUT_DIRECTORY}:/output/" \ - --volume "${BASE_OUTPUT_DIRECTORY}/repositories/${distro}:/repository/" \ - "${IMAGE_NAME_DEBIAN}:latest" \ - bash /scripts/update_debian_repositories.sh -} - - build_mingw64() { IMAGE_NAME_WINDOWS="geany-mingw64-ci" MINGW64_OUTPUT_DIRECTORY=${BASE_OUTPUT_DIRECTORY}/mingw64 @@ -194,10 +130,8 @@ build_mingw64() { usage() { - echo "usage: start_build.sh [-d|--distro DISTRO] [-m|--mingw64]" + echo "usage: start_build.sh [-m|--mingw64]" echo " [-r|--rebuild-images]" - echo " -d, --distro DISTRO Build for target Debian DISTRO (e.g. \"bullseye\"," - echo " can be specified multiple times" echo " -g, --geany Build Geany" echo "--geany-script Path to the script to be executed to build Geany" echo "--geany-source Path to a Geany source directory (optional, cloned from GIT if missing)" @@ -220,11 +154,6 @@ parse_command_line_options() { fi for opt in "$@"; do case "$opt" in - -d|--distro) - DO_DISTRO="${DO_DISTRO} ${2}" - shift - shift - ;; -f|--force-rebuild) DO_FORCE_IMAGE_REBUILD=1 shift @@ -281,7 +210,6 @@ parse_command_line_options() { } -DO_DISTRO= DO_MINGW64= DO_IMAGE_REBUILD= DO_FORCE_IMAGE_REBUILD= @@ -293,11 +221,6 @@ GEANY_PLUGINS_SOURCE= main() { - if [ -n "${DO_DISTRO}" ]; then - for distro in ${DO_DISTRO}; do - build_for_debian_distro "${distro}" - done - fi if [ -n "${DO_MINGW64}" ]; then build_mingw64 fi -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] ddc814: Update sinhala translation
by Aruna Hewapathirane
22 Oct '22
22 Oct '22
Branch: refs/heads/master Author: Aruna Hewapathirane <aruna.hewapathirane(a)gmail.com> Committer: GitHub <noreply(a)github.com> Date: Fri, 07 Oct 2022 00:29:47 UTC Commit: ddc814398de464161bff03320237038fff8baa5d
https://github.com/geany/geany/commit/ddc814398de464161bff03320237038fff8ba…
Log Message: ----------- Update sinhala translation Modified Paths: -------------- po/si.po Modified: po/si.po 5815 lines changed, 5815 insertions(+), 0 deletions(-) =================================================================== No diff available, check online -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 967e00: Merge pull request #3309 from Aruna-Hewapathirane/master
by Frank Lanitz
22 Oct '22
22 Oct '22
Branch: refs/heads/master Author: Frank Lanitz <frank(a)frank.uvena.de> Committer: GitHub <noreply(a)github.com> Date: Sat, 22 Oct 2022 18:07:01 UTC Commit: 967e004504d58ef7afc5bc7503a77d2968d339ca
https://github.com/geany/geany/commit/967e004504d58ef7afc5bc7503a77d2968d33…
Log Message: ----------- Merge pull request #3309 from Aruna-Hewapathirane/master Update sinhala translation Modified Paths: -------------- po/si.po Modified: po/si.po 5815 lines changed, 5815 insertions(+), 0 deletions(-) =================================================================== No diff available, check online -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] 5fa145: Fix wrong tarball name and update codename for Debian stable
by Enrico Tröger
22 Oct '22
22 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Sat, 22 Oct 2022 16:11:29 UTC Commit: 5fa145ae657a0e697ca1bab9e29ca82846d4c8aa
https://github.com/geany/infrastructure/commit/5fa145ae657a0e697ca1bab9e29c…
Log Message: ----------- Fix wrong tarball name and update codename for Debian stable Modified Paths: -------------- builders/scripts/build_debian_geany.sh builders/scripts/update_debian_repositories.sh Modified: builders/scripts/build_debian_geany.sh 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -70,7 +70,7 @@ create_tarball_for_debuild() { log "Create source tarball" cd ${GEANY_BUILD_DIR} # create a source tarball, keep .git included on purpose for Geany GIT build detection - tar --transform "s,^,geany-plugins-${GEANY_VERSION}/,S" \ + tar --transform "s,^,geany-${GEANY_VERSION}/,S" \ --create \ --gzip \ --file "../geany_${GEANY_VERSION}.orig.tar.gz" \ Modified: builders/scripts/update_debian_repositories.sh 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -13,7 +13,7 @@ # codename -> suite mapping -declare -A SUITES=([buster]=stable [sid]=unstable) +declare -A SUITES=([bullseye]=stable [sid]=unstable) # stop on errors set -e -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] d434dc: CI: Add workflow to build geany-mingw64-ci Docker image
by Enrico Tröger
18 Oct '22
18 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Mon, 17 Oct 2022 22:04:23 UTC Commit: d434dc4383327c9de4daf1e19ead64fdc3a1ec3c
https://github.com/geany/infrastructure/commit/d434dc4383327c9de4daf1e19ead…
Log Message: ----------- CI: Add workflow to build geany-mingw64-ci Docker image Modified Paths: -------------- .github/workflows/docker.yml builders/README.md Modified: .github/workflows/docker.yml 47 lines changed, 47 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,47 @@ +# +# Copyright: 2022, The Geany contributors +# License: GNU GPL v2 or later + +name: Build CI Docker Images + +on: + push: + workflow_dispatch: +# schedule: +# # Run weekly on Friday +# - cron: '34 5 * * FRI' + +# cancel already running builds of the same branch or pull request +concurrency: + group: ci-${{ github.head_ref }} || concat(${{ github.ref }} + cancel-in-progress: true + +jobs: + mingw64: + name: Build Docker image for mingw664 CI builds + runs-on: ubuntu-22.04 + permissions: + packages: write + + env: + DOCKER_REGISTRY: "ghcr.io" + DOCKER_IMAGE_NAME: "geany-mingw64-ci" + DOCKER_IMAGE_TAG: "ghcr.io/geany/geany-mingw64-ci:latest" + + steps: + - name: Checkout Build Scripts + uses: actions/checkout@v3 + + - name: Log In To The Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build And Push Docker Image + run: | + cd builders + bash start_build.sh --log-to-stdout --mingw64 --rebuild-images + docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_TAG }} + docker push ${{ env.DOCKER_IMAGE_TAG }} Modified: builders/README.md 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -125,6 +125,10 @@ The Docker image for the Windows build is based on a Debian image but has the fu for cross-compiling to mingw64 included. Additionally, the image contains a self-compiled Pacman package manager to install packages from the MSYS2 repositories. +A Github Action workflow is configured in this repository to build and push the image +to the Github Docker image registry as ghcr.io/geany/geany-mingw64-ci:latest. The workflow +is triggered once a week automatically. + ### Code sign certificate If the directory `certificates` contains the two files `cert.pem` and `key.pem`, -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/infrastructure] 6a3b28: CI: Add workflow to build geany-mingw64-ci Docker image
by Enrico Tröger
17 Oct '22
17 Oct '22
Branch: refs/heads/add_ci_builders Author: Enrico Tröger <enrico.troeger(a)uvena.de> Committer: Enrico Tröger <enrico.troeger(a)uvena.de> Date: Mon, 17 Oct 2022 21:52:52 UTC Commit: 6a3b28232993cacca9fa411dcc4733501d14f039
https://github.com/geany/infrastructure/commit/6a3b28232993cacca9fa411dcc47…
Log Message: ----------- CI: Add workflow to build geany-mingw64-ci Docker image Modified Paths: -------------- .github/workflows/docker.yml Modified: .github/workflows/docker.yml 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -20,6 +20,8 @@ jobs: mingw64: name: Build Docker image for mingw664 CI builds runs-on: ubuntu-22.04 + permissions: + packages: write env: DOCKER_REGISTRY: "ghcr.io" -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
3
Older →
Jump to page:
1
2
3
Results per page:
10
25
50
100
200