mirror of
https://github.com/outbackdingo/hyprcosmic.git
synced 2026-08-25 14:53:21 +00:00
Merge pop-os/cosmic-epoch: become the meta-repo, with two submodules swapped
HyprCosmic started as a repository beside COSMIC holding a config compiler and a
pile of theme assets, with the two modified components hanging off it. That had
the relationship backwards. COSMIC already has a meta-repo whose whole job is to
name every component and build the desktop from them, so the honest shape for a
fork is to be that meta-repo with the components we changed pointing at our
copies -- not a separate tree that assumes the rest of COSMIC arrived some other
way.
So this merges cosmic-epoch in and repoints exactly two of its 29 submodules:
cosmic-comp -> outbackdingo/hyprcosmic-comp
cosmic-session -> outbackdingo/hyprcosmic-session
The other 27 stay on pop-os. Nothing about them needs to change, and pinning
them to copies we do not maintain would be a promise to keep 27 forks current.
`just build` and `just install` now build and install the whole desktop with our
compositor and session in it, which is what "fork COSMIC" ought to mean. The two
forks still install into /usr/libexec/hyprcosmic rather than over /usr/bin, so a
system that already has COSMIC from its distribution keeps that session on the
greeter's menu alongside this one.
Conflict resolutions worth stating:
.github/workflows/ci.yml upstream's kept as-is. It builds the entire desktop
on Arch through `just sysext`, which is precisely
the check a meta-repo wants and is not made less
useful by forking. Our per-distribution workflow
moved to hyprcosmic.yml beside it, the same way it
did in the compositor fork.
.gitmodules upstream's 29 entries, then two URLs rewritten.
cosmic-comp, cosmic-session
ours. Git reports "no merge base" because they are
unrelated to the pop-os commits recorded here,
which is expected: they are different repositories,
not newer commits of the same one.
.gitignore both sides, plus a note that the two forks are
deliberately no longer ignored.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Pop!_OS 24.04]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,61 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: cosmic-applets
|
||||
url: https://github.com/pop-os/cosmic-applets/issues
|
||||
about: Concern all the applets living in the dock or the panel.
|
||||
|
||||
- name: cosmic-comp
|
||||
url: https://github.com/pop-os/cosmic-comp/issues
|
||||
about: Responsible for composing your windows on the screen. If you see issues with the tilling features or your multiple displays, this is likely the place to go.
|
||||
|
||||
- name: cosmic-edit
|
||||
url: https://github.com/pop-os/cosmic-edit/issues
|
||||
about: This is the issue tracker for COSMIC Text Editor. If you see issues with the text editor, report them here.
|
||||
|
||||
- name: cosmic-files
|
||||
url: https://github.com/pop-os/cosmic-files/issues
|
||||
about: This is the issue tracker for COSMIC Files. If you see issues while navigating files, this is the place to go.
|
||||
|
||||
- name: cosmic-settings
|
||||
url: https://github.com/pop-os/cosmic-settings/issues
|
||||
about: This is the issue tracker for COSMIC Settings. If you see issues while changing settings, this is the place to go.
|
||||
|
||||
- name: cosmic-store
|
||||
url: https://github.com/pop-os/cosmic-store/issues
|
||||
about: This is the issue tracker for COSMIC Store. If you see issues with the app store, report them here.
|
||||
|
||||
- name: cosmic-term
|
||||
url: https://github.com/pop-os/cosmic-term/issues
|
||||
about: This is the issue tracker for COSMIC Terminal. If you see issues with the terminal, report them here.
|
||||
|
||||
- name: cosmic-panel
|
||||
url: https://github.com/pop-os/cosmic-panel/issues
|
||||
about: Contains the code to manage the dock and panel applets. You can see it as the compositor of applets. It is also responsible to draw the panel and dock at the right place (bottom, left, ect..).
|
||||
|
||||
- name: cosmic-screenshot
|
||||
url: https://github.com/pop-os/cosmic-screenshot/issues
|
||||
about: This is the tool that help you take screenshots.
|
||||
|
||||
- name: cosmic-workspaces-epoch
|
||||
url: https://github.com/pop-os/cosmic-workspaces-epoch/issues
|
||||
about: Responsible for the workspace overview. If you have an issue with workspaces, this is the place to go.
|
||||
|
||||
- name: cosmic-greeter
|
||||
url: https://github.com/pop-os/cosmic-greeter/issues
|
||||
about: When your session is locked, or not opened yet, this is the window that will be shown. Basically the login screen.
|
||||
|
||||
- name: cosmic-osd
|
||||
url: https://github.com/pop-os/cosmic-osd/issues
|
||||
about: Cosmic on screen display. This is for example, the audio notification when you change the volume, or the brightness one.
|
||||
|
||||
- name: cosmic-applibrary
|
||||
url: https://github.com/pop-os/cosmic-applibrary/issues
|
||||
about: It is the application launched with super-a, that let you see what app are in your system, and launch them.
|
||||
|
||||
- name: cosmic-launcher
|
||||
url: https://github.com/pop-os/cosmic-launcher/issues
|
||||
about: Launched with the super key. It lets you search in your application, and display the result in a list.
|
||||
|
||||
- name: cosmic-bg
|
||||
url: https://github.com/pop-os/cosmic-bg/issues
|
||||
about: If you notice issues with the wallpaper, this is the place to go.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,8 @@
|
||||
- [ ] I have disclosed use of any AI generated code in my commit messages.
|
||||
- If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
|
||||
- In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
|
||||
- [ ] I understand these changes in full and will be able to respond to review comments.
|
||||
- [ ] My change is accurately described in the commit message.
|
||||
- [ ] My contribution is tested and working as described.
|
||||
- [ ] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions.
|
||||
|
||||
+47
-188
@@ -1,197 +1,56 @@
|
||||
# Build and check the parts of HyprCosmic that are not one of the two forks:
|
||||
# cosmic-conf, the shared waybar/rofi assets, and the installer that places them.
|
||||
# Use Arch to test build outside of Ubuntu/Pop.
|
||||
#
|
||||
# Two jobs with different shapes on purpose. cosmic-conf is compiled code and
|
||||
# gets the same per-distribution matrix the forks do. The assets are text, and
|
||||
# text does not care which distribution it is on -- what matters there is whether
|
||||
# generated files are still in step with their generator, which is a single
|
||||
# question with a single answer.
|
||||
# Tests with recent version of dependencies. Another testson a different
|
||||
# distro could be used to test for lowest supported.
|
||||
#
|
||||
# A minimal image should also help to confirm what dependencies are needed.
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 7 * * *' # Midnight MST daily
|
||||
|
||||
jobs:
|
||||
cosmic-conf:
|
||||
name: cosmic-conf (${{ matrix.distro }})
|
||||
Test:
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.image }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: fedora
|
||||
image: fedora:latest
|
||||
- distro: debian
|
||||
image: debian:bookworm
|
||||
- distro: arch
|
||||
image: archlinux:latest
|
||||
|
||||
container:
|
||||
image: archlinux:base-devel
|
||||
volumes:
|
||||
- /:/host
|
||||
steps:
|
||||
# Before checkout: actions/checkout needs git and these images are bare.
|
||||
- name: Install build dependencies (fedora)
|
||||
if: matrix.distro == 'fedora'
|
||||
run: dnf -y install --setopt=install_weak_deps=False git curl gcc
|
||||
|
||||
- name: Install build dependencies (debian)
|
||||
if: matrix.distro == 'debian'
|
||||
run: |
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
git curl ca-certificates build-essential
|
||||
|
||||
- name: Install build dependencies (arch)
|
||||
if: matrix.distro == 'arch'
|
||||
run: pacman -Syu --noconfirm --needed git curl base-devel
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
||||
| sh -s -- -y --default-toolchain stable --profile minimal \
|
||||
--component clippy
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: cosmic-conf
|
||||
key: ${{ matrix.distro }}
|
||||
|
||||
- name: Test
|
||||
working-directory: cosmic-conf
|
||||
run: cargo test --locked
|
||||
|
||||
# Warnings are errors here because the alternative is a build log nobody
|
||||
# reads and a lint that has been failing for six months.
|
||||
- name: Clippy
|
||||
working-directory: cosmic-conf
|
||||
run: cargo clippy --all-targets --locked -- -D warnings
|
||||
|
||||
- name: Build
|
||||
working-directory: cosmic-conf
|
||||
run: cargo build --release --locked
|
||||
|
||||
# The end-to-end question the unit tests cannot ask: does the cosmic.conf
|
||||
# this repository actually ships still parse and resolve? A schema change
|
||||
# that invalidates the shipped config would pass every test in the crate
|
||||
# and break every user on first login.
|
||||
#
|
||||
# HOME is redirected so the resolution reports against an empty config
|
||||
# tree rather than the runner's own. The binary is run directly instead of
|
||||
# through `cargo run`: cargo keys its registry cache on HOME, so moving
|
||||
# HOME would send it off to re-download every dependency into a directory
|
||||
# the cache action does not know about.
|
||||
#
|
||||
# --diff writes nothing, and the last two lines hold it to that.
|
||||
- name: The shipped cosmic.conf still resolves
|
||||
working-directory: cosmic-conf
|
||||
run: |
|
||||
set -eux
|
||||
fake="$RUNNER_TEMP/fakehome"
|
||||
rm -rf "$fake"
|
||||
mkdir -p "$fake/.config"
|
||||
env HOME="$fake" XDG_CONFIG_HOME="$fake/.config" \
|
||||
./target/release/cosmic-conf apply --diff --config ../config/cosmic.conf
|
||||
test -z "$(find "$fake" -type f -print -quit)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cosmic-conf-${{ matrix.distro }}
|
||||
path: cosmic-conf/target/release/cosmic-conf
|
||||
retention-days: 14
|
||||
|
||||
assets:
|
||||
name: assets and installer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Submodules because tools/install-assets.sh also places the session entry
|
||||
# point, which is versioned in the cosmic-session fork. The script degrades
|
||||
# gracefully when that checkout is absent -- it warns and skips those two
|
||||
# files -- so this still passes before the submodules exist, just with less
|
||||
# covered.
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# config.jsonc is generated, and the repository's rule is that it is never
|
||||
# hand-edited: every Nerd Font glyph in it comes from a codepoint table in
|
||||
# generate-config.py, because Private Use Area characters are destroyed by
|
||||
# being retyped and indistinguishable in a diff. That rule is currently
|
||||
# enforced by remembering it. This enforces it instead -- regenerate, and
|
||||
# the file must not move.
|
||||
- name: The generated waybar config is in step with its generator
|
||||
run: |
|
||||
set -eux
|
||||
python3 config/waybar/generate-config.py \
|
||||
config/waybar/config.jsonc.in config/waybar/config.jsonc
|
||||
git diff --exit-code -- config/waybar/config.jsonc
|
||||
|
||||
# No PUA character may reach the template or the generator's own source.
|
||||
# The generator refuses to emit non-ASCII, but nothing stopped one being
|
||||
# pasted into its inputs until here.
|
||||
#
|
||||
# Written as an `if` rather than `! grep ...` because grep exits 1 for "no
|
||||
# match" and 2 for "no such file", and negating it would turn a vanished
|
||||
# file into a pass -- the check would quietly stop checking anything.
|
||||
- name: The template and generator stay pure ASCII
|
||||
run: |
|
||||
set -eu
|
||||
for f in config/waybar/config.jsonc.in config/waybar/generate-config.py; do
|
||||
test -f "$f"
|
||||
if LC_ALL=C grep -Pn '[^\x00-\x7F]' "$f"; then
|
||||
echo "$f: non-ASCII above. Glyphs belong in the codepoint table," \
|
||||
"not in the template." >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# A login-time script with a syntax error is a black screen with nowhere to
|
||||
# print the reason.
|
||||
- name: Syntax-check the shell scripts
|
||||
run: |
|
||||
set -eux
|
||||
bash -n config/bin/hyprcosmic-powermenu
|
||||
bash -n tools/install-assets.sh
|
||||
|
||||
# Both scripts are shellcheck-clean today, so this starts as a ratchet
|
||||
# rather than a backlog. The runner image ships shellcheck; the install is
|
||||
# there so that stopping to be true is a slow step and not a broken job.
|
||||
- name: Shellcheck
|
||||
run: |
|
||||
set -eux
|
||||
command -v shellcheck >/dev/null || {
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends shellcheck
|
||||
}
|
||||
shellcheck config/bin/hyprcosmic-powermenu tools/install-assets.sh
|
||||
|
||||
# A round trip. Installing into a staging root and then asking --check to
|
||||
# confirm it exercises both halves of the script against each other, and
|
||||
# the audit it runs first refuses to proceed at all unless every file under
|
||||
# config/ is classified as shared, per-user or a generator input. That
|
||||
# audit is the real test: it is what stops a new file being silently left
|
||||
# out of the install.
|
||||
- name: Install into a staging root, then verify it
|
||||
run: |
|
||||
set -eux
|
||||
DESTDIR="$PWD/stage" ./tools/install-assets.sh
|
||||
DESTDIR="$PWD/stage" ./tools/install-assets.sh --check
|
||||
find stage -type f -printf '%M %10s %P\n'
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hyprcosmic-assets
|
||||
path: stage/
|
||||
retention-days: 14
|
||||
- run: >
|
||||
pacman --noconfirm --needed -Syu
|
||||
cargo
|
||||
clang
|
||||
desktop-file-utils
|
||||
git
|
||||
gtk3
|
||||
gtk4
|
||||
just
|
||||
libdisplay-info
|
||||
libinput
|
||||
libxkbcommon
|
||||
llvm
|
||||
mesa
|
||||
meson
|
||||
pipewire
|
||||
pulseaudio
|
||||
seatd
|
||||
wayland
|
||||
lld
|
||||
expat
|
||||
fontconfig
|
||||
freetype2
|
||||
flatpak
|
||||
nasm
|
||||
- run: rm -rf /host/usr/local/lib/android # Free space
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
# Safe directory behavior seems to have issues with `container:`
|
||||
# https://github.com/actions/checkout/issues/915
|
||||
- run: git config --global --add safe.directory '*'
|
||||
- run: just sysext
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
# Build and check the parts of HyprCosmic that are not one of the two forks:
|
||||
# cosmic-conf, the shared waybar/rofi assets, and the installer that places them.
|
||||
#
|
||||
# Two jobs with different shapes on purpose. cosmic-conf is compiled code and
|
||||
# gets the same per-distribution matrix the forks do. The assets are text, and
|
||||
# text does not care which distribution it is on -- what matters there is whether
|
||||
# generated files are still in step with their generator, which is a single
|
||||
# question with a single answer.
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
cosmic-conf:
|
||||
name: cosmic-conf (${{ matrix.distro }})
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.image }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: fedora
|
||||
image: fedora:latest
|
||||
- distro: debian
|
||||
image: debian:bookworm
|
||||
- distro: arch
|
||||
image: archlinux:latest
|
||||
|
||||
steps:
|
||||
# Before checkout: actions/checkout needs git and these images are bare.
|
||||
- name: Install build dependencies (fedora)
|
||||
if: matrix.distro == 'fedora'
|
||||
run: dnf -y install --setopt=install_weak_deps=False git curl gcc
|
||||
|
||||
- name: Install build dependencies (debian)
|
||||
if: matrix.distro == 'debian'
|
||||
run: |
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
git curl ca-certificates build-essential
|
||||
|
||||
- name: Install build dependencies (arch)
|
||||
if: matrix.distro == 'arch'
|
||||
run: pacman -Syu --noconfirm --needed git curl base-devel
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
||||
| sh -s -- -y --default-toolchain stable --profile minimal \
|
||||
--component clippy
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: cosmic-conf
|
||||
key: ${{ matrix.distro }}
|
||||
|
||||
- name: Test
|
||||
working-directory: cosmic-conf
|
||||
run: cargo test --locked
|
||||
|
||||
# Warnings are errors here because the alternative is a build log nobody
|
||||
# reads and a lint that has been failing for six months.
|
||||
- name: Clippy
|
||||
working-directory: cosmic-conf
|
||||
run: cargo clippy --all-targets --locked -- -D warnings
|
||||
|
||||
- name: Build
|
||||
working-directory: cosmic-conf
|
||||
run: cargo build --release --locked
|
||||
|
||||
# The end-to-end question the unit tests cannot ask: does the cosmic.conf
|
||||
# this repository actually ships still parse and resolve? A schema change
|
||||
# that invalidates the shipped config would pass every test in the crate
|
||||
# and break every user on first login.
|
||||
#
|
||||
# HOME is redirected so the resolution reports against an empty config
|
||||
# tree rather than the runner's own. The binary is run directly instead of
|
||||
# through `cargo run`: cargo keys its registry cache on HOME, so moving
|
||||
# HOME would send it off to re-download every dependency into a directory
|
||||
# the cache action does not know about.
|
||||
#
|
||||
# --diff writes nothing, and the last two lines hold it to that.
|
||||
- name: The shipped cosmic.conf still resolves
|
||||
working-directory: cosmic-conf
|
||||
run: |
|
||||
set -eux
|
||||
fake="$RUNNER_TEMP/fakehome"
|
||||
rm -rf "$fake"
|
||||
mkdir -p "$fake/.config"
|
||||
env HOME="$fake" XDG_CONFIG_HOME="$fake/.config" \
|
||||
./target/release/cosmic-conf apply --diff --config ../config/cosmic.conf
|
||||
test -z "$(find "$fake" -type f -print -quit)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cosmic-conf-${{ matrix.distro }}
|
||||
path: cosmic-conf/target/release/cosmic-conf
|
||||
retention-days: 14
|
||||
|
||||
assets:
|
||||
name: assets and installer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Submodules because tools/install-assets.sh also places the session entry
|
||||
# point, which is versioned in the cosmic-session fork. The script degrades
|
||||
# gracefully when that checkout is absent -- it warns and skips those two
|
||||
# files -- so this still passes before the submodules exist, just with less
|
||||
# covered.
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# config.jsonc is generated, and the repository's rule is that it is never
|
||||
# hand-edited: every Nerd Font glyph in it comes from a codepoint table in
|
||||
# generate-config.py, because Private Use Area characters are destroyed by
|
||||
# being retyped and indistinguishable in a diff. That rule is currently
|
||||
# enforced by remembering it. This enforces it instead -- regenerate, and
|
||||
# the file must not move.
|
||||
- name: The generated waybar config is in step with its generator
|
||||
run: |
|
||||
set -eux
|
||||
python3 config/waybar/generate-config.py \
|
||||
config/waybar/config.jsonc.in config/waybar/config.jsonc
|
||||
git diff --exit-code -- config/waybar/config.jsonc
|
||||
|
||||
# No PUA character may reach the template or the generator's own source.
|
||||
# The generator refuses to emit non-ASCII, but nothing stopped one being
|
||||
# pasted into its inputs until here.
|
||||
#
|
||||
# Written as an `if` rather than `! grep ...` because grep exits 1 for "no
|
||||
# match" and 2 for "no such file", and negating it would turn a vanished
|
||||
# file into a pass -- the check would quietly stop checking anything.
|
||||
- name: The template and generator stay pure ASCII
|
||||
run: |
|
||||
set -eu
|
||||
for f in config/waybar/config.jsonc.in config/waybar/generate-config.py; do
|
||||
test -f "$f"
|
||||
if LC_ALL=C grep -Pn '[^\x00-\x7F]' "$f"; then
|
||||
echo "$f: non-ASCII above. Glyphs belong in the codepoint table," \
|
||||
"not in the template." >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# A login-time script with a syntax error is a black screen with nowhere to
|
||||
# print the reason.
|
||||
- name: Syntax-check the shell scripts
|
||||
run: |
|
||||
set -eux
|
||||
bash -n config/bin/hyprcosmic-powermenu
|
||||
bash -n tools/install-assets.sh
|
||||
|
||||
# Both scripts are shellcheck-clean today, so this starts as a ratchet
|
||||
# rather than a backlog. The runner image ships shellcheck; the install is
|
||||
# there so that stopping to be true is a slow step and not a broken job.
|
||||
- name: Shellcheck
|
||||
run: |
|
||||
set -eux
|
||||
command -v shellcheck >/dev/null || {
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends shellcheck
|
||||
}
|
||||
shellcheck config/bin/hyprcosmic-powermenu tools/install-assets.sh
|
||||
|
||||
# A round trip. Installing into a staging root and then asking --check to
|
||||
# confirm it exercises both halves of the script against each other, and
|
||||
# the audit it runs first refuses to proceed at all unless every file under
|
||||
# config/ is classified as shared, per-user or a generator input. That
|
||||
# audit is the real test: it is what stops a new file being silently left
|
||||
# out of the install.
|
||||
- name: Install into a staging root, then verify it
|
||||
run: |
|
||||
set -eux
|
||||
DESTDIR="$PWD/stage" ./tools/install-assets.sh
|
||||
DESTDIR="$PWD/stage" ./tools/install-assets.sh --check
|
||||
find stage -type f -printf '%M %10s %P\n'
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hyprcosmic-assets
|
||||
path: stage/
|
||||
retention-days: 14
|
||||
Reference in New Issue
Block a user