Commit Graph

34 Commits

Author SHA1 Message Date
b8fa857b35 Fix GitHub Actions Static Analyzer Check
Dockerfile
----------

This dockerfile was used to emulate GitHub actions.

<details><summary>Dockerfile source (click to expand)</summary>

```dockerfile
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN set -ex; \
apt-get update; \
apt-get install -y build-essential meson appstream clang clang-format clang-tools libdbus-1-dev libinih-dev libsystemd-dev git

RUN set -ex; \
yes | adduser ci-user

USER ci-user
```

</details>

Commands to reproduce
---------------------

I simulated GitHub actions with a local docker environment.

    docker build -t ci .

I ran the following commands to reproduce the issue so that I could bugfix the static analyzer script.

```bash
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/static-analyser-check.sh
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./bootstrap.sh -Dwith-examples=true
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci meson test -C builddir
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci dbus-run-session -- gamemode-simulate-game
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/static-analyser-check.sh
```

All commands reuse the same workspace which is how it works in GH actions.

Legitimate bugs
---------------

Now the error displayed in build failure appears to be a legitimate bug.  Four were found related to null pointer dereference.  I'm not fixing the bug but the check should work properly for those who do.

If you following my docker setup in this description you can view the bug report by starting the report server.

```bash
docker run -p 127.0.0.1:8181:8181 -it --rm -v "$PWD:$PWD" -w "$PWD" --init ci scan-view --host 0.0.0.0 --allow-all-hosts builddir/meson-logs/scanbuild/*
```

After the report server is started you can visit `http://127.0.0.1:8181/` to view the bugs.

Screenshot of report
--------------------

![Screenshot of bug report](https://user-images.githubusercontent.com/875669/155830028-473db1ea-7c98-4a82-bc3a-290d5c155108.png)
2022-03-10 10:40:45 +00:00
ab06ba419e Switch to GitHub Actions
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-02-03 16:40:02 +00:00
0344e7c311 Specify the correct inih subproject directory. 2021-02-18 18:52:59 +00:00
39f93e4000 Fix incorrect merge conflict resolution. 2020-05-26 17:43:23 +01:00
e6355d91f4 simplify archive creation
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-20 18:05:37 +02:00
9f676632c3 meson: ensure subprojects are up-to-date
... when creating the release tarball.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-19 16:35:00 +01:00
115f1ecdbd meson: use builddir instead of build
Use the -C option instead of changing the dir, change the build folder to builddir.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-19 16:35:00 +01:00
1709810707 Use distro provided git-clang-format
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-13 09:52:01 +01:00
faea358023 Use wrap instead of git submodule
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-06 11:01:13 +01:00
bfa20975ca Add git-clang-format, copied from llvm-project GitHub repository. This is preferable to downloading it each time which often fails and causes errors with continuous integration. 2020-03-03 16:54:09 +00:00
40702d3fed Update version back to 1.6 post-release 2020-03-03 16:35:37 +00:00
616dca659a Update version to 1.5.1 2020-03-03 16:18:48 +00:00
d3e309b23b use upstream inih r48
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-03-03 14:38:35 +00:00
065454bb4e Update version to 1.6 post-release 2020-01-22 14:51:00 +00:00
d58c59c183 Update version to 1.5 2020-01-22 14:19:26 +00:00
24687f960b Update version to 1.5-dev post-release 2019-07-21 10:39:11 +01:00
acb57735fc Update version to 1.4 2019-07-21 10:24:18 +01:00
23dd471f6b Add clang analyzer check using scan-build 2019-05-19 12:47:32 +01:00
959c48978b Update version to 1.4-dev post-release 2019-03-29 15:39:08 +00:00
e5ccb4b68d Update version to 1.3.1 2019-03-29 15:30:11 +00:00
9465c5f6bd Generate sha256sums in mkrelease.sh 2019-03-29 15:25:25 +00:00
95c365076f Update to version 1.4-dev post-release 2019-03-15 16:11:57 +00:00
ea7d1c13a3 Update to version 1.3 2019-03-15 13:39:00 +00:00
b2870671bd formatcheck: Use a shorter timeout
If the internet connection is down, the default timeout of wget is
unreasonably long. If formatcheck is used as a pre-commit hook, this
blocks usage of git for a long time although we probably have
git-clang-format available.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-10-09 00:49:58 +02:00
a8726e8959 format-check: Enable usage as pre-commit hook
This adds support for a switch `--pre-commit` to work in
pre-commit-mode. It downloads the file and runs the real pre-commit-hook
then.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-09-24 20:44:07 +02:00
f041ba2281 format-check: Optimize format-check.sh
This commit silences the standard output of wget to generate less noise
when using `format-check.sh` as a pre-commit hook.

It also doesn't redownload the file over and over again but only when
changes were detected. Previous behavior was wget creating numbered
versions by multiple downloads, thus it always used the first version
which was download. That is obviously wrong.

It errors out nicely now when the download failed.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-09-24 20:21:55 +02:00
2ae86fabd6 Update to version 1.3-dev post-1.2 release 2018-07-21 09:48:40 +01:00
c3938599a8 Update to version 1.2 2018-07-21 09:33:32 +01:00
d9072607d9 Label master as 1.2-dev 2018-05-11 14:53:30 +01:00
fb2f3c628a Update to 1.1 ready for release 2018-04-25 15:50:05 +01:00
a419965061 Fix format check 2018-04-24 17:09:06 +01:00
53d15292c9 Fix the format check script by applying it to the previous commit
Rather than just to local changes, which doesn't work as intended
2018-04-16 17:52:48 +01:00
1f12bcb892 Add a basic travis file for unit tests
Only code formatting implemented at the moment.

  Travis is currently Ubuntu 14.04, which is missing multiple library versions needed. Bootstrapping in Python 3.5, Meson and Ninja is possible, but can take a while, but also bootstrapping in libsystemd is one step too many for now as it takes a significant amount of time.
2018-04-13 14:32:02 +01:00
f1195e22bf scripts: Add management scripts to make release process easier
To facilitate a proper release process we now have scripts to create
complete tarballs in the fasion of autotools, which will also include
the archived `inih` project. The net result is a completel tarball which
build systems can use in a reproducable fashion without requiring network
access to complete, thus improving security and ensuring consistency in
results between various distributions should subprojects update.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2018-04-10 13:23:38 +01:00