forked from quickshell/quickshell
		
	ci: run lints and test compile on arch
This commit is contained in:
		
							parent
							
								
									9b409c0e38
								
							
						
					
					
						commit
						e957e88ccb
					
				
					 8 changed files with 86 additions and 28 deletions
				
			
		
							
								
								
									
										55
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,55 @@
 | 
				
			||||||
 | 
					name: Build
 | 
				
			||||||
 | 
					on: [push, pull_request]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  nix:
 | 
				
			||||||
 | 
					    name: Nix
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        qtver: [qt6.8.0, qt6.7.3, qt6.7.2, qt6.7.1, qt6.7.0, qt6.6.3, qt6.6.2, qt6.6.1, qt6.6.0]
 | 
				
			||||||
 | 
					        compiler: [clang, gcc]
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					      # Use cachix action over detsys for testing with act.
 | 
				
			||||||
 | 
					      # - uses: cachix/install-nix-action@v27
 | 
				
			||||||
 | 
					      - uses: DeterminateSystems/nix-installer-action@main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Download Dependencies
 | 
				
			||||||
 | 
					        run: nix-build --no-out-link --expr '((import ./ci/matrix.nix) { qtver = "${{ matrix.qtver }}"; compiler = "${{ matrix.compiler }}"; }).inputDerivation'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Build
 | 
				
			||||||
 | 
					        run: nix-build --no-out-link --expr '(import ./ci/matrix.nix) { qtver = "${{ matrix.qtver }}"; compiler = "${{ matrix.compiler }}"; }'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  archlinux:
 | 
				
			||||||
 | 
					    name: Archlinux
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    container: archlinux
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Download Dependencies
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          pacman --noconfirm --noprogressbar -Syyu
 | 
				
			||||||
 | 
					          pacman --noconfirm --noprogressbar -Sy \
 | 
				
			||||||
 | 
					            base-devel \
 | 
				
			||||||
 | 
					            cmake \
 | 
				
			||||||
 | 
					            ninja \
 | 
				
			||||||
 | 
					            pkgconf \
 | 
				
			||||||
 | 
					            qt6-base \
 | 
				
			||||||
 | 
					            qt6-declarative \
 | 
				
			||||||
 | 
					            qt6-svg \
 | 
				
			||||||
 | 
					            qt6-wayland \
 | 
				
			||||||
 | 
					            qt6-shadertools \
 | 
				
			||||||
 | 
					            wayland-protocols \
 | 
				
			||||||
 | 
					            wayland \
 | 
				
			||||||
 | 
					            libxcb \
 | 
				
			||||||
 | 
					            libpipewire \
 | 
				
			||||||
 | 
					            cli11 \
 | 
				
			||||||
 | 
					            jemalloc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Build
 | 
				
			||||||
 | 
					        # breakpad is annoying to build in ci due to makepkg not running as root
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          cmake -GNinja -B build -DCRASH_REPORTER=OFF
 | 
				
			||||||
 | 
					          cmake --build build
 | 
				
			||||||
							
								
								
									
										25
									
								
								.github/workflows/lint.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/lint.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					name: Lint
 | 
				
			||||||
 | 
					on: [push, pull_request]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  lint:
 | 
				
			||||||
 | 
					    name: Lint
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					      # Use cachix action over detsys for testing with act.
 | 
				
			||||||
 | 
					      # - uses: cachix/install-nix-action@v27
 | 
				
			||||||
 | 
					      - uses: DeterminateSystems/nix-installer-action@main
 | 
				
			||||||
 | 
					      - uses: nicknovitski/nix-develop@v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Check formatting
 | 
				
			||||||
 | 
					        run: clang-format -Werror --dry-run src/**/*.{cpp,hpp}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # required for lint
 | 
				
			||||||
 | 
					      - name: Build
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          just configure debug -DNO_PCH=ON -DBUILD_TESTING=ON
 | 
				
			||||||
 | 
					          just build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Run lints
 | 
				
			||||||
 | 
					        run: just lint 2>&1
 | 
				
			||||||
							
								
								
									
										21
									
								
								.github/workflows/nix-build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/nix-build.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
name: Build (Nix)
 | 
					 | 
				
			||||||
