Skip to content

MISC: publish.sh: use assets/ directory contents if present #278

MISC: publish.sh: use assets/ directory contents if present

MISC: publish.sh: use assets/ directory contents if present #278

Workflow file for this run

# 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-CI:
runs-on: ubuntu-latest
env:
CITAG: cifocal:latest
steps:
# Checkout and fix actions/checkout messing up annotation of the fetched tag: actions/checkout#290
- uses: actions/checkout@v4
with: { fetch-depth: 0, show-progress: false }
- run: git fetch -f --tags
# Docker build - use BuildKit and Github action API for reliable caching
- uses: docker/[email protected]
- run: docker buildx create --use --driver=docker-container # multi-platform, exports cache, needs --load
- uses: docker/build-push-action@v4
with: # docker build -t cifocal:latest -f misc/Dockerfile.focal misc
tags: cifocal:latest
file: misc/Dockerfile.focal
context: misc/
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
# Build Assets
- name: Build Assets
run: |
time misc/cirun.sh --check --assets --pdf
- uses: actions/upload-artifact@v3
with: { name: assets, path: assets/ }
# Upload http://tim-janik.github.io/docs/anklang
- name: Upload http://tim-janik.github.io/docs/anklang
if: github.ref == 'refs/heads/trunk'
run: |
(umask 0077 && echo "${{ secrets.SSH_ID_GHDOCS4ANKLANG_ECDSA }}" > ~/.id4poxy)
time misc/cirun.sh --poxy-key ~/.id4poxy
- uses: actions/upload-artifact@v3
with: { name: docs, path: out/anklang-docs/ }
Arch-Replay:
runs-on: ubuntu-latest
env:
CITAG: ciarch:latest
steps:
# Checkout and fix actions/checkout messing up annotation of the fetched tag: actions/checkout#290
- uses: actions/checkout@v4
with: { fetch-depth: 0, show-progress: false }
- run: git fetch -f --tags
# Docker build - use BuildKit and Github action API for reliable caching
- uses: docker/[email protected]
- run: docker buildx create --use --driver=docker-container # multi-platform, exports cache, needs --load
- uses: docker/build-push-action@v4
with: # docker build -t ciarch:latest -f misc/Dockerfile.arch misc
tags: ciarch:latest
file: misc/Dockerfile.arch
context: misc/
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
# Run X11 GUI Tests
- name: Run X11 GUI Tests
run: |
time misc/cirun.sh --check --x11
# Artifact upload from x11test
- uses: actions/upload-artifact@v3
if: always()
with:
name: x11test
path: out/x11test/
Focal-Clang-Tidy:
if: ${{ ! contains(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
env:
CITAG: cifocal:latest
steps:
# Checkout and fix actions/checkout messing up annotation of the fetched tag: actions/checkout#290
- uses: actions/checkout@v4
with: { fetch-depth: 0, show-progress: false }
- run: git fetch -f --tags
# Docker build - use BuildKit and Github action API for reliable caching
- uses: docker/[email protected]
- run: docker buildx create --use --driver=docker-container # multi-platform, exports cache, needs --load
- uses: docker/build-push-action@v4
with: # docker build -t cifocal:latest -f misc/Dockerfile.focal misc
tags: cifocal:latest
file: misc/Dockerfile.focal
context: misc/
cache-from: type=gha
# cache-to: type=gha,mode=max
load: true
# Build and Run Clang-Tidy
- name: Build and Run Clang-Tidy
run: |
time misc/cirun.sh --check --clang-tidy
# Artifact upload from clang-tidy
- uses: actions/upload-artifact@v3
with: { name: clang-tidy, path: out/clang-tidy/ }
Release-Upload:
needs: [Focal-CI]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ github.token }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Release Assets
uses: actions/download-artifact@v3
- run: ls -lR assets/
- name: Create Release with Assets
run: misc/publish.sh
Ping-IRC:
if: always()
needs: [Focal-CI, Arch-Replay, Focal-Clang-Tidy, Release-Upload]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Jobs
run: |
echo '${{ needs.Focal-CI.result }}' '${{ needs.Arch-Replay.result }}' '${{ needs.Focal-Clang-Tidy.result }}'
[[ ${{ needs.Focal-CI.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"