Skip to content

Commit

Permalink
Require at least GCC C++ compiler version 9
Browse files Browse the repository at this point in the history
So far, our "oldest supported distro" was Ubuntu 18.04 LTS, but since
that version no longer gets standard support from Canonical[1], we can
safely assume that apart from a few enterprise users noone is using it
anymore. Even in case there are any enterprise ip2unix users, they can
still use an older version of ip2unix.

The reason why we want to get rid of GCC C++ version 7 is because the
C++17 Filesystem library wasn't implemented back then and only got an
incomplete implementation starting with GCC version 9.

However, we really want to use the Filesystem library because it allows
us to work with files in a cross-platform way, which it turn makes it
easier to port ip2unix to eg. Darwin/BSD.

I also changed the GitHub workflow to use ubuntu-20.04 instead of
ubuntu-latest because our actual tests run on Hydra and we're only using
GitHub Actions to make sure it works in the worlds outside of Nix. Using
the oldest supported LTS instead of the latest non-LTS version of Ubuntu
makes sure we're not accidentally breaking things for older software
since with nixpkgs we usually use recent software and thus already cover
this with our Hydra builds.

[1]: https://ubuntu.com/18-04

Signed-off-by: aszlig <[email protected]>
  • Loading branch information
aszlig committed Aug 6, 2023
1 parent b749ebf commit c61f5cd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]

jobs:
linux:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog], and this project adheres to
- Include URL to README in usage if manpage is not being built.
- Turn into a Nix Flake.
- Improve serializer to be more robust in end-of-stream conditions.
- Bump requirements to require at least GCC version 9.

### Removed
- Badges (eg. LGTM and build status) in README and Hydra.
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ toc::[]
* https://github.com/jbeder/yaml-cpp[yaml-cpp], at least version 0.5.0
Requirement will be removed in *ip2unix* version 3, since the YAML rule file
format is deprecated.
* {cpp} compiler supporting {cpp}17 (https://gcc.gnu.org/[GNU G++] version 7.0
onwards).
* {cpp} compiler supporting {cpp}17 (eg. https://gcc.gnu.org/[GNU C++ compiler]
version 9.0 or https://clang.llvm.org/[Clang] version 7 or newer).
* https://www.python.org/[Python] 3, at least version 3.6 is needed for running
the integration tests.

Expand Down Expand Up @@ -145,11 +145,11 @@ $ sudo pacman -S python-pytest
$ meson build
---------------------------------------------------------------------

If you want to specify a different compiler executable, eg. `g++-7`:
If you want to specify a different compiler executable, eg. `g++-9`:

[source,sh-session]
---------------------------------------------------------------------
$ CXX=g++-7 meson build
$ CXX=g++-9 meson build
---------------------------------------------------------------------

Compile:
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
};

gcc = {
minVersion = "7";
minVersion = "9";
matchAttr = builtins.match "gcc([0-9]+)Stdenv";
getVersion = attr: attr.cc.version;
getStdenv = lib.id;
Expand Down

0 comments on commit c61f5cd

Please sign in to comment.