mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -04:00
Remove code formatting checks from both workflows
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
This commit is contained in:
parent
8de9685457
commit
b1438b7e71
3 changed files with 15 additions and 55 deletions
39
.github/workflows/README.md
vendored
39
.github/workflows/README.md
vendored
|
|
@ -7,7 +7,7 @@ This directory contains the GitHub Actions workflows for the MangoWC project.
|
||||||
### build-arch.yml
|
### build-arch.yml
|
||||||
|
|
||||||
**Purpose**: Builds the project on Arch Linux to ensure code changes compile
|
**Purpose**: Builds the project on Arch Linux to ensure code changes compile
|
||||||
successfully and code is properly formatted.
|
successfully.
|
||||||
|
|
||||||
**Triggers**:
|
**Triggers**:
|
||||||
|
|
||||||
|
|
@ -25,13 +25,12 @@ successfully and code is properly formatted.
|
||||||
**What it does**:
|
**What it does**:
|
||||||
|
|
||||||
1. Runs in Arch Linux container (archlinux:latest)
|
1. Runs in Arch Linux container (archlinux:latest)
|
||||||
2. Checks C/C++ code formatting with clang-format
|
2. Updates system and installs all dependencies via pacman
|
||||||
3. Updates system and installs all dependencies via pacman
|
3. Installs wlroots from official Arch repositories
|
||||||
4. Installs wlroots from official Arch repositories
|
4. Installs scenefx from AUR (Arch User Repository)
|
||||||
5. Installs scenefx from AUR (Arch User Repository)
|
5. Configures the project with meson
|
||||||
6. Configures the project with meson
|
6. Builds the project with ninja
|
||||||
7. Builds the project with ninja
|
7. Verifies the executables were created
|
||||||
8. Verifies the executables were created
|
|
||||||
|
|
||||||
**Build Strategy**:
|
**Build Strategy**:
|
||||||
|
|
||||||
|
|
@ -40,15 +39,9 @@ successfully and code is properly formatted.
|
||||||
- wlroots installed from official Arch repositories
|
- wlroots installed from official Arch repositories
|
||||||
- scenefx installed from AUR
|
- scenefx installed from AUR
|
||||||
|
|
||||||
**Code Quality Checks**:
|
|
||||||
|
|
||||||
- Validates C/C++ code formatting with clang-format (LLVM style with tabs)
|
|
||||||
- Fails if code doesn't match the formatting defined in `.clang-format`
|
|
||||||
|
|
||||||
**Dependencies**:
|
**Dependencies**:
|
||||||
|
|
||||||
- Arch Linux container (archlinux:latest)
|
- Arch Linux container (archlinux:latest)
|
||||||
- clang-format for code formatting checks
|
|
||||||
- Meson build system
|
- Meson build system
|
||||||
- Ninja build tool
|
- Ninja build tool
|
||||||
- All system packages from pacman (wayland, libinput, wlroots, mesa, etc.)
|
- All system packages from pacman (wayland, libinput, wlroots, mesa, etc.)
|
||||||
|
|
@ -76,11 +69,10 @@ changes work correctly in the NixOS ecosystem.
|
||||||
**What it does**:
|
**What it does**:
|
||||||
|
|
||||||
1. Runs on Ubuntu with Nix installed
|
1. Runs on Ubuntu with Nix installed
|
||||||
2. Validates the flake with `nix flake check`
|
2. Installs Nix with flakes and nix-command experimental features
|
||||||
3. Checks Nix code formatting with alejandra (the formatter defined in flake.nix)
|
3. Builds the project using `nix build` with the repository's flake.nix
|
||||||
4. Builds the project using `nix build` with the repository's flake.nix
|
4. Verifies that executables (mango and mmsg) are created and executable
|
||||||
5. Verifies that executables (mango and mmsg) are created and executable
|
5. Tests basic executable functionality
|
||||||
6. Tests basic executable functionality
|
|
||||||
|
|
||||||
**Build Strategy**:
|
**Build Strategy**:
|
||||||
|
|
||||||
|
|
@ -89,12 +81,6 @@ changes work correctly in the NixOS ecosystem.
|
||||||
- Leverages the repository's flake.nix configuration
|
- Leverages the repository's flake.nix configuration
|
||||||
- Dependencies from nixpkgs-unstable
|
- Dependencies from nixpkgs-unstable
|
||||||
|
|
||||||
**Code Quality Checks**:
|
|
||||||
|
|
||||||
- Validates flake structure and outputs with `nix flake check`
|
|
||||||
- Checks Nix code formatting with alejandra formatter
|
|
||||||
- Ensures flake.nix and nix/*.nix files are properly formatted
|
|
||||||
|
|
||||||
**Dependencies**:
|
**Dependencies**:
|
||||||
|
|
||||||
- Nix package manager with flakes support
|
- Nix package manager with flakes support
|
||||||
|
|
@ -162,7 +148,6 @@ The build workflows ensure that:
|
||||||
- All dependencies are properly installed
|
- All dependencies are properly installed
|
||||||
- The project compiles without errors on both Arch Linux and NixOS
|
- The project compiles without errors on both Arch Linux and NixOS
|
||||||
- Both main executables (`mango` and `mmsg`) are built successfully
|
- Both main executables (`mango` and `mmsg`) are built successfully
|
||||||
- Code formatting standards are enforced (clang-format for C/C++, alejandra for Nix)
|
|
||||||
|
|
||||||
The docs workflow ensures that:
|
The docs workflow ensures that:
|
||||||
|
|
||||||
|
|
@ -176,5 +161,3 @@ If a build workflow fails, check:
|
||||||
2. wlroots and scenefx versions match requirements in meson.build
|
2. wlroots and scenefx versions match requirements in meson.build
|
||||||
3. Build configuration in meson.build hasn't changed
|
3. Build configuration in meson.build hasn't changed
|
||||||
4. For NixOS builds: flake.nix and nix/default.nix are correctly configured
|
4. For NixOS builds: flake.nix and nix/default.nix are correctly configured
|
||||||
5. For Arch builds: Code is properly formatted (run `./format.sh` to fix)
|
|
||||||
6. For NixOS builds: Nix files are properly formatted (run `nix fmt` to fix)
|
|
||||||
|
|
|
||||||
20
.github/workflows/build-arch.yml
vendored
20
.github/workflows/build-arch.yml
vendored
|
|
@ -39,24 +39,12 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Check C/C++ code formatting
|
|
||||||
run: |
|
|
||||||
# Install clang-format
|
|
||||||
pacman -Syu --noconfirm
|
|
||||||
pacman -S --noconfirm clang
|
|
||||||
|
|
||||||
# Check if code is properly formatted
|
|
||||||
echo "Checking code formatting with clang-format..."
|
|
||||||
clang-format --dry-run --Werror src/*/*.h src/*/*.c src/mango.c mmsg/mmsg.c mmsg/arg.h mmsg/dynarr.h || {
|
|
||||||
echo "❌ Code formatting check failed!"
|
|
||||||
echo "Run './format.sh' to fix formatting issues."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
echo "✅ Code formatting check passed!"
|
|
||||||
|
|
||||||
- name: Update system and install dependencies
|
- name: Update system and install dependencies
|
||||||
run: |
|
run: |
|
||||||
# Install build tools and all dependencies (system already updated in format check)
|
# Update package database
|
||||||
|
pacman -Syu --noconfirm
|
||||||
|
|
||||||
|
# Install build tools and all dependencies
|
||||||
pacman -S --noconfirm \
|
pacman -S --noconfirm \
|
||||||
base-devel \
|
base-devel \
|
||||||
git \
|
git \
|
||||||
|
|
|
||||||
11
.github/workflows/build-nixos.yml
vendored
11
.github/workflows/build-nixos.yml
vendored
|
|
@ -46,17 +46,6 @@ jobs:
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
|
|
||||||
- name: Check Nix flake
|
|
||||||
run: |
|
|
||||||
echo "Running nix flake check..."
|
|
||||||
nix flake check --print-build-logs
|
|
||||||
|
|
||||||
- name: Check Nix formatting with alejandra
|
|
||||||
run: |
|
|
||||||
echo "Checking Nix code formatting..."
|
|
||||||
nix fmt -- --check .
|
|
||||||
echo "✅ Nix formatting check passed!"
|
|
||||||
|
|
||||||
- name: Build project with Nix
|
- name: Build project with Nix
|
||||||
run: |
|
run: |
|
||||||
nix build --print-build-logs
|
nix build --print-build-logs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue