From e5df60172a54bf9d44bf2ccf223116bc0287ac50 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 1 Oct 2023 16:17:48 +0300 Subject: [PATCH] CI: cleanup --- .github/workflows/cachix.yml | 9 +++++++++ .github/workflows/check-docs.yml | 20 ++++++++++++-------- .github/workflows/manual.yml | 5 ++++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index c217234..8651732 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -23,12 +23,17 @@ jobs: - maximal steps: - uses: easimon/maximize-build-space@v6 + name: Maximize build space with: overprovision-lvm: true remove-android: true remove-dotnet: true remove-haskell: true + remove-codeql: true + - uses: actions/checkout@v3 + name: Checkout + - uses: cachix/install-nix-action@v20 with: extra_nix_config: | @@ -36,14 +41,18 @@ jobs: auto-optimise-store = true experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v12 with: authToken: ${{ secrets.CACHIX_TOKEN }} extraPullNames: nix-community name: neovim-flake + - name: Set default git branch (to reduce log spam) run: git config --global init.defaultBranch main + - name: Validate Flakes run: nix flake check + - name: Build neovim-flake with default settings run: nix build .#${{ matrix.package }} --print-build-logs diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index ae29751..009f4e5 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -14,10 +14,10 @@ jobs: strategy: matrix: package: - - docs - - docs-html - - docs-manpages - - docs-json + - docs + - docs-html + - docs-manpages + - docs-json steps: - uses: easimon/maximize-build-space@v6 with: @@ -25,25 +25,29 @@ jobs: remove-android: true remove-dotnet: true remove-haskell: true + - uses: cachix/install-nix-action@v20 with: - extra_nix_config: | + extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} auto-optimise-store = true experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable - uses: actions/checkout@v3 + name: Checkout + - name: Set default git branch (to reduce log spam) run: git config --global init.defaultBranch main - - name: Validate Flakes + + - name: Validate Flake run: nix flake check + - name: Build neovim-flake with default settings run: nix build .#${{ matrix.package }} --print-build-logs + - name: Upload doc artifacts uses: actions/upload-artifact@v3 with: name: doc path: result/share/doc/neovim-flake/ - - diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 5a2a50f..321d23e 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -4,7 +4,7 @@ on: push: branches: - main - paths: + paths: # build the manuals only when docs directory is updated - docs/** @@ -25,12 +25,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Install Nix uses: cachix/install-nix-action@v18 + - name: Build run: | nix build '.#docs' cp -r result/share/doc/neovim-flake public + - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: