Skip to content

Commit

Permalink
Merge branch 'move-ci-to-noble'
Browse files Browse the repository at this point in the history
* Branch commit log:
  .github/workflows/testing.yml: use github-server-url with actions/checkout
  misc/Dockerfile.noble: show howto set workdir for test runs
  misc/Dockerfile.focal, misc/Dockerfile.jammy: remove unused files
  doc/copyright.ini: add doc/poxy-0.19.1.diff
  misc/mkcopyright.py: fix pattern syntax
  doc/Makefile.mk: abort on files without copyright info
  misc/mkcopyright.py: -e: abort early when a license cannot be determined
  .github/workflows/testing.yml: apply doc/poxy-0.19.1.diff before building docs
  doc/poxy-0.19.1.diff: fix poxy-0.19.1 interaction with doxygen-1.9.8
  .github/workflows/testing.yml: run containers with --user runner
  .github/workflows/testing.yml: upgrade build env from Focal to Noble
  Makefile.mk: only use universal-ctags which is more robust than etags
	* Check for universal-ctags, make empty TAGS if not present
  .github/workflows/pages.yml: fix spaces
  .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
  misc/Dockerfile.noble: provide Ubuntu 24.04 build environment
  Makefile.mk: use syntax compatible with etags and ctags
  Makefile.mk: create ./TAGS in project root if requested

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Nov 15, 2024
2 parents 3593b60 + 786a9f8 commit b39578d
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 240 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '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/
- 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 } ]
51 changes: 22 additions & 29 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ 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', options: --user runner }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- { uses: actions/[email protected], 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
Expand All @@ -34,31 +32,28 @@ 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', options: --user runner }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- { uses: actions/[email protected], 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
- name: 'Upload API Docs' # http://tim-janik.github.io/docs/anklang
run: |
make -j`nproc` all
(umask 0077 && cat <<< "${{ secrets.SSH_ID_GHDOCS4ANKLANG_ECDSA }}" > .git/.ssh_id_ghdocs4anklang)
(cd / && sudo patch -t -p0) <doc/poxy-0.19.1.diff
doc/poxy.sh -b -u
ArchReplay:
runs-on: ubuntu-latest
container: { image: 'ghcr.io/tim-janik/anklang-ci:arch-latest' }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- { uses: actions/[email protected], 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
Expand All @@ -76,16 +71,14 @@ 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', options: --user runner }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- { uses: actions/[email protected], 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
Expand All @@ -106,18 +99,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/[email protected], 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: |
Expand Down
9 changes: 6 additions & 3 deletions Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,15 @@ $>/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 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
ln -sf $>/TAGS TAGS

# == compile_commands.json ==
compile_commands.json: Makefile.mk
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 ; \
Expand Down
5 changes: 3 additions & 2 deletions doc/copyright.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
11 changes: 11 additions & 0 deletions doc/poxy-0.19.1.diff
Original file line number Diff line number Diff line change
@@ -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)
109 changes: 0 additions & 109 deletions misc/Dockerfile.focal

This file was deleted.

62 changes: 0 additions & 62 deletions misc/Dockerfile.jammy

This file was deleted.

Loading

0 comments on commit b39578d

Please sign in to comment.