Merge branch 'error-notices' #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0 | |
# Linting: xclip -sel c <.github/workflows/testing.yml # https://rhysd.github.io/actionlint/ | |
on: | |
push: | |
branches: [ 'trunk', 'next', 'wip/**' ] | |
# tags: [ 'v[0-9]+.[0-9]+.[0-9]+*' ] | |
pull_request: | |
branches: [ 'trunk', 'next' ] | |
jobs: | |
Focal-Assets: | |
runs-on: ubuntu-latest | |
env: { CICACHE: "/tmp/cicache", CITAG: "focal" } | |
steps: | |
- uses: actions/[email protected] | |
with: { fetch-depth: 0 } | |
- run: | | |
git fetch -f --tags # Fix actions/checkout annotated tag mess; actions/checkout#290 | |
git submodule update --init --recursive | |
- uses: actions/cache@v4 | |
with: { path: "/tmp/cicache", key: "cifocal-${{hashFiles ('misc/Dockerfile.focal')}}" } | |
- name: 'Prepare Docker Image' | |
run: | | |
echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk | |
misc/cirun -u 1000 misc/version.sh | |
- name: 'Build Dist Assets' | |
run: | | |
misc/cirun -u 1000 make mkassets | |
- uses: actions/upload-artifact@v4 | |
with: { name: assets, path: assets/ } | |
- uses: actions/upload-artifact@v4 | |
with: { name: dist-tarball, path: assets/*.tar* } | |
- name: 'Upload API Docs' # http://tim-janik.github.io/docs/anklang | |
if: github.repository == 'tim-janik/anklang' && github.ref == 'refs/heads/trunk' | |
run: | | |
misc/cirun -u 1000 make -j`nproc` all | |
(umask 0077 && cat <<< "${{ secrets.SSH_ID_GHDOCS4ANKLANG_ECDSA }}" > .git/.ssh_id_ghdocs4anklang) | |
misc/cirun -u 1000 doc/poxy.sh -b -u | |
Arch-Replay: | |
runs-on: ubuntu-latest | |
env: { CICACHE: "/tmp/cicache", CITAG: "arch" } | |
steps: | |
- uses: actions/[email protected] | |
with: { fetch-depth: 0 } | |
- run: | | |
git fetch -f --tags # Fix actions/checkout annotated tag mess; actions/checkout#290 | |
git submodule update --init --recursive | |
- uses: actions/cache@v4 | |
with: { path: "/tmp/cicache", key: "ciarch-${{hashFiles ('misc/Dockerfile.arch')}}" } | |
- name: 'Prepare Docker Image' | |
run: | | |
# Test the most recent g++ via Arch | |
echo -e ' prefix=/\n' > config-defaults.mk | |
misc/cirun -u 1000 misc/version.sh | |
- name: 'Run X11 GUI Tests' | |
run: | | |
misc/cirun -u 1000 make GCC_COLORS="" -j`nproc` all | |
misc/cirun -u 1000 make -j`nproc` check | |
misc/cirun -u 1000 make x11test-v | |
# Artifact upload from x11test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: { name: "x11test", path: "out/x11test/" } | |
Focal-Clang-Tidy: | |
if: ${{ ! contains(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-latest | |
env: { CICACHE: "/tmp/cicache", CITAG: "focal" } | |
steps: | |
- uses: actions/[email protected] | |
with: { fetch-depth: 0 } | |
- run: | | |
git fetch -f --tags # Fix actions/checkout annotated tag mess; actions/checkout#290 | |
git submodule update --init --recursive | |
- uses: actions/cache@v4 | |
with: { path: "/tmp/cicache", key: "cifocal-${{hashFiles ('misc/Dockerfile.focal')}}" } | |
- name: 'Prepare Docker Image' | |
run: | | |
echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk | |
misc/cirun -u 1000 misc/version.sh | |
- name: 'Make all check' | |
run: | | |
misc/cirun -u 1000 make -j`nproc` all | |
misc/cirun -u 1000 make -j`nproc` check | |
- name: 'Make clang-tidy' | |
run: | | |
misc/cirun -u 1000 make -j`nproc` clang-tidy | |
# Artifact upload from clang-tidy | |
- uses: actions/upload-artifact@v4 | |
with: { name: clang-tidy, path: out/clang-tidy/ } | |
- name: 'Make branch-check' | |
# Use non-0 exit status for a failing branch-check on PRs | |
run: | | |
test -z "${{ github.event.pull_request }}" || BRANCH_CHECK_EXIT=77 | |
misc/cirun -u 1000 make branch-check BRANCH_CHECK_EXIT=$BRANCH_CHECK_EXIT | |
Ping-IRC: | |
if: always() | |
needs: [Focal-Assets, Arch-Replay, Focal-Clang-Tidy] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: { fetch-depth: 0 } | |
- run: | | |
git fetch -f --tags # Fix actions/checkout annotated tag mess; actions/checkout#290 | |
git submodule update --init --recursive | |
- name: Check Jobs | |
run: | | |
echo '${{ needs.Focal-Assets.result }}' '${{ needs.Arch-Replay.result }}' '${{ needs.Focal-Clang-Tidy.result }}' | |
[[ ${{ needs.Focal-Assets.result }} =~ success|skipped ]] | |
[[ ${{ needs.Arch-Replay.result }} =~ success|skipped ]] | |
[[ ${{ needs.Focal-Clang-Tidy.result }} =~ success|skipped ]] | |
- name: Ping IRC | |
if: always() | |
run: | | |
R='${{ github.repository }}' && R=${R#*/} | |
B='${{ github.ref }}' && B=${B#refs/heads/} | |
S='${{ job.status }}' && URL='${{ github.event.head_commit.url }}' | |
U='${{ github.actor }}' && B="$(git branch --show-current)" | |
MSG=$(git log -1 --format='%s') | |
.github/workflows/ircbot.py -q -j "#Anklang" -R "$R" -U "$U" -D "$B" -S "$S" "$MSG" "$URL" |