Skip to content

Latest commit

 

History

History
135 lines (100 loc) · 6.1 KB

README.md

File metadata and controls

135 lines (100 loc) · 6.1 KB

CI / Nightly-Builders

About

Scripts and Dockerfiles for Geany and Geany-Plugins nightly builds. start_nightly_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.

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
│   ├── 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
│
├── 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
│   ├── build_mingw64_geany.sh          -> Build Geany Windows installer
│   ├── build_mingw64_geany_plugins.sh  -> Build Geany-Plugins Windows installer
│   └── update_debian_repositories.sh   -> Build repositories for Debian packages
│
└── start_build.sh                      -> Run Debian and 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 [-d|--distro DISTRO] [-m|--mingw64]
                      [-r|--rebuild-images]
 -d, --distro DISTRO     Build for target Debian DISTRO (e.g. "bullseye",
                         can be specified multiple times
 -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

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

TBW - WIP

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 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 build_mingw64_geany.sh and build_mingw64_geany_plugins.sh

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.

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.