mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 06:15:03 +02:00
fix: shellcheck warnings
This commit is contained in:
parent
d3138aa594
commit
aa70fc8090
89
.github/workflows/push.yml
vendored
Normal file
89
.github/workflows/push.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
name: Test Build
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
spellcheck:
|
||||
name: Check Grammar
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: "codespell"
|
||||
version: 1.0
|
||||
- run: codespell
|
||||
|
||||
shellcheck:
|
||||
name: Shell Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/check_build@v4
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: "shellcheck"
|
||||
version: 1.0
|
||||
- run: shellcheck -P $(find . -type f -name '*.sh' -not -path './assets/pkg/aur/*/src/*')
|
||||
|
||||
check_build:
|
||||
permissions: write-all
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch_name: x86_64
|
||||
cc: gcc
|
||||
cflags:
|
||||
- arch_name: x86
|
||||
cc: gcc
|
||||
cflags: -m32
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: myrotvorets/set-commit-status-action@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: pending
|
||||
context: Build (${{ matrix.arch_name }})
|
||||
|
||||
- name: Attempt Build (${{ matrix.arch_name }})
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
arch_name: ${{ matrix.arch_name }}
|
||||
cc: ${{ matrix.cc }}
|
||||
cflags: "-Wall ${{ matrix.cflags }}"
|
||||
|
||||
- name: Download Build Results
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-${{ matrix.arch_name }}
|
||||
path: build-results
|
||||
|
||||
- name: Process Results
|
||||
id: get-stats
|
||||
if: always()
|
||||
run: |
|
||||
if ! [ -d "build-results" ]; then
|
||||
# Build failed
|
||||
echo "DESCR=" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
# Build Succeeded
|
||||
cd "build-results"
|
||||
ls -lah
|
||||
cat stderr-* >&2
|
||||
WARNS="$(cat stderr-* | grep '^[^ ]*\.[ch]:' | wc -l)"
|
||||
HSIZE="$(stat --printf="%s" lidm-* | numfmt --to=iec-i)B"
|
||||
|
||||
echo "DESCR='$HSIZE, $WARNS warnings'" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Set final commit status
|
||||
uses: myrotvorets/set-commit-status-action@master
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: ${{ job.status }}
|
||||
context: Build (${{ matrix.arch_name }})
|
||||
description: ${{ steps.get-stats.outputs.DESCR }}
|
@ -1,4 +1,4 @@
|
||||
#/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
MYSELF=$(realpath "$0")
|
||||
|
@ -1,4 +1,4 @@
|
||||
#/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
MYSELF=$(realpath "$0")
|
||||
@ -8,7 +8,7 @@ for pkg in "$MYDIR"/*/; do
|
||||
cd "$pkg"
|
||||
printf "\x1b[1mEntering '%s'\x1b[0m\n" "$pkg"
|
||||
|
||||
rm -rf *.{gz,zst} src pkg
|
||||
rm -rf ./*.{gz,zst} src pkg
|
||||
makepkg -f .
|
||||
|
||||
echo
|
||||
|
Loading…
x
Reference in New Issue
Block a user