Skip to content

GITHUB: workflows/testing.yml: fix env syntax for gha #265

GITHUB: workflows/testing.yml: fix env syntax for gha

GITHUB: workflows/testing.yml: fix env syntax for gha #265

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/**']
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
- uses: actions/upload-artifact@v3
if: success()
with: { name: docs, path: out/anklang-docs/ }
- uses: actions/upload-artifact@v3
if: success()
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
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/
Lunar-Clang-Tidy:
runs-on: ubuntu-latest
env:
CITAG: cilunar: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 cilunar:latest -f misc/Dockerfile.lunar misc
tags: cilunar:latest
file: misc/Dockerfile.lunar
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
if: success()
with:
name: clang-tidy
path: out/clang-tidy/
Ping-IRC:
if: always()
needs: [Focal-CI, Arch-Replay, Lunar-Clang-Tidy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Jobs
run: |
echo '${{ needs.Focal-CI.result }}' '${{ needs.Arch-Replay.result }}' '${{ needs.Lunar-Clang-Tidy.result }}'
test success = '${{ needs.Focal-CI.result }}'
test success = '${{ needs.Arch-Replay.result }}'
test success = '${{ needs.Lunar-Clang-Tidy.result }}'
- 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"