From e8e839ec1d4dec599613cc1958b92f4870f0bb31 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 02:13:23 +0100 Subject: [PATCH 01/17] Makefile.mk: create ./TAGS in project root if requested Signed-off-by: Tim Janik --- Makefile.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.mk b/Makefile.mk index b0428a53..55e9defc 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -385,6 +385,8 @@ $>/TAGS: $>/ls-tree.lst $(GITCOMMITDEPS) && sed -r '0,/Warning: ignoring null tag/b; /Warning: ignoring null tag/d' < $>tags.log && $(RM) $>tags.log # use sed to compress flood of "Warning: ignoring null tag" ALL_TARGETS += $>/TAGS +TAGS: $>/TAGS + ln -sf $>/TAGS TAGS # == compile_commands.json == compile_commands.json: Makefile.mk From 6c72b711f4e8679424f195b7e3af6c27636dbe7b Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 02:13:23 +0100 Subject: [PATCH 02/17] Makefile.mk: use syntax compatible with etags and ctags Signed-off-by: Tim Janik --- Makefile.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile.mk b/Makefile.mk index 55e9defc..c7efad06 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -379,10 +379,9 @@ $>/ChangeLog: $(GITCOMMITDEPS) Makefile.mk | $>/ # == TAGS == # ctags --print-language `git ls-tree -r --name-only HEAD` -$>/TAGS: $>/ls-tree.lst $(GITCOMMITDEPS) +$>/TAGS: $>/ls-tree.lst $(GITCOMMITDEPS) Makefile.mk $(QGEN) - $Q ctags -e -o $@ -L $< >$>tags.log 2>&1 || { cat $>tags.log >&2 ; false ; } \ - && sed -r '0,/Warning: ignoring null tag/b; /Warning: ignoring null tag/d' < $>tags.log && $(RM) $>tags.log + $Q etags -o $@ $$(< $<) # use sed to compress flood of "Warning: ignoring null tag" ALL_TARGETS += $>/TAGS TAGS: $>/TAGS From a74f8ff235cf2abc5c9b0ac51dff5f517abed08a Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 03:35:35 +0100 Subject: [PATCH 03/17] misc/Dockerfile.noble: provide Ubuntu 24.04 build environment Signed-off-by: Tim Janik --- misc/Dockerfile.noble | 80 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 misc/Dockerfile.noble diff --git a/misc/Dockerfile.noble b/misc/Dockerfile.noble new file mode 100644 index 00000000..13cd6a28 --- /dev/null +++ b/misc/Dockerfile.noble @@ -0,0 +1,80 @@ +# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0 + +# Distribution selection +FROM ubuntu:24.04 +ENV DEBIAN_FRONTEND noninteractive + +# Use BASH(1) as shell, affects the RUN commands below +RUN ln -sf bash /bin/sh && ls -al /bin/sh + +# Upgrade packages, cache /var/cache/apt instead of "apt clean" +RUN \ + --mount=type=cache,target=/var/cache/apt : \ + && apt-get update \ + && apt-get -y upgrade \ + && apt-get autoremove -y + +# Add libXss.so, libgtk-3-0 for Electron +RUN \ + --mount=type=cache,target=/var/cache/apt : \ + && apt-get install -y \ + sudo build-essential curl cmake libglib2.0-dev libzstd-dev \ + pkg-config git ccache unzip gawk \ + castxml cppcheck libboost-system-dev \ + imagemagick librsvg2-bin libxml2-utils libxml2-dev python3 python3-pip \ + python3-lxml python3-pandocfilters pandoc graphviz universal-ctags \ + libasound2-dev libflac-dev libopus-dev libjack-dev \ + libvorbis-dev libmpg123-dev libmp3lame-dev \ + squashfs-tools zstd gettext \ + libgtk2.0-dev libgtk-3-dev \ + libgtk-3-0 libxss1 libgbm1 libnss3 \ + lsb-release wget software-properties-common \ + xvfb twm ffmpeg doxygen \ + && apt-get autoremove -y + +# Add TeX for PDF rendering +RUN \ + --mount=type=cache,target=/var/cache/apt : \ + && apt-get install -y \ + texlive-xetex fonts-sil-charis texlive-binaries texlive-fonts-extra \ + && apt-get autoremove -y + +# Install recent clang++ +RUN \ + --mount=type=cache,target=/var/cache/apt : \ + && curl -fsSLO https://apt.llvm.org/llvm.sh && chmod +x llvm.sh \ + && yes | ./llvm.sh 20 && rm -f ./llvm.sh \ + && apt-get install -y clang-tidy-20 libclang-20-dev \ + && update-alternatives \ + --install /usr/bin/clang clang /usr/bin/clang-20 0 \ + --slave /usr/bin/clang++ clang++ /usr/bin/clang++-20 \ + --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-20 \ + && apt-get autoremove -y + +# Nodejs - https://github.com/nodesource/distributions#nodejs +RUN \ + --mount=type=cache,target=/var/cache/apt : \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && rm -f nodesource-repo.gpg.key \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ + && apt-get install -y nodejs \ + && apt-get autoremove -y + +# Install mkdocs for documentation builds +ENV PIP_BREAK_SYSTEM_PACKAGES 1 +RUN pip install mkdocs-material mkdoxy poxy + +# Support `--user runner` for the Github action VM user: uid=1001(runner) gid=127(docker) +RUN : \ + && groupadd -g 127 docker \ + && useradd -u 1001 -g 127 -G 1000 -m -d /github/home -s /bin/bash runner \ + && echo "runner ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner + +# Become non-root, allow sudo as user +RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu +USER ubuntu + +# docker build -t ghcr.io/tim-janik/anklang-ci:noble-latest -f misc/Dockerfile.noble misc +# docker run -ti --rm -v $PWD:/hostwd ghcr.io/tim-janik/anklang-ci:noble-latest From 65d22e4e1af0e6a4b5fe971d39a8614a93b41b98 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 14:56:46 +0100 Subject: [PATCH 04/17] .github/workflows/pages.yml: run on noble-latest and only if tim-janik/anklang * cleanup names and comments * build only if tim-janik/anklang * build on noble-latest Signed-off-by: Tim Janik --- .github/workflows/pages.yml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f937a6d7..615e5d42 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -27,35 +27,27 @@ concurrency: cancel-in-progress: false jobs: - # Build job - build: + BuildPages: + if: ${{ github.repository == 'tim-janik/anklang' }} runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:jammy-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - name: Checkout Anklang run: | - pwd && ls -al - rm -rf * .[^.]* ..?* + pwd && ls -al && rm -rf * .[^.]* ..?* git clone --recurse-submodules https://github.com/tim-janik/anklang.git . - name: Setup Pages id: pages uses: actions/configure-pages@v5 - - run: echo -e 'prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk + - run: echo -e ' prefix=/ \n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk - run: make mkdocs -j`nproc` + # (cd out/site/ && python3 -m http.server 8003 ) - run: ls -al out/site/ - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./out/site/ + - uses: actions/upload-pages-artifact@v3 + with: { path: ./out/site/ } - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + DeployPages: + needs: BuildPages runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + environment: { name: github-pages, url: "${{ steps.deployment.outputs.page_url }}" } + steps: [ { id: deployment, uses: actions/deploy-pages@v4 } ] From 02e503afc5825636e4959f9698682488f9a4024b Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 16:23:04 +0100 Subject: [PATCH 05/17] .github/workflows/pages.yml: fix spaces Signed-off-by: Tim Janik --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 615e5d42..26c49e50 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Pages id: pages uses: actions/configure-pages@v5 - - run: echo -e ' prefix=/ \n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk + - run: echo 'prefix=/ CC=clang CXX=clang++ CLANG_TIDY=clang-tidy' | tr ' ' '\n' > config-defaults.mk - run: make mkdocs -j`nproc` # (cd out/site/ && python3 -m http.server 8003 ) - run: ls -al out/site/ From 868bc27057b60a35a3540ef8e252dac0cff0cd87 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 17:38:52 +0100 Subject: [PATCH 06/17] Makefile.mk: only use universal-ctags which is more robust than etags * Check for universal-ctags, make empty TAGS if not present Signed-off-by: Tim Janik --- Makefile.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.mk b/Makefile.mk index c7efad06..cfc055dd 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -381,7 +381,9 @@ $>/ChangeLog: $(GITCOMMITDEPS) Makefile.mk | $>/ # ctags --print-language `git ls-tree -r --name-only HEAD` $>/TAGS: $>/ls-tree.lst $(GITCOMMITDEPS) Makefile.mk $(QGEN) - $Q etags -o $@ $$(< $<) + $Q ctags --version 2>/dev/null | grep -qE 'Exuberant|Universal' || exit 0 >$@ ; \ + ctags -o $@ -L - < $< 2> >(grep -vF 'Warning: ignoring null tag in') + # use sed to compress flood of "Warning: ignoring null tag" ALL_TARGETS += $>/TAGS TAGS: $>/TAGS From f66b64409315b3a652530e4f3261106012d765e3 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 18:24:30 +0100 Subject: [PATCH 07/17] .github/workflows/testing.yml: upgrade build env from Focal to Noble Signed-off-by: Tim Janik --- .github/workflows/testing.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 45762e8a..4345ea1e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,9 +11,9 @@ on: jobs: - FocalAssets: + NobleAssets: runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:focal-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest' } steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - name: 'Fetch all tags' @@ -34,7 +34,7 @@ jobs: UploadDocs: if: ${{ github.repository == 'tim-janik/anklang' && github.ref == 'refs/heads/trunk' }} runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:focal-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest' } steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - name: 'Fetch all tags' @@ -76,10 +76,10 @@ jobs: if: ${{ always() }} with: { name: "x11test", path: "out/x11test/" } - FocalClangTidy: + NobleClangTidy: if: ${{ ! contains(github.ref, 'refs/tags/') }} runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:focal-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest' } steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - name: 'Fetch all tags' @@ -106,18 +106,18 @@ jobs: make branch-check BRANCH_CHECK_EXIT=$BRANCH_CHECK_EXIT Ping-IRC: - needs: [FocalAssets, UploadDocs, ArchReplay, FocalClangTidy] + needs: [NobleAssets, UploadDocs, ArchReplay, NobleClangTidy] runs-on: ubuntu-latest steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0 } } # Fix actions/checkout#290 - run: git fetch -f --tags && git submodule update --init --recursive && git describe - name: Check Jobs run: | - echo '${{ needs.FocalAssets.result }}' '${{ needs.UploadDocs.result }}' '${{ needs.ArchReplay.result }}' '${{ needs.FocalClangTidy.result }}' - [[ ${{ needs.FocalAssets.result }} =~ success|skipped ]] + echo '${{ needs.NobleAssets.result }}' '${{ needs.UploadDocs.result }}' '${{ needs.ArchReplay.result }}' '${{ needs.NobleClangTidy.result }}' + [[ ${{ needs.NobleAssets.result }} =~ success|skipped ]] [[ ${{ needs.UploadDocs.result }} =~ success|skipped ]] [[ ${{ needs.ArchReplay.result }} =~ success|skipped ]] - [[ ${{ needs.FocalClangTidy.result }} =~ success|skipped ]] + [[ ${{ needs.NobleClangTidy.result }} =~ success|skipped ]] - name: Ping IRC if: ${{ always() && !env.ACT }} run: | From 230641992efa5c84e506f7b806977c07e1c5d1db Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 20:15:10 +0100 Subject: [PATCH 08/17] .github/workflows/testing.yml: run containers with --user runner Signed-off-by: Tim Janik --- .github/workflows/testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4345ea1e..6270fc77 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -13,7 +13,7 @@ jobs: NobleAssets: runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - name: 'Fetch all tags' @@ -34,7 +34,7 @@ jobs: UploadDocs: if: ${{ github.repository == 'tim-janik/anklang' && github.ref == 'refs/heads/trunk' }} runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - name: 'Fetch all tags' @@ -79,7 +79,7 @@ jobs: NobleClangTidy: if: ${{ ! contains(github.ref, 'refs/tags/') }} runs-on: ubuntu-latest - container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest' } + container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - name: 'Fetch all tags' From 8073ce38205e7dd01c1a8724dbf2b5193b98265c Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 20:42:46 +0100 Subject: [PATCH 09/17] doc/poxy-0.19.1.diff: fix poxy-0.19.1 interaction with doxygen-1.9.8 Signed-off-by: Tim Janik --- doc/poxy-0.19.1.diff | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/poxy-0.19.1.diff diff --git a/doc/poxy-0.19.1.diff b/doc/poxy-0.19.1.diff new file mode 100644 index 00000000..018df716 --- /dev/null +++ b/doc/poxy-0.19.1.diff @@ -0,0 +1,11 @@ +--- ./usr/local/lib/python3.12/dist-packages/poxy/run.orig 2024-11-10 19:50:41.858752777 +0000 ++++ ./usr/local/lib/python3.12/dist-packages/poxy/run.py 2024-11-10 19:50:50.478776979 +0000 +@@ -746,7 +746,7 @@ + + # re-sort members to override Doxygen's weird and stupid sorting 'rules' + if 1: +- sort_members_by_name = lambda tag: tag.find(r'name').text ++ sort_members_by_name = lambda tag: tag.find(r'name').text or '' + members = [tag for tag in section.findall(r'memberdef')] + for tag in members: + section.remove(tag) From 6bc89d18851c8f6afcdad1dd91e3e874e5322a23 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 20:42:46 +0100 Subject: [PATCH 10/17] .github/workflows/testing.yml: apply doc/poxy-0.19.1.diff before building docs Signed-off-by: Tim Janik --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6270fc77..fdb4377e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -48,6 +48,7 @@ jobs: run: | make -j`nproc` all (umask 0077 && cat <<< "${{ secrets.SSH_ID_GHDOCS4ANKLANG_ECDSA }}" > .git/.ssh_id_ghdocs4anklang) + (cd / && sudo patch -t -p0) Date: Sun, 10 Nov 2024 23:58:52 +0100 Subject: [PATCH 11/17] misc/mkcopyright.py: -e: abort early when a license cannot be determined Signed-off-by: Tim Janik --- misc/mkcopyright.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/misc/mkcopyright.py b/misc/mkcopyright.py index 93451a72..387651c8 100755 --- a/misc/mkcopyright.py +++ b/misc/mkcopyright.py @@ -188,7 +188,7 @@ def print_help (arg0, exit = None): h += "OPTIONS:\n" h += " -b Display brief license list\n" h += " -c Read config file in INI format\n" - h += " -e Exit with a non-zero status if any files are unlicensed\n" + h += " -e Exit with an error if any files are unlicensed\n" h += " -h, --help Show command help\n" h += " -l List licensed files only\n" h += " -u List unlicensed files only\n" @@ -209,8 +209,8 @@ def print_help (arg0, exit = None): 'max_header_lines': 10, 'max_xml_lines': 999, 'sections': { 'debian/copyright': {}, }, - 'with_license': True, - 'without_license': True, + 'list_licensed': True, + 'list_unlicensed': True, } def parse_options (sysargv, dfltconfig = default_config): class Config (object): pass @@ -231,11 +231,11 @@ class Config (object): pass print_spdx_licenses() sys.exit (0) elif k == '-l': - config.with_license = True - config.without_license = False + config.list_licensed = True + config.list_unlicensed = False elif k == '-u': - config.with_license = False - config.without_license = True + config.list_licensed = False + config.list_unlicensed = True elif k == '-C': upstream_headers['Upstream-Contact'] = v elif k == '-N': @@ -269,8 +269,12 @@ def mkcopyright (sysargv): # detect license license = find_license (filename, config) count_unlicensed += not license - if ((license and not config.with_license) or - (not license and not config.without_license)): + if count_unlicensed and config.error_unlicensed: + print ('\n%-16s %s' % (license or '?', filename)) + print ('%s: error: missing license in file: %s' % (sysargv[0], filename), file = sys.stderr) + sys.exit (1) + if ((license and not config.list_licensed) or + (not license and not config.list_unlicensed)): continue if config.brief: print ('%-16s %s' % (license or '?', filename)) From 475776744cc8b890b5059fb3aa306d78d4bac222 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 23:59:29 +0100 Subject: [PATCH 12/17] doc/Makefile.mk: abort on files without copyright info Signed-off-by: Tim Janik --- doc/Makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Makefile.mk b/doc/Makefile.mk index a6a5c3d0..ba3c6229 100644 --- a/doc/Makefile.mk +++ b/doc/Makefile.mk @@ -50,7 +50,7 @@ $(filter %.md, $(doc/install.files)): $>/doc/%.md: %.md doc/Makefile.mk | $>/d $>/doc/copyright: misc/mkcopyright.py doc/copyright.ini $>/ls-tree.lst | $>/doc/ $(QGEN) $Q if test -r .git ; then \ - misc/mkcopyright.py -c doc/copyright.ini \ + misc/mkcopyright.py -e -c doc/copyright.ini \ $$(cat $>/ls-tree.lst) > $@.tmp ; \ else \ $(CP) doc/copyright $@.tmp ; \ From 5f4db18fc612a79c50626e5e208784bd7eb40f95 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Mon, 11 Nov 2024 00:01:56 +0100 Subject: [PATCH 13/17] misc/mkcopyright.py: fix pattern syntax Signed-off-by: Tim Janik --- misc/mkcopyright.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/mkcopyright.py b/misc/mkcopyright.py index 387651c8..32b4b5f3 100755 --- a/misc/mkcopyright.py +++ b/misc/mkcopyright.py @@ -9,18 +9,18 @@ # Licenses as found in source code comments licenses = { - 'MPL-2.0': [ 'This Source Code Form is licensed MPL-2\.0', - 'This Source Code Form is licensed MPL-2\.0: http://mozilla.org/MPL/2\.0' ], + 'MPL-2.0': [ r'This Source Code Form is licensed MPL-2\.0', + r'This Source Code Form is licensed MPL-2\.0: http://mozilla.org/MPL/2\.0' ], 'CC0-1.0': [ 'Licensed CC0 Public Domain', - 'CC0 Public Domain: http://creativecommons.org/publicdomain/zero/1\.0/', - 'Licensed CC0 Public Domain: http://creativecommons.org/publicdomain/zero/1\.0' ], + r'CC0 Public Domain: http://creativecommons.org/publicdomain/zero/1\.0/', + r'Licensed CC0 Public Domain: http://creativecommons.org/publicdomain/zero/1\.0' ], 'MIT': [ 'MIT [Ll]icensed?', ], 'Unlicense': [ '([Dd]edicated to|[Ii]n) the Public Domain under the Unlicense([: ]*http.*)?', 'Licensed Public Domain' ], } # Comment suffix to ignore -suffixes = '([.,;:]?\s*([Bb]ased on|[Dd]erived from)\s*[:]?\s*http[^ \t]*)?' +suffixes = r'([.,;:]?\s*([Bb]ased on|[Dd]erived from)\s*[:]?\s*http[^ \t]*)?' # Comment patterns comments = ( From 60e6ab62ba18ba8146c6217acc0c275753a5251c Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Mon, 11 Nov 2024 00:01:56 +0100 Subject: [PATCH 14/17] doc/copyright.ini: add doc/poxy-0.19.1.diff Signed-off-by: Tim Janik --- doc/copyright.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/copyright.ini b/doc/copyright.ini index 85fe3367..5fe0250d 100644 --- a/doc/copyright.ini +++ b/doc/copyright.ini @@ -21,8 +21,9 @@ files = devices/freeverb/tuning.h devices/freeverb/denormals.h patterns = - devices/freeverb/.*.hpp - devices/freeverb/.*.cpp + devices/freeverb/.*\.hpp + devices/freeverb/.*\.cpp + doc/poxy-.*\.diff [MPL-2.0] files = From 2d10a709239fa331e791ba08e646603ac95c1e23 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 20:35:21 +0100 Subject: [PATCH 15/17] misc/Dockerfile.focal, misc/Dockerfile.jammy: remove unused files Signed-off-by: Tim Janik --- misc/Dockerfile.focal | 109 ------------------------------------------ misc/Dockerfile.jammy | 62 ------------------------ 2 files changed, 171 deletions(-) delete mode 100644 misc/Dockerfile.focal delete mode 100644 misc/Dockerfile.jammy diff --git a/misc/Dockerfile.focal b/misc/Dockerfile.focal deleted file mode 100644 index 094e1c94..00000000 --- a/misc/Dockerfile.focal +++ /dev/null @@ -1,109 +0,0 @@ -# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0 - -# == Distribution preparation == -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND noninteractive - -# Use BASH(1) as shell, affects the RUN commands below -RUN ln -sf bash /bin/sh && ls -al /bin/sh - -# Upgrade packages, clean up to shrink Docker image -RUN \ - --mount=type=cache,target=/var/cache/apt \ - apt-get update && apt-get -y upgrade && apt-get autoremove -y - -# Install build tools, libstdc++-10-dev>=10 for C++20 -# Add libXss.so, libgtk-3-0 for Electron -# Install recent pandoc and filters -# Install Poxy, needs Doxygen and TeX -# Install X11 recording tools -RUN \ - --mount=type=cache,target=/var/cache/apt \ - apt-get install -y \ - sudo build-essential gawk zstd unzip git wget curl \ - gnupg lsb-release software-properties-common ca-certificates \ - gettext graphviz imagemagick librsvg2-bin libxml2-utils \ - ccache cmake universal-ctags cppcheck libstdc++-10-dev \ - pkg-config libxml2-dev libglib2.0-dev \ - libboost-system-dev libzstd-dev libasound2-dev libjack-dev \ - libflac-dev libopus-dev libvorbis-dev libmpg123-dev libmp3lame-dev \ - libgconf-2-4 libgtk2.0-dev libgtk-3-dev libgtk-3-0 \ - squashfs-tools libxss1 libgbm1 libnss3 \ - && apt-get install -y \ - python3 python3-pip python3-lxml python3-pandocfilters \ - && curl -fsSLO https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-1-amd64.deb \ - && apt-get install -y ./pandoc-3.1.9-1-amd64.deb \ - && rm -f ./pandoc-3.1.9-1-amd64.deb \ - && apt-get install -y \ - doxygen \ - texlive-xetex fonts-sil-charis texlive-binaries texlive-fonts-extra \ - && pip install poxy \ - && apt-get install -y \ - xvfb twm ffmpeg \ - && apt-get autoremove -y - -# Install recent clang++ -RUN \ - --mount=type=cache,target=/var/cache/apt \ - curl -fsSLO https://apt.llvm.org/llvm.sh && chmod +x llvm.sh \ - && yes | ./llvm.sh 17 && rm -f ./llvm.sh \ - && apt-get install -y clang-tidy-17 libclang-17-dev \ - && update-alternatives \ - --install /usr/bin/clang clang /usr/bin/clang-17 0 \ - --slave /usr/bin/clang++ clang++ /usr/bin/clang++-17 \ - --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-17 \ - && apt-get autoremove -y - -# Build recent castxml -RUN : \ - && cd /tmp \ - && git clone https://github.com/CastXML/CastXML.git \ - && export CC=clang CXX=clang++ \ - && cd CastXML && cmake . && make -j`nproc` && sudo make install \ - && cd /tmp && rm -rf CastXML - -# Nodejs - https://github.com/nodesource/distributions#nodejs -RUN \ - --mount=type=cache,target=/var/cache/apt \ - mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && rm -f nodesource-repo.gpg.key \ - && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ - && apt-get update \ - && apt-get install -y nodejs \ - && apt-get autoremove -y - -# Provide a fast JS package manager -RUN npm install -g bun@latest - -# Build stripped down Fluidsynth version without drivers (not needed atm) -RUN \ - --mount=type=cache,target=/var/cache/apt \ - exit 0 && \ - mkdir -p /tmp/fluid/build && cd /tmp/fluid/ && \ - curl -sfSOL https://github.com/FluidSynth/fluidsynth/archive/v2.2.1.tar.gz && \ - tar xf v2.2.1.tar.gz && rm v2.2.1.tar.gz && cd build && \ - cmake ../fluidsynth-2.2.1 \ - -DCMAKE_INSTALL_PREFIX=/usr/ \ - -DLIB_SUFFIX="/`dpkg-architecture -qDEB_HOST_MULTIARCH`" \ - -Denable-libsndfile=1 \ - -Denable-dbus=0 \ - -Denable-ipv6=0 \ - -Denable-jack=0 \ - -Denable-midishare=0 \ - -Denable-network=0 \ - -Denable-oss=0 \ - -Denable-pulseaudio=0 \ - -Denable-readline=0 \ - -Denable-alsa=0 \ - -Denable-lash=0 && \ - make && make install \ - && apt-get autoremove -y - -# Become non-root, use Github action VM user: uid=1001(runner) gid=127(docker) -RUN groupadd -g 127 docker && useradd -u 1001 -g 127 -m -d /github/home -s /bin/bash runner \ - && echo "runner ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner -USER runner - -# docker build -t ghcr.io/tim-janik/anklang-ci:focal-latest -f misc/Dockerfile.focal misc -# docker run -ti --rm -v $PWD:/hostwd ghcr.io/tim-janik/anklang-ci:focal-latest diff --git a/misc/Dockerfile.jammy b/misc/Dockerfile.jammy deleted file mode 100644 index 1b053d24..00000000 --- a/misc/Dockerfile.jammy +++ /dev/null @@ -1,62 +0,0 @@ -# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0 - -# == Distribution preparation == -FROM ubuntu:22.04 -ENV DEBIAN_FRONTEND noninteractive - -# Use BASH(1) as shell, affects the RUN commands below -RUN ln -sf bash /bin/sh && ls -al /bin/sh - -# Upgrade packages, install dependencies, clean up to shrink Docker image -# Add libXss.so, libgtk-3-0 for Electron -RUN apt-get update \ - && apt-get -y upgrade \ - && apt-get install -y \ - sudo build-essential curl cmake libglib2.0-dev libzstd-dev \ - build-essential pkg-config git ccache unzip gawk \ - castxml cppcheck libboost-system-dev \ - imagemagick librsvg2-bin libxml2-utils libxml2-dev python3 python3-pip \ - python3-lxml python3-pandocfilters pandoc graphviz universal-ctags \ - libasound2-dev libflac-dev libopus-dev libjack-dev \ - libvorbis-dev libmpg123-dev libmp3lame-dev \ - gettext libgconf-2-4 libgtk2.0-dev libgtk-3-dev squashfs-tools zstd \ - libgtk-3-0 libxss1 libgbm1 libnss3 \ - lsb-release wget software-properties-common \ - xvfb twm ffmpeg doxygen \ - && apt-get clean - -# Install recent clang++ -RUN \ - --mount=type=cache,target=/var/cache/apt \ - curl -fsSLO https://apt.llvm.org/llvm.sh && chmod +x llvm.sh \ - && yes | ./llvm.sh 18 && rm -f ./llvm.sh \ - && apt-get install -y clang-tidy-18 libclang-18-dev \ - && update-alternatives \ - --install /usr/bin/clang clang /usr/bin/clang-18 0 \ - --slave /usr/bin/clang++ clang++ /usr/bin/clang++-18 \ - --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 \ - && apt-get autoremove -y - -# Nodejs - https://github.com/nodesource/distributions#nodejs -RUN \ - --mount=type=cache,target=/var/cache/apt \ - mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && rm -f nodesource-repo.gpg.key \ - && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ - && apt-get update \ - && apt-get install -y nodejs \ - && apt-get autoremove -y - -# Install TeX and mkdocs for documentation builds -RUN pip install mkdocs-material mkdoxy poxy \ - && apt-get install -y texlive-xetex fonts-sil-charis texlive-binaries texlive-fonts-extra \ - && apt-get clean - -# Become non-root, use Github action VM user: uid=1001(runner) gid=127(docker) -RUN groupadd -g 127 docker && useradd -u 1001 -g 127 -m -d /github/home -s /bin/bash runner \ - && echo "runner ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner -USER runner - -# docker build -t ghcr.io/tim-janik/anklang-ci:jammy-latest -f misc/Dockerfile.jammy misc -# docker run -ti --rm -v $PWD:/hostwd ghcr.io/tim-janik/anklang-ci:jammy-latest From 09c25d649109ba21bb40b8436e87989e4007f833 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 10 Nov 2024 20:42:46 +0100 Subject: [PATCH 16/17] misc/Dockerfile.noble: show howto set workdir for test runs Signed-off-by: Tim Janik --- misc/Dockerfile.noble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/Dockerfile.noble b/misc/Dockerfile.noble index 13cd6a28..bfb0b20f 100644 --- a/misc/Dockerfile.noble +++ b/misc/Dockerfile.noble @@ -77,4 +77,4 @@ RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu USER ubuntu # docker build -t ghcr.io/tim-janik/anklang-ci:noble-latest -f misc/Dockerfile.noble misc -# docker run -ti --rm -v $PWD:/hostwd ghcr.io/tim-janik/anklang-ci:noble-latest +# docker run -ti --rm -v $PWD:/hostwd -w /hostwd ghcr.io/tim-janik/anklang-ci:noble-latest From 786a9f859dd0de072c7134688d0f5239b39c86a8 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Fri, 15 Nov 2024 03:38:36 +0100 Subject: [PATCH 17/17] .github/workflows/testing.yml: use github-server-url with actions/checkout Signed-off-by: Tim Janik --- .github/workflows/testing.yml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fdb4377e..0d3e22b6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,11 +15,9 @@ jobs: runs-on: ubuntu-latest container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - - name: 'Fetch all tags' - run: | - sed 's,git@github.com:,https://github.com/,' -i .git/config ; # fetch without ssh creds - git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290 + - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive, github-server-url: 'https://github.com' } } + - run: git fetch -f --tags # Fix actions/checkout#290 + - run: git describe --always --long - name: 'Configure build presets' run: | echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk @@ -36,11 +34,9 @@ jobs: runs-on: ubuntu-latest container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - - name: 'Fetch all tags' - run: | - sed 's,git@github.com:,https://github.com/,' -i .git/config ; # fetch without ssh creds - git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290 + - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive, github-server-url: 'https://github.com' } } + - run: git fetch -f --tags # Fix actions/checkout#290 + - run: git describe --always --long - name: 'Configure build presets' run: | echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk @@ -55,11 +51,9 @@ jobs: runs-on: ubuntu-latest container: { image: 'ghcr.io/tim-janik/anklang-ci:arch-latest' } steps: - - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - - name: 'Fetch all tags' - run: | - sed 's,git@github.com:,https://github.com/,' -i .git/config ; # fetch without ssh creds - git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290 + - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive, github-server-url: 'https://github.com' } } + - run: git fetch -f --tags # Fix actions/checkout#290 + - run: git describe --always --long - name: 'Configure build presets' run: | echo 'prefix=/' > config-defaults.mk ;# reset any previous config-defaults.mk @@ -82,11 +76,9 @@ jobs: runs-on: ubuntu-latest container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner } steps: - - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive } } - - name: 'Fetch all tags' - run: | - sed 's,git@github.com:,https://github.com/,' -i .git/config ; # fetch without ssh creds - git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290 + - { uses: actions/checkout@v4.1.1, with: { fetch-depth: 0, submodules: recursive, github-server-url: 'https://github.com' } } + - run: git fetch -f --tags # Fix actions/checkout#290 + - run: git describe --always --long - name: 'Configure build presets' run: | echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk