π Add changelog entries #490
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
# SPDX-FileCopyrightText: Simon Schneegans <[email protected]> | |
# SPDX-License-Identifier: CC0-1.0 | |
name: Checks | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
clang_format: | |
name: Check Clang-Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Download Clang-Format | |
run: | | |
sudo apt update -qq | |
sudo apt install clang-format -qq | |
- name: Run Clang-Format | |
run: scripts/clang-format.sh | |
- name: Compare Results | |
run: | | |
DIFF=$(git diff) | |
if [ ! -z "$DIFF" ]; then echo $DIFF && exit 1; fi | |
reuse: | |
name: Check Compliance with REUSE Specification | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v1 | |
comment_percentage: | |
name: Check Comment Percentage | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Checkout Current Repository | |
uses: actions/checkout@v3 | |
with: | |
path: current | |
ref: ${{ github.ref }} | |
- name: Checkout Base Repository | |
uses: actions/checkout@v3 | |
with: | |
path: base | |
ref: ${{ github.base_ref }} | |
- name: Download Cloc | |
run: | | |
sudo apt update -qq | |
sudo apt install cloc -qq | |
- name: Run Cloc | |
run: | | |
BASE="$(base/scripts/cloc.sh --percentage-only)" | |
CURRENT="$(current/scripts/cloc.sh --percentage-only)" | |
echo "Percentage of Comments in Base Repository: $BASE" | |
echo "Percentage of Comments after Merge: $CURRENT" | |
if (( $(echo "$BASE > $CURRENT" |bc -l) )) | |
then | |
awk -v a=$CURRENT -v b=$BASE 'BEGIN {printf "Percentage decreased! (%3.4f%)\n", (a-b)}' | |
exit 1 | |
else | |
awk -v a=$CURRENT -v b=$BASE 'BEGIN {printf "Percentage increased! (%3.4f%)\n", (a-b)}' | |
fi | |
shellcheck: | |
name: Run ShellCheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run ShellCheck | |
run: | | |
find $GITHUB_WORKSPACE -type f -and \( -name "*.sh" \) | xargs shellcheck | |
build: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name == 'pull_request' || | |
( contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[no-ci]') ) || | |
contains(github.event.head_commit.message, '[run-ci]') | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "rawhide" | |
session: | |
- "gnome-xsession" | |
- "gnome-wayland-nested" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download Dependencies | |
run: | | |
sudo apt update -qq | |
sudo apt install gettext -qq | |
- name: Build Desktop Cube | |
run: make | |
- name: Test Desktop Cube | |
run: sudo $GITHUB_WORKSPACE/tests/run-test.sh -v ${{ matrix.version }} -s ${{ matrix.session }} | |
- uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: log_${{ matrix.version }}_${{ matrix.session }} | |
path: fail.log | |
- uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: screen_${{ matrix.version }}_${{ matrix.session }} | |
path: fail.png |