+
Skip to content

Remove autotools & modernise build CI/CD #1191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .current-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.3
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ end_of_line = lf
insert_final_newline = true

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
[meson.build]
indent_style = space
indent_size = 4

[*.{c,h}]
indent_style = tab
Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
strategy:
matrix:
os: [blacksmith-4vcpu-ubuntu-2204, alpine]
build-system: [autotools, meson]
compiler: [gcc, clang]

steps:
Expand All @@ -30,24 +29,13 @@ jobs:

- name: Configure and Build
run: |
if [ "${{ matrix.build-system }}" = "autotools" ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
else
export CC_LD=lld
fi
export CC=${{ matrix.compiler }}
./autogen.sh && ./configure --enable-mandoc --enable-golang && make -j
fi
if [ "${{ matrix.build-system }}" = "meson" ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
else
export CC_LD=lld
fi
export CC=${{ matrix.compiler }}
meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir
export CC=${{ matrix.compiler }}
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
else
export CC_LD=lld
fi
meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir

notification:
runs-on: blacksmith-4vcpu-ubuntu-2204
Expand Down
84 changes: 57 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,86 @@
name: Create Release Branch
name: Create Release
on:
workflow_dispatch:
inputs:
versionRelease:
description: 'Release version'
nextVersion:
description: 'The next version of fvwm3 after this release: '
required: true
isDraft:
description: 'Make a draft release, rather than an official release'
type: boolean
required: true
jobs:
createrelease:
runs-on: blacksmith-4vcpu-ubuntu-2204

container: fvwmorg/fvwm3-build:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Repo Settings
run: |
git config --global user.name "Thomas Adam"
git config --global user.email "thomas@fvwm.org"
git config --global --add safe.directory /__w/fvwm3/fvwm3
- name: Get Current Version (for release...)
id: versionRelease
run: |
git fetch -q -n origin
echo "versionRelease=$(git show HEAD:./.current-version)" >> $GITHUB_ENV
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.versionRelease }}
- name: Change files for release
run: |
./mkrelease.sh ${{ github.event.inputs.versionRelease }}
git checkout -b release/${{ env.versionRelease }}
- name: Get date
id: date
run: echo "date=$(date -d 'now' +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Generate changelog
run: |
printf "## [${{ github.event.inputs.versionRelease }}](https://github.com/fvwmorg/fvwm3/tree/${{ github.event.inputs.versionRelease }}) (${{ env.date }})\n" >./tmp.out
printf "## [${{ env.versionRelease }}](https://github.com/fvwmorg/fvwm3/tree/${{ env.versionRelease }}) (${{ env.date }})\n" >./tmp.out
curl \
--silent \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/fvwmorg/fvwm3/releases/generate-notes \
-d '{"tag_name":"${{ github.event.inputs.versionRelease }}","target_commitish":"main","configuration_file_path":".github/release.yml"}' | \
-d '{"tag_name":"${{ env.versionRelease }}","target_commitish":"main","configuration_file_path":".github/release.yml"}' | \
jq -r '.body' >> ./tmp.out
sed -i '2d' ./tmp.out
sed -i "2r tmp.out" CHANGELOG.md
- name: Commit Changes
- name: Create release commit
run: |
git config user.name "Thomas Adam"
git config user.email "thomas@fvwm.org"
git commit -a --author="Thomas Adam <thomas.adam@fvwm.org>" -m "[AUTO]: release ${{ github.event.inputs.versionRelease }}"
git push -u origin HEAD
- name: Create pull request into main
uses: thomaseizinger/create-pull-request@1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: release/${{ github.event.inputs.versionRelease }}
base: main
title: release ${{ github.event.inputs.versionRelease }}
reviewers: ${{ github.event.issue.user.login }}
body: |
Hello,
This PR was created in response to a release workflow running.
I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}.
echo "ISRELEASED=yes" > .release-status
git add .release-status
git add CHANGELOG.md
git commit -a --author="Thomas Adam <thomas.adam@fvwm.org>" -m "[AUTO]: release ${{ env.versionRelease }}"
git checkout main
git merge --ff-only release/${{ env.versionRelease }}
git tag -am "Release ${{ env.versionRelease }}" ${{ env.versionRelease }}
git push
git push origin --tags ${{ env.versionRelease }}
- name: Build artefacts
run: |
meson setup --reconfigure build -Dmandoc=true -Dhtmldoc=true -Dgolang=enabled && \
meson compile -C build && meson dist --formats gztar -C build
- name: Create a draft release
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
gh \
release \
create ${{ env.versionRelease }} \
${{ github.event.inputs.isDraft == 'true' && '--draft' || '' }} \
--target main \
--generate-notes \
./build/meson-dist/fvwm3-${{ env.versionRelease }}.tar.gz
- name: Bump next version
run: |
git clean -dfx
git checkout main
git pull -q
echo "${{ github.event.inputs.nextVersion }}" > .current-version
git add .current-version
echo "ISRELEASED=no" > .release-status
git commit -am "build: set next version"
git push
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
*~
*#
.#*
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
bin/FvwmCommand
bin/FvwmPrompt/FvwmPrompt
bin/fvwm-bug
Expand Down Expand Up @@ -76,6 +72,5 @@ modules/FvwmScript/Scripts/FvwmScript-ComExample
modules/FvwmScroll/FvwmScroll
modules/fmd/fmd
perllib/FVWM/Module.pm
stamp-h1
tags
tests/hints/hints_test
1 change: 1 addition & 0 deletions .release-status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ISRELEASED=no
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ENV GO111MODULE="on"
COPY . /build
WORKDIR /build

RUN ./autogen.sh && ./configure --enable-mandoc --enable-golang && make -j4
RUN meson setup --reconfigure build -Dmandoc=true && meson compile -C build
44 changes: 6 additions & 38 deletions dev-docs/INSTALL.md → INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Installation Instructions
=========================

FVWM3 prefers `meson` as its build tool chain, but provides `autotools` as a
legacy fallback on older systems.
FVWM3 uses `meson` as its build tooling.

Dependencies
============
Expand Down Expand Up @@ -63,44 +62,13 @@ To generate `fvwm3`'s documentation:
3. To generate HTML docs: pass `-Dhtmldoc=true` to `meson`


Installing From Git
Installing From Git or a Release Tarball
===================

## Build Systems

`fvwm3` has traditionally been using autotools. However, this is now
deprecated in favour of `meson`. It is suggested that all systems which
support `meson` use this instead as it is now the preferred build system to
use.

The `autotools` build system remains to provide legacy support but is not
going to see any updates to it.

### Autotools

```
./autogen.sh && ./configure && make && sudo make install
```

### Meson

```
meson setup build && ninja -C build && ninja -C build install
```

Installing From Release Tarball
===============================

## Autotools

Release tarballs will come bundled with `./configure` already, hence:

```
./configure && make && sudo make install
```

## Meson
Compiling `fvwm3` with meson involves the following command. Note that this
is an example; the setup command can be passed various options, see the
`meson.options` file.

```
meson setup build && ninja -C build && meson install -C build
meson setup build && meson compile -C build && meson install -C build
```
58 changes: 0 additions & 58 deletions Makefile.am

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Releases / Changelog
Installation
------------

See [the installation instructions](./dev-docs/INSTALL.md)
See [the installation instructions](./INSTALL.md)

Help & Support
--------------
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载