on: [push, pull_request]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build:
 | 
					 | 
				
			||||||
    name: Build (Nix)
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        qtver: [qt6.8.0, qt6.7.3, qt6.7.2, qt6.7.1, qt6.7.0, qt6.6.3, qt6.6.2, qt6.6.1, qt6.6.0]
 | 
					 | 
				
			||||||
        compiler: [clang, gcc]
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					 | 
				
			||||||
      # Use cachix action over detsys for testing with act.
 | 
					 | 
				
			||||||
      # - uses: cachix/install-nix-action@v27
 | 
					 | 
				
			||||||
      - uses: DeterminateSystems/nix-installer-action@main
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - run: nix-build --no-out-link --expr "(import ./ci/matrix.nix) { qtver = \"$QTVER\"; compiler = \"$COMPILER\"; }"
 | 
					 | 
				
			||||||
        env:
 | 
					 | 
				
			||||||
          QTVER: ${{ matrix.qtver }}
 | 
					 | 
				
			||||||
          COMPILER: ${{ matrix.compiler }}
 | 
					 | 
				
			||||||
							
								
								
									
										2
									
								
								Justfile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Justfile
									
										
									
									
									
								
							| 
						 | 
					@ -4,7 +4,7 @@ fmt:
 | 
				
			||||||
    find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
 | 
					    find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
 | 
				
			||||||
 | 
					
 | 
				
			||||||
lint:
 | 
					lint:
 | 
				
			||||||
	find src -type f -name "*.cpp" -print0 | parallel -q0 --eta clang-tidy --load={{ env_var("TIDYFOX") }}
 | 
						find src -type f -name "*.cpp" -print0 | parallel -q0 --bar clang-tidy --use-color --load={{ env_var("TIDYFOX") }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
configure target='debug' *FLAGS='':
 | 
					configure target='debug' *FLAGS='':
 | 
				
			||||||
	cmake -GNinja -B {{builddir}} \
 | 
						cmake -GNinja -B {{builddir}} \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ in pkgs.mkShell.override { stdenv = quickshell.stdenv; } {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  nativeBuildInputs = with pkgs; [
 | 
					  nativeBuildInputs = with pkgs; [
 | 
				
			||||||
    just
 | 
					    just
 | 
				
			||||||
    clang-tools_17
 | 
					    clang-tools
 | 
				
			||||||
    parallel
 | 
					    parallel
 | 
				
			||||||
    makeWrapper
 | 
					    makeWrapper
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -626,7 +626,8 @@ start:
 | 
				
			||||||
		if (next == EncodedLogOpcode::RegisterCategory) {
 | 
							if (next == EncodedLogOpcode::RegisterCategory) {
 | 
				
			||||||
			if (!this->registerCategory()) return false;
 | 
								if (!this->registerCategory()) return false;
 | 
				
			||||||
			goto start;
 | 
								goto start;
 | 
				
			||||||
		} else if (next == EncodedLogOpcode::RecentMessageShort || next == EncodedLogOpcode::RecentMessageLong)
 | 
							} else if (next == EncodedLogOpcode::RecentMessageShort
 | 
				
			||||||
 | 
							           || next == EncodedLogOpcode::RecentMessageLong)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			quint8 index = 0;
 | 
								quint8 index = 0;
 | 
				
			||||||
			quint32 secondDelta = 0;
 | 
								quint32 secondDelta = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,9 +85,7 @@ class ObjectModel: public UntypedObjectModel {
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
	explicit ObjectModel(QObject* parent): UntypedObjectModel(parent) {}
 | 
						explicit ObjectModel(QObject* parent): UntypedObjectModel(parent) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[[nodiscard]] QVector<T*>& valueList() {
 | 
						[[nodiscard]] QVector<T*>& valueList() { return *std::bit_cast<QVector<T*>*>(&this->valuesList); }
 | 
				
			||||||
		return *std::bit_cast<QVector<T*>*>(&this->valuesList);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[[nodiscard]] const QVector<T*>& valueList() const {
 | 
						[[nodiscard]] const QVector<T*>& valueList() const {
 | 
				
			||||||
		return *std::bit_cast<const QVector<T*>*>(&this->valuesList);
 | 
							return *std::bit_cast<const QVector<T*>*>(&this->valuesList);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue